本文整理了Java中org.deegree.feature.persistence.query.Query.getTypeNames
方法的一些代码示例,展示了Query.getTypeNames
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getTypeNames
方法的具体详情如下:
包路径:org.deegree.feature.persistence.query.Query
类名称:Query
方法名:getTypeNames
[英]Returns the names of the requested feature types.
[中]返回请求的要素类型的名称。
代码示例来源:origin: deegree/deegree3
private short[] getQueriedFeatureTypeIds( Query[] queries ) {
short[] ftId = new short[queries.length];
for ( int i = 0; i < ftId.length; i++ ) {
Query query = queries[i];
if ( query.getTypeNames() == null || query.getTypeNames().length > 1 ) {
String msg = "Join queries between multiple feature types are currently not supported.";
throw new UnsupportedOperationException( msg );
}
ftId[i] = getFtId( query.getTypeNames()[0].getFeatureTypeName() );
}
return ftId;
}
代码示例来源:origin: deegree/deegree3
private org.deegree.protocol.wfs.query.Query toWFSQuery( Query query ) {
TypeName[] typeNames = query.getTypeNames();
String featureVersion = null;
ICRS srsName = null;
PropertyName[] projectionClauses = null;
SortProperty[] sortBy = query.getSortProperties();
Filter filter = query.getFilter();
return new FilterQuery( null, typeNames, featureVersion, srsName, projectionClauses, sortBy, filter );
}
代码示例来源:origin: deegree/deegree3
@Override
public FeatureInputStream query( Query query )
throws FeatureStoreException, FilterEvaluationException {
if ( query.getTypeNames() == null || query.getTypeNames().length > 1 ) {
String msg = "Join queries between multiple feature types are not by SQLFeatureStore (yet).";
throw new UnsupportedOperationException( msg );
}
FeatureInputStream result = null;
Filter filter = query.getFilter();
if ( query.getTypeNames().length == 1 && ( filter == null || filter instanceof OperatorFilter ) ) {
QName ftName = query.getTypeNames()[0].getFeatureTypeName();
FeatureType ft = getSchema().getFeatureType( ftName );
if ( ft == null ) {
String msg = "Feature store is not configured to serve feature type '" + ftName + "'.";
throw new FeatureStoreException( msg );
}
result = queryByOperatorFilter( query, ftName, (OperatorFilter) filter );
} else {
// must be an id filter based query
if ( query.getFilter() == null || !( query.getFilter() instanceof IdFilter ) ) {
String msg = "Invalid query. If no type names are specified, it must contain an IdFilter.";
throw new FilterEvaluationException( msg );
}
result = queryByIdFilter( query.getTypeNames(), (IdFilter) filter, query.getSortProperties() );
}
return result;
}
代码示例来源:origin: deegree/deegree3
protected boolean localReferencesPossible( QueryAnalyzer analyzer, int traverseXLinkDepth ) {
if ( traverseXLinkDepth == 0 && analyzer.getQueries().size() == 1 ) {
List<Query> queries = analyzer.getQueries().values().iterator().next();
if ( queries.size() == 1 ) {
Query query = queries.get( 0 );
if ( query.getTypeNames().length == 1 ) {
TypeName typeName = query.getTypeNames()[0];
FeatureStore fs = analyzer.getQueries().keySet().iterator().next();
FeatureType ft = fs.getSchema().getFeatureType( typeName.getFeatureTypeName() );
for ( PropertyType pt : ft.getPropertyDeclarations() ) {
if ( pt instanceof FeaturePropertyType ) {
FeaturePropertyType fpt = (FeaturePropertyType) pt;
FeatureType targetFt = fpt.getValueFt();
if ( targetFt == null || fs.getSchema().isSubType( targetFt, ft ) ) {
return true;
}
}
}
LOG.debug( "Forward references can be ruled out." );
return false;
}
}
}
return true;
}
代码示例来源:origin: deegree/deegree3
@Override
public int queryHits( Query query )
throws FeatureStoreException, FilterEvaluationException {
if ( query.getTypeNames() == null || query.getTypeNames().length > 1 ) {
String msg = "Join queries between multiple feature types are not supported by the SQLFeatureStore implementation (yet).";
throw new UnsupportedOperationException( msg );
}
Filter filter = query.getFilter();
int hits = 0;
if ( query.getTypeNames().length == 1 && ( filter == null || filter instanceof OperatorFilter ) ) {
QName ftName = query.getTypeNames()[0].getFeatureTypeName();
FeatureType ft = getSchema().getFeatureType( ftName );
if ( ft == null ) {
String msg = "Feature type '" + ftName + "' is not served by this feature store.";
throw new FeatureStoreException( msg );
}
hits = queryHitsByOperatorFilter( query, ftName, (OperatorFilter) filter );
} else {
// must be an id filter based query
if ( query.getFilter() == null || !( query.getFilter() instanceof IdFilter ) ) {
String msg = "Invalid query. If no type names are specified, it must contain an IdFilter.";
throw new FilterEvaluationException( msg );
}
// should be no problem iterating over the features (id queries usually request only a few ids)
hits = queryByIdFilter( query.getTypeNames(), (IdFilter) filter, query.getSortProperties() ).count();
}
return hits;
}
代码示例来源:origin: deegree/deegree3
if ( query.getTypeNames().length == 0 ) {
for ( FeatureStore fs : service.getStores() ) {
List<Query> fsQueries = fsToQueries.get( fs );
FeatureStore fs = service.getStore( query.getTypeNames()[0].getFeatureTypeName() );
List<Query> fsQueries = fsToQueries.get( fs );
if ( fsQueries == null ) {
代码示例来源:origin: deegree/deegree3
throws FilterEvaluationException, FeatureStoreException {
if ( query.getTypeNames() == null || query.getTypeNames().length > 1 ) {
String msg = "Only queries with exactly one or zero type name(s) are supported.";
throw new UnsupportedOperationException( msg );
if ( query.getTypeNames().length == 0 && !( query.getFilter() instanceof IdFilter ) || idFilterNums != null
&& idFilterNums.isEmpty() ) {
return new MemoryFeatureInputStream( new GenericFeatureCollection() );
if ( query.getTypeNames().length > 0 ) {
QName featureType = query.getTypeNames()[0].getFeatureTypeName();
if ( featureType != null && !featureType.equals( ft.getName() ) ) {
代码示例来源:origin: deegree/deegree3
throws FilterEvaluationException, FeatureStoreException {
if ( query.getTypeNames() == null || query.getTypeNames().length > 1 ) {
String msg = "Join queries between multiple feature types are currently not supported.";
throw new UnsupportedOperationException( msg );
if ( query.getTypeNames().length == 1 ) {
QName ftName = query.getTypeNames()[0].getFeatureTypeName();
FeatureType ft = schema.getFeatureType( ftName );
if ( ft == null ) {
内容来源于网络,如有侵权,请联系作者删除!