public FeatureClass( FeatureType ft, FeatureClass parent ) { super( ft.getName(), D_PACKAGE, PACKAGE_DIR, null, false, ft.isAbstract() ); this.ft = ft; this.baseType = parent; AppSchema schema = ft.getSchema(); propertyDeclarations = schema.getNewPropertyDecls( ft ); }
@Override public String toString() { return "ft=" + ft.getName() + ",idKernels=" + idKernels; } }
@Override public String toString() { String s = "- Feature collection type '" + getName() + "', abstract: " + isAbstract(); for ( PropertyType pt : getPropertyDeclarations() ) { s += "\n" + pt; } return s; } }
@Override public boolean isMapped( QName ftName ) { return schema.getFeatureType( ftName ) != null; }
private void setSchema( Feature feature ) { if ( schema == null ) { schema = feature.getType().getSchema(); if ( schema != null ) { schemaInfoset = schema.getGMLSchema(); } } }
private static void printFtHierarchy( AppSchema schema, Set<String> ftNames, Set<String> propNames ) { int concrete = 0; for ( FeatureType ft : schema.getFeatureTypes() ) { if ( !ft.isAbstract() ) { concrete++; } printFt( ft, ftNames, propNames ); } System.out.println( schema.getFeatureTypes().length + " feature types (" + concrete + " concrete)" ); }
@Override public List<PropertyType> getNewPropertyDecls( FeatureType ft ) { return ft.getPropertyDeclarations(); }
public void export( XMLStreamWriter writer, AppSchema schema ) throws XMLStreamException { export( writer, schema.getFeatureTypes( null, true, true ) ); }
@Override public GeometryPropertyType getDefaultGeometryPropertyDeclaration() { for ( PropertyType pt : getPropertyDeclarations() ) { if ( pt instanceof GeometryPropertyType ) { return (GeometryPropertyType) pt; } } return null; }
@Override public Feature newFeatureInstance( String fid, List<Property> props, ExtraProps extraProps ) { return super.newFeature( fid, props, extraProps ); }
private AppSchemaGeometryHierarchy getGeometryHierarchy() { if ( schema != null ) { return schema.getGeometryHierarchy(); } return null; }
@Override public Feature newFeatureInstance( String fid, List<Property> props, ExtraProps extraProps ) { return newFeature( fid, props, extraProps ); }
@Override public FeatureType[] getRootFeatureTypes() { return getFeatureTypes(); }
@Override public QName getName() { return ft.getName(); }
@Override public boolean isMapped( QName ftName ) { return schema.getFeatureType( ftName ) != null; }
@Override public Feature newFeatureInstance( String fid, List<Property> props, ExtraProps extraProps ) { return newFeature( fid, props, extraProps ); }
@Override public QName getName() { return ft.getName(); }
@Override public boolean isMapped( QName ftName ) { return schema.getFeatureType( ftName ) != null; }
private FeatureType findFeatureType( QName configuredReturnFeatureTypeName, Collection<FeatureType> featureTypes ) { for ( FeatureType featureType : featureTypes ) { if ( configuredReturnFeatureTypeName.equals( featureType.getName() ) ) return featureType; } return null; }
@Override public boolean isMapped( QName ftName ) { return appSchema.getFeatureType( ftName ) != null; }