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

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

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

Query.retrieveAllProperties介绍

[英]Convenience method to determine if the query should retrieve all properties defined in the schema of the feature data source. This is equivalent to testing if #getPropertyNames() returns #ALL_NAMES.
[中]确定查询是否应检索要素数据源模式中定义的所有特性的便捷方法。这相当于测试#getPropertyNames()是否返回#ALL_名称。

代码示例

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

  1. String[] propNames = null;
  2. if (query.retrieveAllProperties()) {
  3. List<String> props = new ArrayList();

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

  1. String[] propNames = null;
  2. if (query.retrieveAllProperties()) {
  3. propNames = new String[schema.getAttributeCount()];

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

  1. /** Test of retrieveAllProperties method, of class org.geotools.data.Query. */
  2. public void testRetrieveAllProperties() {
  3. // System.out.println("testRetrieveAllProperties");
  4. Query query = new Query();
  5. assertTrue(query.retrieveAllProperties());
  6. query.setPropertyNames(new String[] {"foo", "bar"});
  7. assertFalse(query.retrieveAllProperties());
  8. query.setPropertyNames(Query.ALL_NAMES);
  9. assertTrue(query.retrieveAllProperties());
  10. query.setProperties(Query.ALL_PROPERTIES);
  11. assertTrue(query.retrieveAllProperties());
  12. query.setPropertyNames(new String[] {"foo", "bar"});
  13. query.setProperties(Query.ALL_PROPERTIES);
  14. assertTrue(query.retrieveAllProperties());
  15. }

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

  1. public SimpleFeatureType getQueryType(Query query) throws IOException {
  2. final String typeName = query.getTypeName();
  3. final String propertyNames[] = query.getPropertyNames();
  4. final FeatureTypeInfo typeInfo = typeInfoCache.getFeatureTypeInfo(typeName);
  5. final SimpleFeatureType completeSchema = typeInfo.getFeatureType();
  6. SimpleFeatureType featureType = completeSchema;
  7. if (!query.retrieveAllProperties() || query.getCoordinateSystem() != null) {
  8. try {
  9. featureType =
  10. DataUtilities.createSubType(
  11. featureType, propertyNames, query.getCoordinateSystem());
  12. } catch (SchemaException e) {
  13. LOGGER.log(Level.FINEST, e.getMessage(), e);
  14. throw new DataSourceException("Could not create Feature Type for query", e);
  15. }
  16. }
  17. return featureType;
  18. }

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

  1. && (retrieveAllProperties() == other.retrieveAllProperties())
  2. && (getMaxFeatures() == other.getMaxFeatures())
  3. && ((getFilter() == null)

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

  1. && (retrieveAllProperties() == other.retrieveAllProperties())
  2. && (getMaxFeatures() == other.getMaxFeatures())
  3. && ((getFilter() == null)

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

  1. && (retrieveAllProperties() == other.retrieveAllProperties())
  2. && (getMaxFeatures() == other.getMaxFeatures())
  3. && ((getFilter() == null)

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

  1. if (query.retrieveAllProperties()) { // we can use the originalType as is
  2. schema = featureSource.getSchema();
  3. } else {

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

  1. AttributeDescriptor[] schemaTypes = (AttributeDescriptor[]) getSchema().getAttributeDescriptors().toArray(new AttributeDescriptor[getSchema().getAttributeDescriptors().size()]);
  2. if (query.retrieveAllProperties()) {
  3. return schemaTypes;
  4. } else {

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

  1. String[] propNames = null;
  2. if (query.retrieveAllProperties()) {
  3. propNames = new String[schema.getAttributeCount()];

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

  1. String[] propNames = null;
  2. if (query.retrieveAllProperties()) {
  3. propNames = new String[schema.getAttributeCount()];

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

  1. public SimpleFeatureType getQueryType(Query query) throws IOException {
  2. final String typeName = query.getTypeName();
  3. final String propertyNames[] = query.getPropertyNames();
  4. final FeatureTypeInfo typeInfo = typeInfoCache.getFeatureTypeInfo(typeName);
  5. final SimpleFeatureType completeSchema = typeInfo.getFeatureType();
  6. SimpleFeatureType featureType = completeSchema;
  7. if (!query.retrieveAllProperties() || query.getCoordinateSystem() != null) {
  8. try {
  9. featureType = DataUtilities.createSubType(featureType, propertyNames,
  10. query.getCoordinateSystem());
  11. } catch (SchemaException e) {
  12. LOGGER.log(Level.FINEST, e.getMessage(), e);
  13. throw new DataSourceException("Could not create Feature Type for query", e);
  14. }
  15. }
  16. return featureType;
  17. }

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

  1. && (retrieveAllProperties() == other.retrieveAllProperties())
  2. && (getMaxFeatures() == other.getMaxFeatures())
  3. && ((getFilter() == null) ? (other.getFilter() == null)

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

  1. && (retrieveAllProperties() == other.retrieveAllProperties())
  2. && (getMaxFeatures() == other.getMaxFeatures())
  3. && ((getFilter() == null) ? (other.getFilter() == null)

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

  1. && (retrieveAllProperties() == other.retrieveAllProperties())
  2. && (getMaxFeatures() == other.getMaxFeatures())
  3. && ((getFilter() == null) ? (other.getFilter() == null)

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

  1. /**
  2. * Get propertyNames in a safe manner.
  3. *
  4. * <p>
  5. * Method will figure out names from the schema for query.getTypeName(), if
  6. * query getPropertyNames() is <code>null</code>, or
  7. * query.retrieveAllProperties is <code>true</code>.
  8. * </p>
  9. *
  10. * @param query
  11. *
  12. *
  13. * @throws IOException
  14. */
  15. protected String[] propertyNames(Query query) throws IOException {
  16. String[] names = query.getPropertyNames();
  17. if ((names == null) || query.retrieveAllProperties()) {
  18. String typeName = query.getTypeName();
  19. FeatureType schema = getSchema(typeName);
  20. names = new String[schema.getAttributeCount()];
  21. for (int i = 0; i < schema.getAttributeCount(); i++) {
  22. names[i] = schema.getAttributeType(i).getName();
  23. }
  24. }
  25. return names;
  26. }

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

  1. if (query.retrieveAllProperties()) { // we can use the originalType as is
  2. schema = featureSource.getSchema();
  3. } else {

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

  1. SimpleFeatureType schemaNew = schema;
  2. if(!query.retrieveAllProperties()) {
  3. try {
  4. schemaNew = DataUtilities.createSubType(schema, query.getPropertyNames());

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

  1. if (!query.retrieveAllProperties()) {
  2. try {
  3. schemaNew = DataUtilities.createSubType(schema, query.getPropertyNames());

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

  1. if (query.retrieveAllProperties()) { // we can use the origionalType as is
  2. schema = featureSource.getSchema();
  3. } else {

相关文章