Class GSShapefileDatastoreEncoder
- java.lang.Object
-
- it.geosolutions.geoserver.rest.encoder.utils.XmlElement
-
- it.geosolutions.geoserver.rest.encoder.utils.PropertyXMLEncoder
-
- it.geosolutions.geoserver.rest.encoder.GSAbstractStoreEncoder
-
- it.geosolutions.geoserver.rest.encoder.datastore.GSAbstractDatastoreEncoder
-
- it.geosolutions.geoserver.rest.encoder.datastore.GSShapefileDatastoreEncoder
-
- Direct Known Subclasses:
GSDirectoryOfShapefilesDatastoreEncoder
public class GSShapefileDatastoreEncoder extends GSAbstractDatastoreEncoder
Encoder for a "Shapefile" datastore.- Version:
- $Id: $
- Author:
- Oscar Fonts
-
-
Constructor Summary
Constructors Constructor Description GSShapefileDatastoreEncoder(RESTDataStore store)Create a "Shapefile" datastore encoder from an existing store read from server.GSShapefileDatastoreEncoder(java.lang.String name, java.net.URL url)Create a "Shapefile" datastore with default connection parameters, given a store name and a url (the store location).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetCacheAndReuseMemoryMaps()getCacheAndReuseMemoryMapsjava.nio.charset.CharsetgetCharset()getCharsetbooleangetCreateSpatialIndex()getCreateSpatialIndexbooleangetMemoryMappedBuffer()getMemoryMappedBufferjava.net.URLgetUrl()getUrlprotected java.lang.StringgetValidType()getValidTypevoidsetCacheAndReuseMemoryMaps(boolean cacheAndReuseMemoryMaps)setCacheAndReuseMemoryMapsvoidsetCharset(java.nio.charset.Charset charset)setCharsetvoidsetCreateSpatialIndex(boolean createSpatialIndex)setCreateSpatialIndexvoidsetMemoryMappedBuffer(boolean memoryMappedBuffer)setMemoryMappedBuffervoidsetUrl(java.net.URL url)setUrl-
Methods inherited from class it.geosolutions.geoserver.rest.encoder.GSAbstractStoreEncoder
ensureValidName, ensureValidType, getDescription, getEnabled, getName, getStoreType, getType, setDescription, setEnabled, setName, setType
-
Methods inherited from class it.geosolutions.geoserver.rest.encoder.utils.PropertyXMLEncoder
add, get, get, set
-
Methods inherited from class it.geosolutions.geoserver.rest.encoder.utils.XmlElement
add, addContent, getRoot, isEmpty, remove, set, setRoot, setRoot, toString
-
-
-
-
Constructor Detail
-
GSShapefileDatastoreEncoder
public GSShapefileDatastoreEncoder(java.lang.String name, java.net.URL url)Create a "Shapefile" datastore with default connection parameters, given a store name and a url (the store location). The following default connection parameters are set:- enabled: true
- charset: "ISO-8859-1"
- create spatial index: true
- memory mapped buffer: false
- cache and reuse memory maps: true
- Parameters:
name- New datastore nameurl- The shapefile location in the server, relative to $GEOSERVER_DATA_DIR.
-
GSShapefileDatastoreEncoder
public GSShapefileDatastoreEncoder(RESTDataStore store)
Create a "Shapefile" datastore encoder from an existing store read from server.- Parameters:
store- The existing store.- Throws:
java.lang.IllegalArgumentException- if store type or mandatory parameters are not valid
-
-
Method Detail
-
setUrl
public void setUrl(java.net.URL url)
setUrl
- Parameters:
url- aURLobject.
-
getUrl
public java.net.URL getUrl()
getUrl
- Returns:
- a
URLobject.
-
setCharset
public void setCharset(java.nio.charset.Charset charset)
setCharset
- Parameters:
charset- aCharsetobject.
-
getCharset
public java.nio.charset.Charset getCharset()
getCharset
- Returns:
- a
Charsetobject.
-
setCreateSpatialIndex
public void setCreateSpatialIndex(boolean createSpatialIndex)
setCreateSpatialIndex
- Parameters:
createSpatialIndex- a boolean.
-
getCreateSpatialIndex
public boolean getCreateSpatialIndex()
getCreateSpatialIndex
- Returns:
- a boolean.
-
setMemoryMappedBuffer
public void setMemoryMappedBuffer(boolean memoryMappedBuffer)
setMemoryMappedBuffer
- Parameters:
memoryMappedBuffer- a boolean.
-
getMemoryMappedBuffer
public boolean getMemoryMappedBuffer()
getMemoryMappedBuffer
- Returns:
- a boolean.
-
setCacheAndReuseMemoryMaps
public void setCacheAndReuseMemoryMaps(boolean cacheAndReuseMemoryMaps)
setCacheAndReuseMemoryMaps
- Parameters:
cacheAndReuseMemoryMaps- a boolean.
-
getCacheAndReuseMemoryMaps
public boolean getCacheAndReuseMemoryMaps()
getCacheAndReuseMemoryMaps
- Returns:
- a boolean.
-
getValidType
protected java.lang.String getValidType()
getValidType
- Specified by:
getValidTypein classGSAbstractDatastoreEncoder- Returns:
- "Shapefile"
-
-