private void exportFeatureProperty( FeaturePropertyType pt, Feature subFeature,
Map<QName, PrimitiveValue> attributes,
GmlXlinkOptions resolveState )
throws XMLStreamException, UnknownCRSException, TransformationException {
QName propName = pt.getName();
LOG.debug( "Exporting feature property '" + propName + "'" );
if ( subFeature == null ) {
exportEmptyProperty( propName, attributes );
} else if ( subFeature instanceof FeatureReference ) {
exportFeatureProperty( pt, (FeatureReference) subFeature, resolveState, propName );
} else {
String subFid = subFeature.getId();
if ( subFid == null ) {
writeStartElementWithNS( propName.getNamespaceURI(), propName.getLocalPart() );
writer.writeComment( "Inlined feature '" + subFid + "'" );
export( subFeature, getResolveStateForNextLevel( resolveState ) );
writer.writeEndElement();
} else {
if ( referenceExportStrategy.isObjectExported( subFid ) ) {
exportAlreadyExportedFeaturePropertyByReference( subFeature, propName );
} else {
exportFeaturePropertyByValue( propName, subFeature, resolveState );
}
}
}
}