private static FeatureFactory getFeatureFactory() { if (featureFactory == null) featureFactory = CommonFactoryFinder.getFeatureFactory(null); return featureFactory; }
public ComplexFeatureBuilder(FeatureType featureType) { this(featureType, CommonFactoryFinder.getFeatureFactory(null)); }
public SimpleFeatureBuilder(SimpleFeatureType featureType) { this(featureType, CommonFactoryFinder.getFeatureFactory(null)); }
public ComplexFeatureBuilder(AttributeDescriptor ad) { this(ad, CommonFactoryFinder.getFeatureFactory(null)); }
Hints.putSystemDefault(Hints.FEATURE_FACTORY, CommonFactoryFinder.getFeatureFactory(null));
public WFSDataStore(final WFSClient client) { this.client = client; this.names = new ConcurrentHashMap<Name, QName>(); this.remoteFeatureTypes = new ConcurrentHashMap<QName, FeatureType>(); this.storedQueryDescriptionTypes = new ConcurrentHashMap<String, StoredQueryDescriptionType>(); this.storedQueryDescriptionTypesLock = new ReentrantReadWriteLock(); // default factories setFilterFactory(CommonFactoryFinder.getFilterFactory(null)); setGeometryFactory(new GeometryFactory(PackedCoordinateSequenceFactory.DOUBLE_FACTORY)); setFeatureTypeFactory(new FeatureTypeFactoryImpl()); setFeatureFactory(CommonFactoryFinder.getFeatureFactory(null)); }
public void testGetFeatureFactory() { assertNotNull(CommonFactoryFinder.getFeatureFactory(null)); }
public PropertyDataStore(File dir, String namespaceURI) { if (!dir.isDirectory()) { throw new IllegalArgumentException(dir + " is not a directory"); } if (namespaceURI == null) { namespaceURI = dir.getName(); } this.dir = dir; setNamespaceURI(namespaceURI); // factories setFilterFactory(CommonFactoryFinder.getFilterFactory(null)); setGeometryFactory(new GeometryFactory()); setFeatureTypeFactory(new FeatureTypeFactoryImpl()); setFeatureFactory(CommonFactoryFinder.getFeatureFactory(null)); } // constructor end
public void testGetDefaultFeatureFactory() { FeatureFactory featureFactory = CommonFactoryFinder.getFeatureFactory(null); assertNotNull(featureFactory); assertTrue(featureFactory instanceof AbstractFeatureFactoryImpl); }
FeatureFactory ff = CommonFactoryFinder.getFeatureFactory(null); Collection<Property> value = new ArrayList<Property>();
public void testGetValidatingFeatureFactory() { Hints hints = new Hints(Hints.FEATURE_FACTORY, ValidatingFeatureFactoryImpl.class); FeatureFactory featureFactory = CommonFactoryFinder.getFeatureFactory(hints); assertNotNull(featureFactory); assertTrue(featureFactory instanceof ValidatingFeatureFactoryImpl); } }
private static FeatureFactory getFeatureFactory() { if(featureFactory == null) featureFactory = CommonFactoryFinder.getFeatureFactory(null); return featureFactory; }
public SimpleFeatureBuilder(SimpleFeatureType featureType) { this(featureType, CommonFactoryFinder.getFeatureFactory(null)); }
store.setFeatureFactory(CommonFactoryFinder.getFeatureFactory(null));
dataStore.setGeometryFactory(new GeometryFactory()); dataStore.setFeatureTypeFactory(new FeatureTypeFactoryImpl()); dataStore.setFeatureFactory(CommonFactoryFinder.getFeatureFactory(null)); dataStore.setDataStoreFactory(this);
new GeometryFactory(PackedCoordinateSequenceFactory.DOUBLE_FACTORY)); dataStore.setFeatureTypeFactory(new FeatureTypeFactoryImpl()); dataStore.setFeatureFactory(CommonFactoryFinder.getFeatureFactory(null)); dataStore.setDataStoreFactory(this); dataStore.setNamespaceURI(config.getNamespaceOverride());
public WFSDataStore(final WFSClient client) { this.client = client; this.names = new ConcurrentHashMap<Name, QName>(); this.remoteFeatureTypes = new ConcurrentHashMap<QName, FeatureType>(); this.storedQueryDescriptionTypes = new ConcurrentHashMap<String, StoredQueryDescriptionType>(); this.storedQueryDescriptionTypesLock = new ReentrantReadWriteLock(); // default factories setFilterFactory(CommonFactoryFinder.getFilterFactory(null)); setGeometryFactory(new GeometryFactory(PackedCoordinateSequenceFactory.DOUBLE_FACTORY)); setFeatureTypeFactory(new FeatureTypeFactoryImpl()); setFeatureFactory(CommonFactoryFinder.getFeatureFactory(null)); }
/** * Create a non-simple template feature from feature type schema * * @param schema the feature type * @return a template feature */ public static Feature templateFeature(FeatureType schema) { FeatureFactory ff = CommonFactoryFinder.getFeatureFactory(null); Collection<Property> value = new ArrayList<Property>(); for (PropertyDescriptor pd : schema.getDescriptors()) { if (pd instanceof AttributeDescriptor) { if (pd instanceof GeometryDescriptor) { value.add(new GeometryAttributeImpl (((AttributeDescriptor) pd).getDefaultValue(), (GeometryDescriptor) pd, null) ); } else { value.add(new AttributeImpl (((AttributeDescriptor) pd).getDefaultValue(), (AttributeDescriptor) pd, null) ); } } } return ff.createFeature(value, (FeatureType) schema, SimpleFeatureBuilder.createDefaultFeatureId()); }
@Override protected void mapPropertiesToComplex(ComplexFeatureBuilder builder, SimpleFeature fi) { // basic mappings super.mapPropertiesToComplex(builder, fi); // quicklook extraction Object metadataValue = fi.getAttribute("quicklook"); if (metadataValue instanceof SimpleFeature) { SimpleFeature quicklookFeature = (SimpleFeature) metadataValue; AttributeBuilder ab = new AttributeBuilder(CommonFactoryFinder.getFeatureFactory(null)); ab.setDescriptor( (AttributeDescriptor) schema.getDescriptor(OpenSearchAccess.QUICKLOOK_PROPERTY_NAME)); Attribute attribute = ab.buildSimple(null, quicklookFeature.getAttribute("thumb")); builder.append(OpenSearchAccess.QUICKLOOK_PROPERTY_NAME, attribute); } }
dataStore.setGeometryFactory(new GeometryFactory()); dataStore.setFeatureTypeFactory(new FeatureTypeFactoryImpl()); dataStore.setFeatureFactory(CommonFactoryFinder.getFeatureFactory(null));