private void writeNilledElement( QName propName, Map<QName, PrimitiveValue> attributes ) throws XMLStreamException { writeEmptyElementWithNS( propName.getNamespaceURI(), propName.getLocalPart() ); writeNilAttributes( attributes ); endEmptyElement(); }
private void exportEmptyProperty( final QName propName, final Map<QName,PrimitiveValue> attrs) throws XMLStreamException { writeEmptyElementWithNS( propName.getNamespaceURI(), propName.getLocalPart() ); writeAttributes( attrs ); endEmptyElement(); }
private void exportAlreadyExportedFeaturePropertyByReference( Feature ref, QName propName ) throws XMLStreamException { writeEmptyElementWithNS( propName.getNamespaceURI(), propName.getLocalPart() ); writeAttributeWithNS( XLNNS, "href", "#" + ref.getId() ); endEmptyElement(); }
private void exportFeaturePropertyByReference( QName propName, FeatureReference ref, boolean forceInclusionInDocument, GmlXlinkOptions resolveState ) throws XMLStreamException { writeEmptyElementWithNS( propName.getNamespaceURI(), propName.getLocalPart() ); String uri = null; if ( forceInclusionInDocument ) { resolveState = getResolveStateForNextLevel( resolveState ); uri = referenceExportStrategy.requireObject( ref, resolveState ); } else { uri = referenceExportStrategy.handleReference( ref ); } writeAttributeWithNS( XLNNS, "href", uri ); endEmptyElement(); }
writeNilledElement( propName, attributes ); } else if ( value == null ) { writeEmptyElementWithNS( propName.getNamespaceURI(), propName.getLocalPart() ); endEmptyElement(); } else { Geometry gValue = (Geometry) value; if ( !exportSf && gValue.getId() != null && referenceExportStrategy.isObjectExported( gValue.getId() ) ) { writeEmptyElementWithNS( propName.getNamespaceURI(), propName.getLocalPart() ); writeAttributeWithNS( XLNNS, "href", "#" + gValue.getId() ); endEmptyElement(); StringOrRef stringOrRef = (StringOrRef) value; if ( stringOrRef.getString() == null || stringOrRef.getString().length() == 0 ) { writeEmptyElementWithNS( propName.getNamespaceURI(), propName.getLocalPart() ); if ( stringOrRef.getRef() != null ) { writeAttributeWithNS( XLNNS, "href", stringOrRef.getRef() );