@Override public <T> boolean evaluate( T obj, XPathEvaluator<T> xpathEvaluator ) throws FilterEvaluationException { TypedObjectNode[] paramValues = propName.evaluate( obj, xpathEvaluator ); if ( paramValues.length == 0 ) { return true; } for ( TypedObjectNode value : paramValues ) { if ( !( value instanceof ElementNode ) ) { return false; } PrimitiveValue nil = ( (ElementNode) value ).getAttributes().get( XSI_NIL ); if ( nil != null && nil.getValue() instanceof Boolean ) { if ( (Boolean) nil.getValue() ) { return true; } } } return false; }
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(); }
Map<QName, PrimitiveValue> attributes = value.getAttributes(); if ( attributes != null ) { List<AttributeNode<?>> attrNodes = new ArrayList<AttributeNode<?>>( attributes.size() );