/** * Adds support for a new featureType to MemoryDataStore. * * <p>FeatureTypes are stored by typeName, an IOException will be thrown if the requested * typeName is already in use. * * @param featureType SimpleFeatureType to be added * @throws IOException If featureType already exists * @see org.geotools.data.DataStore#createSchema(org.geotools.feature.SimpleFeatureType) */ public void createSchema(SimpleFeatureType featureType) throws IOException { Name typeName = featureType.getName(); if (entries.containsKey(typeName)) { // we have a conflict throw new IOException(typeName + " already exists"); } MemoryEntry entry = new MemoryEntry(this, featureType); entries.put(typeName, entry); }
MemoryEntry entry = new MemoryEntry(this, schema); entries.put(typeName, entry); return entry;