/** * Writes the start of a <group> element. * @see #writeEndGroup() */ public void writeStartGroup (StartGroup resource) { if ( !inFile ) { writeStartFile(original, dataType, skeletonPath, fwConfigId, fwInputEncoding, null); } String id = resource.getId(); String resName = resource.getName(); String resType = resource.getType(); writer.writeStartElement("group"); writer.writeAttributeString("id", id); if ( !Util.isEmpty(resName) ) { writer.writeAttributeString("resname", resName); } if ( !Util.isEmpty(resType) ) { if ( resType.startsWith("x-") || ( RESTYPEVALUES.contains(";"+resType+";")) ) { writer.writeAttributeString("restype", resType); } else { // Make sure the value is valid writer.writeAttributeString("restype", "x-"+resType); } } writeAnnotatorsRefIfNeeded(); writeSizeProperties(writer, resource); writer.writeLineBreak(); }
writer.writeAttributeString(Namespaces.ITS_NS_PREFIX+":version", "2.0"); writeAnnotatorsRefIfNeeded();
writer.writeAttributeString("xml:lang", alt.getTargetLocale().toBCP47()); if ( params.getIncludeIts() ) { writeAnnotatorsRefIfNeeded(); StringBuilder tmp = new StringBuilder(); itsContForAltTrgCont.outputAnnotations(alt.getTarget().getAnnotation(GenericAnnotations.class), tmp, false, false, false, null);
writer.writeAttributeString("okp:configId", configId); writeAnnotatorsRefIfNeeded(); writer.writeLineBreak();
writeAnnotatorsRefIfNeeded(); sbITS.setLength(0); itsContForUnit.outputAnnotations(tu.getAnnotation(GenericAnnotations.class), sbITS, false, false, false, trgLoc); writeAnnotatorsRefIfNeeded(); sbITS.setLength(0); itsContForSrcCont.outputAnnotations(tc.getAnnotation(GenericAnnotations.class), sbITS, false, false, false, null); writeAnnotatorsRefIfNeeded(); sbITS.setLength(0); itsContForTrgCont.outputAnnotations(tc.getAnnotation(GenericAnnotations.class), sbITS, false, false, false, null);