@Override public String toString() { return "ft=" + ft.getName() + ",idKernels=" + idKernels; } }
@Override public QName getName() { return ft.getName(); }
@Override public QName getName() { return ft.getName(); }
private FeatureType findFeatureType( QName configuredReturnFeatureTypeName, Collection<FeatureType> featureTypes ) { for ( FeatureType featureType : featureTypes ) { if ( configuredReturnFeatureTypeName.equals( featureType.getName() ) ) return featureType; } return null; }
private List<QName> collectAllFeatureTypes( Collection<FeatureType> featureTypes ) { List<QName> ftNames = new ArrayList<QName>( featureTypes.size() ); for ( FeatureType ft : featureTypes ) { ftNames.add( ft.getName() ); } return ftNames; }
/** * @param out */ @Override public void writeClassDoc( Writer out ) throws IOException { StringBuilder sb = new StringBuilder(); sb.append( "/**\n" ); sb.append( " * Accepts a CityGML element (" ).append( ft.getName() ).append( ")\n" ); sb.append( " * and creates a WPVS representation from it.\n" ); sb.append( " */\n" ); out.write( sb.toString() ); }
@Override public List<FeatureType> getFeatureTypes( String namespace, boolean includeCollections, boolean includeAbstracts ) { List<FeatureType> fts = new ArrayList<FeatureType>( ftNameToFt.values().size() ); for ( FeatureType ft : ftNameToFt.values() ) { if ( namespace == null || namespace.equals( ft.getName().getNamespaceURI() ) ) { if ( ( includeAbstracts || !ft.isAbstract() ) && ( includeCollections || !( ft instanceof FeatureCollectionType ) ) ) { fts.add( ft ); } } } return fts; }
private String getSchemaLocationPartForFeatureTypes( Version requestVersion, GMLVersion gmlVersion, Collection<FeatureType> requestedFts ) { QName[] requestedFtNames = new QName[0]; if ( requestedFts != null ) { requestedFtNames = new QName[requestedFts.size()]; int i = 0; for ( FeatureType requestedFt : requestedFts ) { requestedFtNames[i++] = requestedFt.getName(); } } return getSchemaLocation( requestVersion, gmlVersion, requestedFtNames ); }
private static void printFt( FeatureType ft, Set<String> ftNames, Set<String> propNames ) { System.out.println( "\n - feature type '" + ft.getName() + "'" + ( ft.isAbstract() ? " (abstract)" : "" ) ); ftNames.add( ft.getName().getLocalPart() ); for ( PropertyType pt : ft.getPropertyDeclarations() ) { propNames.add( pt.getName().getLocalPart() ); String ptName = pt.getName().getNamespaceURI().equals( ft.getName().getNamespaceURI() ) ? pt.getName().getLocalPart() : pt.getName().toString(); System.out.println( " - '" + ptName + "', minOccurs=" + pt.getMinOccurs() + ", maxOccurs=" + pt.getMaxOccurs() + ", type: " + pt.getClass().getSimpleName() ); } }
private String determineNamespace( FeatureInfoParams params ) { String ns = params.getFeatureType() == null ? null : params.getFeatureType().getName().getNamespaceURI(); if ( ns != null && ns.isEmpty() ) { ns = null; } return ns; }
protected Map<String, String> getFeatureTypeNsPrefixes( Collection<FeatureType> fts ) { if ( fts == null ) { fts = format.getMaster().getStoreManager().getFeatureTypes(); } Map<String, String> prefixToNs = new HashMap<String, String>(); for ( FeatureType ft : fts ) { QName ftName = ft.getName(); if ( ftName.getPrefix() != null ) { prefixToNs.put( ftName.getPrefix(), ftName.getNamespaceURI() ); } } return prefixToNs; }
public void checkIfFeatureTypIsRequested( TypeName[] typeNames, FeatureType ft ) { if ( typeNames != null && typeNames.length > 0 ) { boolean isFeatureTypeRequested = false; for ( TypeName typeName : typeNames ) { if ( typeName.getFeatureTypeName().equals( ft.getName() ) ) isFeatureTypeRequested = true; } if ( !isFeatureTypeRequested ) throw new InvalidParameterValueException( "Requested feature does not match the requested feature type.", "RESOURCEID" ); } }
private String determineNamespaceUri( ValueReference valueReference, FeatureType ft, NameStep namestep ) { String prefix = namestep.getPrefix(); if ( prefix != null && !"".equals( prefix ) ) { String namespaceUriByPrefix = valueReference.getNsContext().getNamespaceURI( prefix ); if ( namespaceUriByPrefix != null && !"".equals( namespaceUriByPrefix ) ) return namespaceUriByPrefix; } return ft.getName().getNamespaceURI(); }
/** * @param featureOrGeomId feature or geometry ID * @return never <code>null</code> * @throws IllegalArgumentException if given ID not found */ public IdAnalysis analyze( String featureOrGeomId ) { FeatureType ft = getFeatureType( featureOrGeomId ); FIDMapping fidMapping = schema.getFtMapping( ft.getName() ).getFidMapping(); String idRemainder = featureOrGeomId.substring( fidMapping.getPrefix().length() ); return new IdAnalysis( ft, idRemainder, fidMapping ); }
private AbstractWhereBuilder getWhereBuilder( FeatureType ft, OperatorFilter filter, SortProperty[] sortCrit, Connection conn ) throws FilterEvaluationException, UnmappableException { PropertyNameMapper mapper = new SQLPropertyNameMapper( this, getMapping( ft.getName() ) ); return dialect.getWhereBuilder( mapper, filter, sortCrit, allowInMemoryFiltering ); }
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 ); }
private void initConverters() { for ( FeatureType ft : schema.getFeatureTypes() ) { FeatureTypeMapping ftMapping = schema.getFtMapping( ft.getName() ); if ( ftMapping != null ) { for ( Mapping particleMapping : ftMapping.getMappings() ) { initConverter( particleMapping ); } } } }
@Override public Query apply( FeatureType u ) { Filter f; if ( filter == null ) { f = buildFilter( null, u, bbox ); } else { f = buildFilter( ( (OperatorFilter) filter ).getOperator(), u, bbox ); } return createQuery( u.getName(), f, -1, query.getFeatureCount(), -1, sortBy ); } } ) );
@Override public Query apply( FeatureType u ) { Filter fil = addBBoxConstraint( bbox, filter2, geomProp, true ); return createQuery( u.getName(), fil, round( query.getScale() ), maxFeatures, query.getResolution(), sortBy ); } } ) );