本文整理了Java中org.geotools.data.Query.getHandle
方法的一些代码示例,展示了Query.getHandle
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getHandle
方法的具体详情如下:
包路径:org.geotools.data.Query
类名称:Query
方法名:getHandle
[英]Get the handle (mnemonic name) that will be associated with this Query. The handle is used in logging and error reporting.
[中]获取将与此查询关联的句柄(助记符名称)。句柄用于日志记录和错误报告。
代码示例来源:origin: geoserver/geoserver
DataUtilities.mixQueries(userQuery, securityQuery, userQuery.getHandle()));
代码示例来源:origin: geotools/geotools
public SimpleFeatureCollection subCollection(Filter filter) {
Query q = new Query(getSchema().getTypeName(), filter);
Query subQuery = DataUtilities.mixQueries(query, q, q.getHandle());
return CollectionFeatureSource.this.getFeatures(subQuery);
}
代码示例来源:origin: geotools/geotools
/** Test of getHandle method, of class org.geotools.data.Query. */
public void testHandle() {
// System.out.println("testGetHandle");
Query query = new Query();
assertNull(query.getHandle());
query.setHandle("myquery");
assertEquals("myquery", query.getHandle());
}
代码示例来源:origin: geotools/geotools
@Override
public SimpleFeatureCollection sort(SortBy order) {
Query q = new Query(getSchema().getTypeName());
q.setSortBy(new SortBy[] {order});
Query subQuery = DataUtilities.mixQueries(query, q, q.getHandle());
return CollectionFeatureSource.this.getFeatures(subQuery);
}
}
代码示例来源:origin: geotools/geotools
String handle = query.getHandle();
if (handle == null) {
handle = constraintQuery.getHandle();
} else if (constraintQuery.getHandle() != null) {
handle = handle + "(" + constraintQuery.getHandle() + ")";
代码示例来源:origin: geotools/geotools
/**
* Copy contructor.
*
* @param query the query to copy
*/
public Query(Query query) {
this(
query.getTypeName(),
query.getNamespace(),
query.getFilter(),
query.getMaxFeatures(),
query.getProperties(),
query.getHandle());
this.sortBy = query.getSortBy();
this.coordinateSystem = query.getCoordinateSystem();
this.coordinateSystemReproject = query.getCoordinateSystemReproject();
this.version = query.getVersion();
this.hints = query.getHints();
this.startIndex = query.getStartIndex();
this.alias = query.getAlias();
this.joins = new ArrayList();
for (Join j : query.getJoins()) {
this.joins.add(new Join(j));
}
}
代码示例来源:origin: geotools/geotools
/**
* Copy contructor, clones the state of a generic Query into a DefaultQuery
*
* @param query
*/
public DefaultQuery(Query query) {
this(
query.getTypeName(),
query.getNamespace(),
query.getFilter(),
query.getMaxFeatures(),
query.getProperties(),
query.getHandle());
this.sortBy = query.getSortBy();
this.coordinateSystem = query.getCoordinateSystem();
this.coordinateSystemReproject = query.getCoordinateSystemReproject();
this.version = query.getVersion();
this.hints = query.getHints();
this.startIndex = query.getStartIndex();
this.alias = query.getAlias();
this.joins = query.getJoins();
}
}
代码示例来源:origin: geotools/geotools
newQuery.setCoordinateSystem(query.getCoordinateSystem());
newQuery.setCoordinateSystemReproject(query.getCoordinateSystemReproject());
newQuery.setHandle(query.getHandle());
newQuery.setMaxFeatures(query.getMaxFeatures());
newQuery.setStartIndex(query.getStartIndex());
代码示例来源:origin: geotools/geotools
private Query namedQuery(Query query) {
Query namedQuery =
namedQuery(
query.getFilter(), query.getMaxFeatures(), query instanceof JoiningQuery);
namedQuery.setProperties(query.getProperties());
namedQuery.setCoordinateSystem(query.getCoordinateSystem());
namedQuery.setCoordinateSystemReproject(query.getCoordinateSystemReproject());
namedQuery.setHandle(query.getHandle());
namedQuery.setMaxFeatures(query.getMaxFeatures());
namedQuery.setStartIndex(query.getStartIndex());
namedQuery.setSortBy(query.getSortBy());
namedQuery.setHints(query.getHints());
if (query instanceof JoiningQuery) {
((JoiningQuery) namedQuery).setQueryJoins(((JoiningQuery) query).getQueryJoins());
((JoiningQuery) namedQuery).setRootMapping(((JoiningQuery) query).getRootMapping());
}
return namedQuery;
}
代码示例来源:origin: geotools/geotools
assertEquals("newhandle", mixed.getHandle());
assertEquals("newhandle", mixed.getHandle());
代码示例来源:origin: org.geotools/gt-main
public SimpleFeatureCollection subCollection(Filter filter) {
Query q = new Query(getSchema().getTypeName(), filter);
Query subQuery = DataUtilities.mixQueries(query, q, q.getHandle() );
return CollectionFeatureSource.this.getFeatures( subQuery );
}
@Override
代码示例来源:origin: org.geotools/gt-main
@Override
public SimpleFeatureCollection sort(SortBy order) {
Query q = new Query( getSchema().getTypeName() );
q.setSortBy( new SortBy[]{ order } );
Query subQuery = DataUtilities.mixQueries(query, q, q.getHandle() );
return CollectionFeatureSource.this.getFeatures( subQuery );
}
}
代码示例来源:origin: org.geotools/gt-main
/**
* Ensure query modified with typeName.
* <p>
* This method will make copy of the provided query, using
* DefaultQuery, if query.getTypeName is not equal to
* getSchema().getTypeName().
* </p>
* @param query Original query
* @return Query with getTypeName() equal to getSchema().getTypeName()
*/
protected Query namedQuery( Query query ){
String typeName = getSchema().getTypeName();
if( query.getTypeName() == null ||
!query.getTypeName().equals( typeName )){
return new DefaultQuery(
typeName,
query.getFilter(),
query.getMaxFeatures(),
query.getPropertyNames(),
query.getHandle()
);
}
return query;
}
代码示例来源:origin: org.geotools/gt2-main
/**
* Ensure query modified with typeName.
* <p>
* This method will make copy of the provided query, using
* DefaultQuery, if query.getTypeName is not equal to
* getSchema().getTypeName().
* </p>
* @param query Original query
* @return Query with getTypeName() equal to getSchema().getTypeName()
*/
protected Query namedQuery( Query query ){
String typeName = getSchema().getTypeName();
if( query.getTypeName() == null ||
!query.getTypeName().equals( typeName )){
return new DefaultQuery(
typeName,
query.getFilter(),
query.getMaxFeatures(),
query.getPropertyNames(),
query.getHandle()
);
}
return query;
}
代码示例来源:origin: org.geotools/gt2-main
/**
* Copy contructor, clones the state of a generic Query into a DefaultQuery
* @param query
*/
public DefaultQuery(Query query) {
this(query.getTypeName(), query.getNamespace(), query.getFilter(), query.getMaxFeatures(),
query.getPropertyNames(), query.getHandle());
this.sortBy = query.getSortBy();
this.coordinateSystem = query.getCoordinateSystem();
this.coordinateSystemReproject = query.getCoordinateSystemReproject();
this.version = query.getVersion();
this.hints = query.getHints();
this.startIndex = query.getStartIndex();
}
代码示例来源:origin: org.geotools/gt2-jdbc
} catch (NoSuchElementException nosuch) {
throw new DataSourceException("Problem with "
+ query.getHandle() + " while locking", nosuch);
代码示例来源:origin: org.geotools/gt-main
} catch (NoSuchElementException nosuch) {
throw new DataSourceException("Problem with "
+ query.getHandle() + " while locking", nosuch);
代码示例来源:origin: org.geotools/gt-main
/**
* Copy contructor, clones the state of a generic Query into a DefaultQuery
* @param query
*/
public DefaultQuery(Query query) {
this(query.getTypeName(), query.getNamespace(), query.getFilter(), query.getMaxFeatures(),
query.getProperties(), query.getHandle());
this.sortBy = query.getSortBy();
this.coordinateSystem = query.getCoordinateSystem();
this.coordinateSystemReproject = query.getCoordinateSystemReproject();
this.version = query.getVersion();
this.hints = query.getHints();
this.startIndex = query.getStartIndex();
this.alias = query.getAlias();
this.joins = query.getJoins();
}
代码示例来源:origin: org.geotools/gt-postgis
} catch (NoSuchElementException nosuch) {
throw new DataSourceException("Problem with "
+ query.getHandle() + " while locking", nosuch);
代码示例来源:origin: org.geotools/gt-app-schema
private Query namedQuery(Query query) {
Query namedQuery = namedQuery(query.getFilter(), query.getMaxFeatures(), query instanceof JoiningQuery);
namedQuery.setProperties(query.getProperties());
namedQuery.setCoordinateSystem(query.getCoordinateSystem());
namedQuery.setCoordinateSystemReproject(query.getCoordinateSystemReproject());
namedQuery.setHandle(query.getHandle());
namedQuery.setMaxFeatures(query.getMaxFeatures());
namedQuery.setSortBy(query.getSortBy());
namedQuery.setHints(query.getHints());
if (query instanceof JoiningQuery) {
((JoiningQuery) namedQuery).setQueryJoins(((JoiningQuery) query).getQueryJoins());
}
return namedQuery;
}
内容来源于网络,如有侵权,请联系作者删除!