private GMLObjectType getType( XMLStreamReader xmlStream ) { GMLObjectType type = null; if ( schema != null && schema.getGMLSchema() != null ) { QName name = xmlStream.getName(); type = schema.getGeometryType( name ); if ( type == null ) { LOG.debug( "GML geometry element '" + name + "' is not defined in application schema!?" ); } } return type; }
/** * Returns whether the given element name denotes a GML 3.1.1 geometry element (a concrete element substitutable for * "gml:_Geometry"). * * @param elName * qualified element name to check * @return true, if the element is a GML 3.1.1 geometry element, false otherwise */ public boolean isGeometryElement( QName elName ) { if ( schema != null && schema.getGeometryHierarchy() != null ) { GMLObjectType type = schema.getGeometryType( elName ); return type != null; } if ( !gmlNs.equals( elName.getNamespaceURI() ) ) { return false; } String localName = elName.getLocalPart(); return primitiveElements.contains( localName ) || aggregateElements.contains( localName ) || complexElements.contains( localName ) || implictGeometryElements.contains( localName ); }
private Set<QName> getConcreteSubstitutions( AppSchema appSchema, QName elName ) { Set<QName> elNames = new HashSet<QName>(); GMLObjectType type = appSchema.getGeometryType( elName ); if ( type != null ) { if ( !type.isAbstract() ) { elNames.add( type.getName() ); } for ( GMLObjectType substitution : appSchema.getSubstitutions( type.getName() ) ) { if ( !substitution.isAbstract() ) { elNames.add( substitution.getName() ); } } } return elNames; }
GMLObjectType type = schema.getGeometryType( xmlStream.getName() ); if ( type == null ) { String msg = "Invalid geometry element: '" + xmlStream.getName()