String[] propNames = null; if (query.retrieveAllProperties()) { List<String> props = new ArrayList();
String[] propNames = null; if (query.retrieveAllProperties()) { propNames = new String[schema.getAttributeCount()];
/** Test of retrieveAllProperties method, of class org.geotools.data.Query. */ public void testRetrieveAllProperties() { // System.out.println("testRetrieveAllProperties"); Query query = new Query(); assertTrue(query.retrieveAllProperties()); query.setPropertyNames(new String[] {"foo", "bar"}); assertFalse(query.retrieveAllProperties()); query.setPropertyNames(Query.ALL_NAMES); assertTrue(query.retrieveAllProperties()); query.setProperties(Query.ALL_PROPERTIES); assertTrue(query.retrieveAllProperties()); query.setPropertyNames(new String[] {"foo", "bar"}); query.setProperties(Query.ALL_PROPERTIES); assertTrue(query.retrieveAllProperties()); }
public SimpleFeatureType getQueryType(Query query) throws IOException { final String typeName = query.getTypeName(); final String propertyNames[] = query.getPropertyNames(); final FeatureTypeInfo typeInfo = typeInfoCache.getFeatureTypeInfo(typeName); final SimpleFeatureType completeSchema = typeInfo.getFeatureType(); SimpleFeatureType featureType = completeSchema; if (!query.retrieveAllProperties() || query.getCoordinateSystem() != null) { try { featureType = DataUtilities.createSubType( featureType, propertyNames, query.getCoordinateSystem()); } catch (SchemaException e) { LOGGER.log(Level.FINEST, e.getMessage(), e); throw new DataSourceException("Could not create Feature Type for query", e); } } return featureType; }
&& (retrieveAllProperties() == other.retrieveAllProperties()) && (getMaxFeatures() == other.getMaxFeatures()) && ((getFilter() == null)
&& (retrieveAllProperties() == other.retrieveAllProperties()) && (getMaxFeatures() == other.getMaxFeatures()) && ((getFilter() == null)
&& (retrieveAllProperties() == other.retrieveAllProperties()) && (getMaxFeatures() == other.getMaxFeatures()) && ((getFilter() == null)
if (query.retrieveAllProperties()) { // we can use the originalType as is schema = featureSource.getSchema(); } else {
AttributeDescriptor[] schemaTypes = (AttributeDescriptor[]) getSchema().getAttributeDescriptors().toArray(new AttributeDescriptor[getSchema().getAttributeDescriptors().size()]); if (query.retrieveAllProperties()) { return schemaTypes; } else {
String[] propNames = null; if (query.retrieveAllProperties()) { propNames = new String[schema.getAttributeCount()];
String[] propNames = null; if (query.retrieveAllProperties()) { propNames = new String[schema.getAttributeCount()];
public SimpleFeatureType getQueryType(Query query) throws IOException { final String typeName = query.getTypeName(); final String propertyNames[] = query.getPropertyNames(); final FeatureTypeInfo typeInfo = typeInfoCache.getFeatureTypeInfo(typeName); final SimpleFeatureType completeSchema = typeInfo.getFeatureType(); SimpleFeatureType featureType = completeSchema; if (!query.retrieveAllProperties() || query.getCoordinateSystem() != null) { try { featureType = DataUtilities.createSubType(featureType, propertyNames, query.getCoordinateSystem()); } catch (SchemaException e) { LOGGER.log(Level.FINEST, e.getMessage(), e); throw new DataSourceException("Could not create Feature Type for query", e); } } return featureType; }
&& (retrieveAllProperties() == other.retrieveAllProperties()) && (getMaxFeatures() == other.getMaxFeatures()) && ((getFilter() == null) ? (other.getFilter() == null)
&& (retrieveAllProperties() == other.retrieveAllProperties()) && (getMaxFeatures() == other.getMaxFeatures()) && ((getFilter() == null) ? (other.getFilter() == null)
&& (retrieveAllProperties() == other.retrieveAllProperties()) && (getMaxFeatures() == other.getMaxFeatures()) && ((getFilter() == null) ? (other.getFilter() == null)
/** * Get propertyNames in a safe manner. * * <p> * Method will figure out names from the schema for query.getTypeName(), if * query getPropertyNames() is <code>null</code>, or * query.retrieveAllProperties is <code>true</code>. * </p> * * @param query * * * @throws IOException */ protected String[] propertyNames(Query query) throws IOException { String[] names = query.getPropertyNames(); if ((names == null) || query.retrieveAllProperties()) { String typeName = query.getTypeName(); FeatureType schema = getSchema(typeName); names = new String[schema.getAttributeCount()]; for (int i = 0; i < schema.getAttributeCount(); i++) { names[i] = schema.getAttributeType(i).getName(); } } return names; }
if (query.retrieveAllProperties()) { // we can use the originalType as is schema = featureSource.getSchema(); } else {
SimpleFeatureType schemaNew = schema; if(!query.retrieveAllProperties()) { try { schemaNew = DataUtilities.createSubType(schema, query.getPropertyNames());
if (!query.retrieveAllProperties()) { try { schemaNew = DataUtilities.createSubType(schema, query.getPropertyNames());
if (query.retrieveAllProperties()) { // we can use the origionalType as is schema = featureSource.getSchema(); } else {