private void traverseTypedObjectNode( TypedObjectNode node ) { if ( node instanceof GMLObject ) { traverse( (GMLObject) node ); } else if ( node instanceof ElementNode ) { ElementNode generic = (ElementNode) node; for ( TypedObjectNode child : generic.getChildren() ) { traverseTypedObjectNode( child ); } } }
private void exportGenericXmlElement( ElementNode xmlContent, GmlXlinkOptions resolveState ) throws XMLStreamException, UnknownCRSException, TransformationException { QName elName = xmlContent.getName(); LOG.debug( "Exporting " + elName ); XSElementDeclaration elDecl = xmlContent.getXSType(); if ( elDecl != null && schemaInfoset != null ) { ObjectPropertyType gmlPropertyDecl = schemaInfoset.getGMLPropertyDecl( elDecl, elName, 0, 1, null ); if ( gmlPropertyDecl instanceof FeaturePropertyType ) { List<TypedObjectNode> children = xmlContent.getChildren(); if ( children != null && children.size() == 1 && children.get( 0 ) instanceof Feature ) { LOG.debug( "Exporting as nested feature property." ); exportFeatureProperty( (FeaturePropertyType) gmlPropertyDecl, (Feature) children.get( 0 ), null, resolveState ); return; } } } writeStartElementWithNS( elName.getNamespaceURI(), elName.getLocalPart() ); writeAttributes (xmlContent.getAttributes()); if ( xmlContent.getChildren() != null ) { for ( TypedObjectNode childNode : xmlContent.getChildren() ) { export( childNode, resolveState ); } } writer.writeEndElement(); }
private TimeGeometricPrimitive getTimePrimitiveValue( final TypedObjectNode node ) { if ( node == null ) { return null; } if ( node instanceof TimeGeometricPrimitive ) { return (TimeGeometricPrimitive) node; } if ( node instanceof Property ) { return getTimePrimitiveValue( ( (Property) node ).getValue() ); } if ( node instanceof ElementNode ) { final ElementNode elNode = (ElementNode) node; final List<TypedObjectNode> children = elNode.getChildren(); if ( children == null || children.isEmpty() ) { return null; } return getTimePrimitiveValue( children.get( 0 ) ); } return null; } }
private PrimitiveValue getPrimitiveValue( TypedObjectNode node ) { if ( node == null ) { return new PrimitiveValue( "null" ); } if ( node instanceof PrimitiveValue ) { return (PrimitiveValue) node; } if ( node instanceof Property ) { return getPrimitiveValue( ( (Property) node ).getValue() ); } if ( node instanceof ElementNode ) { ElementNode elNode = (ElementNode) node; List<TypedObjectNode> children = elNode.getChildren(); if ( children == null || children.isEmpty() ) { return new PrimitiveValue( "null" ); } return getPrimitiveValue( children.get( 0 ) ); } return new PrimitiveValue( node.toString() ); }
List<TypedObjectNode> xmlNodes = xmlElementNode.getValue().getChildren(); List<XPathNode<?>> xpathNodes = new ArrayList<XPathNode<?>>( xmlNodes.size() ); for ( TypedObjectNode xmlNode : xmlNodes ) {
for ( TypedObjectNode child : elNode.getChildren() ) { findFeaturesAndGeometries( child, geometries, features, fids, gids );
List<TypedObjectNode> children = xml.getChildren(); if ( children != null ) { for ( TypedObjectNode child : children ) {