org.geotools.data.Query.getNamespace()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(176)

本文整理了Java中org.geotools.data.Query.getNamespace方法的一些代码示例,展示了Query.getNamespace的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getNamespace方法的具体详情如下:
包路径:org.geotools.data.Query
类名称:Query
方法名:getNamespace

Query.getNamespace介绍

[英]Get the namespace of the feature type to be queried.
[中]获取要查询的要素类型的命名空间。

代码示例

代码示例来源:origin: geotools/geotools

  1. /**
  2. * Return the name of the type that is queried.
  3. *
  4. * @param query
  5. * @return Name constructed from the query.
  6. */
  7. private Name getName(Query query) {
  8. if (query.getNamespace() == null) {
  9. return Types.typeName(query.getTypeName());
  10. } else {
  11. return Types.typeName(query.getNamespace().toString(), query.getTypeName());
  12. }
  13. }

代码示例来源:origin: geotools/geotools

  1. /**
  2. * Copy contructor.
  3. *
  4. * @param query the query to copy
  5. */
  6. public Query(Query query) {
  7. this(
  8. query.getTypeName(),
  9. query.getNamespace(),
  10. query.getFilter(),
  11. query.getMaxFeatures(),
  12. query.getProperties(),
  13. query.getHandle());
  14. this.sortBy = query.getSortBy();
  15. this.coordinateSystem = query.getCoordinateSystem();
  16. this.coordinateSystemReproject = query.getCoordinateSystemReproject();
  17. this.version = query.getVersion();
  18. this.hints = query.getHints();
  19. this.startIndex = query.getStartIndex();
  20. this.alias = query.getAlias();
  21. this.joins = new ArrayList();
  22. for (Join j : query.getJoins()) {
  23. this.joins.add(new Join(j));
  24. }
  25. }

代码示例来源:origin: geotools/geotools

  1. URI namespace = query.getNamespace();
  2. if (namespace == null || namespace == Query.NO_NAMESPACE) {
  3. namespace = constraintQuery.getNamespace();

代码示例来源:origin: geotools/geotools

  1. /**
  2. * Copy contructor, clones the state of a generic Query into a DefaultQuery
  3. *
  4. * @param query
  5. */
  6. public DefaultQuery(Query query) {
  7. this(
  8. query.getTypeName(),
  9. query.getNamespace(),
  10. query.getFilter(),
  11. query.getMaxFeatures(),
  12. query.getProperties(),
  13. query.getHandle());
  14. this.sortBy = query.getSortBy();
  15. this.coordinateSystem = query.getCoordinateSystem();
  16. this.coordinateSystemReproject = query.getCoordinateSystemReproject();
  17. this.version = query.getVersion();
  18. this.hints = query.getHints();
  19. this.startIndex = query.getStartIndex();
  20. this.alias = query.getAlias();
  21. this.joins = query.getJoins();
  22. }
  23. }

代码示例来源:origin: org.geotools/gt-app-schema

  1. /**
  2. * Return the name of the type that is queried.
  3. *
  4. * @param query
  5. * @return Name constructed from the query.
  6. */
  7. private Name getName(Query query) {
  8. if (query.getNamespace() == null) {
  9. return Types.typeName(query.getTypeName());
  10. } else {
  11. return Types.typeName(query.getNamespace().toString(), query.getTypeName());
  12. }
  13. }

代码示例来源:origin: org.geoserver.csw/gs-csw-api

  1. @Override
  2. public FeatureCollection getRecords(Query q, Transaction t, String outputSchema)
  3. throws IOException {
  4. RecordDescriptor rd;
  5. Name typeName = null;
  6. if (q.getTypeName() == null) {
  7. typeName = CSWRecordDescriptor.RECORD_DESCRIPTOR.getName();
  8. } else if (q.getNamespace() != null) {
  9. typeName = new NameImpl(q.getNamespace().toString(), q.getTypeName());
  10. } else {
  11. typeName = new NameImpl(q.getTypeName());
  12. }
  13. rd = descriptorByType.get(typeName);
  14. RecordDescriptor rdOutput;
  15. if (outputSchema == null || "".equals(outputSchema)) {
  16. rdOutput =
  17. descriptorByOutputSchema.get(
  18. CSWRecordDescriptor.getInstance().getOutputSchema());
  19. } else {
  20. rdOutput = descriptorByOutputSchema.get(outputSchema);
  21. }
  22. if (rd == null) {
  23. throw new IOException(q.getTypeName() + " is not a supported type");
  24. }
  25. if (rdOutput == null) {
  26. throw new IOException(outputSchema + " is not a supported output schema");
  27. }
  28. return getRecordsInternal(rd, rdOutput, q, t);
  29. }

代码示例来源:origin: org.geotools/gt2-main

  1. URI namespace = query.getNamespace();
  2. if (namespace == null || namespace == Query.NO_NAMESPACE) {
  3. namespace = constraintQuery.getNamespace();

代码示例来源:origin: org.geotools/gt-main

  1. URI namespace = query.getNamespace();
  2. if (namespace == null || namespace == Query.NO_NAMESPACE) {
  3. namespace = constraintQuery.getNamespace();

代码示例来源:origin: org.geotools/gt2-main

  1. /**
  2. * Copy contructor, clones the state of a generic Query into a DefaultQuery
  3. * @param query
  4. */
  5. public DefaultQuery(Query query) {
  6. this(query.getTypeName(), query.getNamespace(), query.getFilter(), query.getMaxFeatures(),
  7. query.getPropertyNames(), query.getHandle());
  8. this.sortBy = query.getSortBy();
  9. this.coordinateSystem = query.getCoordinateSystem();
  10. this.coordinateSystemReproject = query.getCoordinateSystemReproject();
  11. this.version = query.getVersion();
  12. this.hints = query.getHints();
  13. this.startIndex = query.getStartIndex();
  14. }

代码示例来源:origin: org.geotools/gt-main

  1. /**
  2. * Copy contructor, clones the state of a generic Query into a DefaultQuery
  3. * @param query
  4. */
  5. public DefaultQuery(Query query) {
  6. this(query.getTypeName(), query.getNamespace(), query.getFilter(), query.getMaxFeatures(),
  7. query.getProperties(), query.getHandle());
  8. this.sortBy = query.getSortBy();
  9. this.coordinateSystem = query.getCoordinateSystem();
  10. this.coordinateSystemReproject = query.getCoordinateSystemReproject();
  11. this.version = query.getVersion();
  12. this.hints = query.getHints();
  13. this.startIndex = query.getStartIndex();
  14. this.alias = query.getAlias();
  15. this.joins = query.getJoins();
  16. }

相关文章