本文整理了Java中org.geotools.data.Query.getVersion
方法的一些代码示例,展示了Query.getVersion
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getVersion
方法的具体详情如下:
包路径:org.geotools.data.Query
类名称:Query
方法名:getVersion
[英]Defines version or version range requested.
From WFS Spec: The version attribute is included in order to accommodate systems that support feature versioning. A value of #ALLindicates that all versions of a feature should be fetched. Otherwise an integer, n, can be specified to return the n th version of a feature. The version numbers start at '1' which is the oldest version. If a version value larger than the largest version is specified then the latest version is return. The default action shall be for the query to return the latest version. Systems that do not support versioning can ignore the parameter and return the only version that they have.
GeoTools employs the following options:
代码示例来源:origin: geotools/geotools
/**
* Hashcode based on all parameters other than the handle.
*
* @return hascode for this Query
*/
@Override
public int hashCode() {
String[] n = getPropertyNames();
return ((n == null) ? (-1) : ((n.length == 0) ? 0 : (n.length | n[0].hashCode())))
| getMaxFeatures()
| ((getFilter() == null) ? 0 : getFilter().hashCode())
| ((getTypeName() == null) ? 0 : getTypeName().hashCode())
| ((getVersion() == null) ? 0 : getVersion().hashCode())
| ((getCoordinateSystem() == null) ? 0 : getCoordinateSystem().hashCode())
| ((getCoordinateSystemReproject() == null)
? 0
: getCoordinateSystemReproject().hashCode())
| getStartIndex();
}
代码示例来源:origin: geotools/geotools
/** Test of getVersion method, of class org.geotools.data.Query. */
public void testVersion() {
// System.out.println("testGetVersion");
Query query = new Query();
assertNull(query.getVersion());
}
代码示例来源:origin: geotools/geotools
? (other.getTypeName() == null)
: getTypeName().equals(other.getTypeName()))
&& ((getVersion() == null)
? (other.getVersion() == null)
: getVersion().equals(other.getVersion()))
&& ((getCoordinateSystem() == null)
? (other.getCoordinateSystem() == null)
代码示例来源:origin: geotools/geotools
if (firstQuery.getVersion() != null) {
if (secondQuery.getVersion() != null
&& !secondQuery.getVersion().equals(firstQuery.getVersion()))
throw new IllegalArgumentException(
"First and second query refer different versions");
version = firstQuery.getVersion();
} else {
version = secondQuery.getVersion();
代码示例来源:origin: geotools/geotools
: getTypeName().equals(other.getTypeName()))
&& ((getVersion() == null)
? (other.getVersion() == null)
: getVersion().equals(other.getVersion()))
&& ((getCoordinateSystem() == null)
? (other.getCoordinateSystem() == null)
代码示例来源:origin: geotools/geotools
: getTypeName().equals(other.getTypeName()))
&& ((getVersion() == null)
? (other.getVersion() == null)
: getVersion().equals(other.getVersion()))
&& ((getCoordinateSystem() == null)
? (other.getCoordinateSystem() == null)
代码示例来源: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: org.geotools/gt2-main
if(firstQuery.getVersion() != null) {
if(secondQuery.getVersion() != null && !secondQuery.getVersion().equals(firstQuery.getVersion()))
throw new IllegalArgumentException("First and second query refer different versions");
version = firstQuery.getVersion();
} else {
version = secondQuery.getVersion();
代码示例来源:origin: org.geotools/gt2-api
&& ((getTypeName() == null) ? (other.getTypeName() == null)
: getTypeName().equals(other.getTypeName()))
&& ((getVersion() == null) ? (other.getVersion() == null)
: getVersion().equals(other.getVersion()))
&& ((getCoordinateSystem() == null) ? (other.getCoordinateSystem() == null)
: getCoordinateSystem()
代码示例来源:origin: org.geotools/gt2-main
&& ((getTypeName() == null) ? (other.getTypeName() == null)
: getTypeName().equals(other.getTypeName()))
&& ((getVersion() == null) ? (other.getVersion() == null)
: getVersion().equals(other.getVersion()))
&& ((getCoordinateSystem() == null) ? (other.getCoordinateSystem() == null)
: getCoordinateSystem().equals(other.getCoordinateSystem()))
代码示例来源:origin: org.geotools/gt2-api
&& ((getTypeName() == null) ? (other.getTypeName() == null)
: getTypeName().equals(other.getTypeName()))
&& ((getVersion() == null) ? (other.getVersion() == null)
: getVersion().equals(other.getVersion()))
&& ((getCoordinateSystem() == null) ? (other.getCoordinateSystem() == null)
: getCoordinateSystem()
代码示例来源:origin: org.geotools/gt-wfs
if ((query.getVersion() != null)
&& !"".equals(query.getVersion())) {
attributes.addAttribute(WFSSchema.NAMESPACE.toString(),
attrs[2].getName(), null, "string",
query.getVersion());
代码示例来源:origin: org.geotools/gt-main
if (firstQuery.getVersion() != null) {
if (secondQuery.getVersion() != null
&& !secondQuery.getVersion().equals(firstQuery.getVersion()))
throw new IllegalArgumentException(
"First and second query refer different versions");
version = firstQuery.getVersion();
} else {
version = secondQuery.getVersion();
代码示例来源:origin: org.geotools/gt2-postgis-versioned
/**
* Given an original query and a revision info, builds an equivalent query that will work
* against the specified revision
*
* @param query
* @param ri
* @return
* @throws FactoryConfigurationError
* @throws IOException
*/
DefaultQuery buildVersionedQuery(Query query) throws IOException {
RevisionInfo ri = new RevisionInfo(query.getVersion());
// build a filter that limits the number
Filter newFilter = buildVersionedFilter(query.getTypeName(), query.getFilter(), ri);
DefaultQuery versionedQuery = new DefaultQuery(query);
versionedQuery.setPropertyNames(filterPropertyNames(query));
versionedQuery.setFilter(newFilter);
return versionedQuery;
}
代码示例来源: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/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();
}
内容来源于网络,如有侵权,请联系作者删除!