public abstract class GMLMapFormat extends java.lang.Object implements MapFormat
Constructor and Description |
---|
GMLMapFormat() |
Modifier and Type | Method and Description |
---|---|
boolean |
canRead(java.io.File file)
Find out if a file looks valid to this format.
|
protected abstract java.util.Map<java.lang.String,java.lang.String> |
getNamespaces()
Get the uris and preferred prefixes for all namespaces this format cares about.
|
protected abstract boolean |
isCorrectRootElement(java.lang.String uri,
java.lang.String localName)
Find out if the root element is correct for this format type.
|
protected abstract GMLMap |
read(org.dom4j.Document doc)
Read a Document and return a GMLMap.
|
GMLMap |
read(java.io.File file)
Read a File and return a Map.
|
GMLMap |
read(java.io.Reader reader)
Read a GMLMap from a Reader.
|
protected abstract org.dom4j.Document |
write(GMLMap map)
Turn a GMLMap into an xml document.
|
void |
write(Map map,
java.io.File file)
Write a map to a file.
|
public GMLMap read(java.io.File file) throws MapException
MapFormat
read
in interface MapFormat
file
- The file to read.MapException
- If there is a problem reading the map.public void write(Map map, java.io.File file) throws MapException
MapFormat
write
in interface MapFormat
map
- The map to write.file
- The file to write to.MapException
- If there is a problem writing the map.public boolean canRead(java.io.File file) throws MapException
MapFormat
canRead
in interface MapFormat
file
- The file to check.MapException
- If there is a problem reading the file.public GMLMap read(java.io.Reader reader) throws org.dom4j.DocumentException, MapException
reader
- The Reader to read.org.dom4j.DocumentException
- If there is a problem parsing the XML.MapException
- If there is a problem reading the map.protected abstract boolean isCorrectRootElement(java.lang.String uri, java.lang.String localName)
uri
- The URI of the root element.localName
- The local name of the root element.protected abstract GMLMap read(org.dom4j.Document doc) throws MapException
doc
- The document to read.MapException
- If there is a problem reading the map.protected abstract org.dom4j.Document write(GMLMap map)
map
- The map to write.protected abstract java.util.Map<java.lang.String,java.lang.String> getNamespaces()