public PropertyNode( GMLObjectNode<? extends TypedObjectNode, ? extends TypedObjectNode> parent, final Property prop ) { super( prop.getName() ); this.parent = parent; this.prop = prop; }
@Override public List<Property> getProperties( final QName propName ) { final List<Property> namedProps = new ArrayList<Property>( props.size() ); for ( final Property property : props ) { if ( propName.equals( property.getName() ) ) { namedProps.add( property ); } } return namedProps; }
@Override public List<Property> getProperties( final QName propName ) { final List<Property> namedProps = new ArrayList<Property>( props.size() ); for ( final Property property : props ) { if ( propName.equals( property.getName() ) ) { namedProps.add( property ); } } return namedProps; }
@Override public List<Property> getProperties( QName propName ) { List<Property> namedProps = new ArrayList<Property>( props.size() ); for ( Property property : props ) { if ( propName.equals( property.getName() ) ) { namedProps.add( property ); } } return namedProps; }
@Override public List<Property> getProperties( QName propName ) { if ( props == null ) { return emptyList(); } List<Property> namedProps = new ArrayList<Property>( props.size() ); for ( Property property : props ) { if ( propName.equals( property.getName() ) ) { namedProps.add( property ); } } return namedProps; }
/** * Returns the properties with the given name, in order. * * @param propName * name of the requested properties * @return the properties with the given name, in order, may be empty, but never <code>null</code> */ public Property[] getProperties( String propName ) { List<Property> namedProps = new ArrayList<Property>( props.length ); for ( Property property : props ) { if ( propName.equals( property.getName().getLocalPart() ) ) { namedProps.add( property ); } } return namedProps.toArray( new Property[namedProps.size()] ); }
/** * @param sb * @param o */ public void eval( StringBuilder sb, Object o ) { if ( o instanceof Feature ) { sb.append( ( (Feature) o ).getName().getLocalPart() ); } if ( o instanceof Property ) { sb.append( ( (Property) o ).getName().getLocalPart() ); } }
/** * Returns the property with the given name. * * @param propName * name of the requested property * @return the property with the given name * @throws IllegalArgumentException * if the feature has more than one property with the given name */ public Property getProperty( String propName ) { Property prop = null; for ( Property property : props ) { if ( propName.equals( property.getName().getLocalPart() ) ) { if ( prop != null ) { String msg = "Feature has more than one property with name '" + propName + "'."; throw new IllegalArgumentException( msg ); } prop = property; } } return prop; } }
private List<Property> augmentBoundedBy( Feature f ) { LinkedList<Property> props = new LinkedList<Property>( f.getProperties() ); for ( int i = 0; i < props.size(); i++ ) { QName name = props.get( i ).getName(); if ( !gmlNs.equals( name.getNamespaceURI() ) || name.getLocalPart().equals( "location" ) ) { // not a GML property or gml:location -> gml:boundedBy must be included right before it Property boundedBy = getBoundedBy( f ); if ( boundedBy != null ) { props.add( i, boundedBy ); } break; } else if ( name.getLocalPart().equals( "boundedBy" ) ) { // already present -> don't include it break; } } return props; }
@Override public void serialize( FeatureInfoParams params, FeatureInfoContext context ) throws IOException, XMLStreamException { PrintWriter out = new PrintWriter( new OutputStreamWriter( context.getOutputStream(), "UTF-8" ) ); for ( Feature f : params.getFeatureCollection() ) { out.println( f.getName().getLocalPart() + ":" ); for ( Property p : f.getProperties() ) { out.println( " " + p.getName().getLocalPart() + ": " + p.getValue() ); } out.println(); } out.close(); } }
@Override public List<Property> getProperties( QName propName ) { List<Property> namedProps = new ArrayList<Property>(); if ( props != null ) { for ( Property property : props ) { if ( propName.equals( property.getName() ) ) { namedProps.add( property ); } } } else if ( propName.equals( getType().getMemberDeclarations().get( 0 ) ) ) { for ( Feature feature : memberFeatures ) { namedProps.add( new GenericProperty( getType().getMemberDeclarations().get( 0 ), null, feature ) ); } } return namedProps; }
private GmlXlinkOptions getResolveParams( Property prop, GmlXlinkOptions resolveState ) { PropertyName projection = requestedPropertyNames.get( prop.getName() ); if ( projection != null && projection.getResolveParams() != null ) { return new GmlXlinkOptions( projection.getResolveParams() ); } return resolveState; }
key = ( (Property) o ).getName().getLocalPart();
Property prop = props.get( i ); if ( prop.getName().equals( propName ) ) { if ( num++ == occurrence ) { if ( value != null ) {
String nm = o2 instanceof Property ? ( (Property) o2 ).getName().getLocalPart() : ( (Feature) o2 ).getName().getLocalPart(); if ( negate ) {
int idx = 0; for ( final Property prop : propertyList ) { if ( EXTRA_PROP_NS.equals( prop.getName().getNamespaceURI() ) ) { extraPropertyIdx = idx; break;
private void exportStandardProps( Geometry geom ) throws XMLStreamException, UnknownCRSException, TransformationException { if ( geom.getProperties() != null ) { for ( Property prop : geom.getProperties() ) { if ( isStandardProperty( prop.getName() ) ) { gmlStreamWriter.getFeatureWriter().export( prop ); } } } }
private void exportAdditionalProps( Geometry geom ) throws XMLStreamException, UnknownCRSException, TransformationException { if ( geom.getProperties() != null ) { for ( Property prop : geom.getProperties() ) { if ( !isStandardProperty( prop.getName() ) ) { gmlStreamWriter.getFeatureWriter().export( prop ); } } } }
List<Property> props = new ArrayList<Property>( f.getProperties() ); ListIterator<Property> iter = props.listIterator(); String name = iter.next().getName().getLocalPart(); while ( name.equals( "lebenszeitintervall" ) || name.equals( "modellart" ) || name.equals( "anlass" ) || name.equals( "zeigtAufExternes" ) || name.equals( "istTeilVon" ) || name.equals( "identifier" ) ) { if ( iter.hasNext() ) { name = iter.next().getName().getLocalPart(); } else { break;
private void export( Property property, GmlXlinkOptions resolveState ) throws XMLStreamException, UnknownCRSException, TransformationException { QName propName = property.getName(); PropertyType pt = property.getType(); if ( pt.getMinOccurs() == 0 ) {