com.facetmap.simple
Class DelimitedTextParser
java.lang.Object
com.facetmap.simple.DelimitedTextParser
- All Implemented Interfaces:
- Parser
- public abstract class DelimitedTextParser
- extends java.lang.Object
- implements Parser
This Parser implementation recognizes a data
format that was the first format ever used to express a FacetMap map.
It's still a convenient, though restrictive, way to author maps
by hand very quickly.
We assume that a SimpleResourceSpace is sufficient for your text-parsing
needs, so this package provides no interface for parsing other types
of Resource.
|
Method Summary |
abstract Map |
createMap()
The class will call this method when it needs a Map object. |
Map |
parse(java.io.BufferedReader r)
Creates a Map from FacetMap plaintext format. |
java.lang.String |
parseTaxonomy(java.io.BufferedReader r)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
map
protected Map map
fSpace
protected FacetSpace fSpace
rSpace
protected SimpleResourceSpace rSpace
taxCount
protected int taxCount
DelimitedTextParser
public DelimitedTextParser()
createMap
public abstract Map createMap()
throws DataException,
InternalException
- The class will call this method when it needs a Map object.
Map factories will typically subclass this class and tell it
how to make a Map, then call this class's parse() method.
- Throws:
DataException
InternalException
parse
public Map parse(java.io.BufferedReader r)
throws java.io.IOException,
DataException,
InternalException
- Creates a Map from FacetMap plaintext format.
- Specified by:
parse in interface Parser
- Throws:
java.io.IOException
DataException
InternalException
parseTaxonomy
public java.lang.String parseTaxonomy(java.io.BufferedReader r)
throws java.io.IOException,
DataException
- Throws:
java.io.IOException
DataException