|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.topicmaps.impl.utils.AbstractTopicMapReader
public abstract class AbstractTopicMapReader
INTERNAL: Common abstract superclass for topic map readers.
Field Summary | |
---|---|
protected LocatorIF |
base_address
|
protected org.xml.sax.InputSource |
source
|
protected TopicMapStoreFactoryIF |
store_factory
|
Constructor Summary | |
---|---|
AbstractTopicMapReader()
|
Method Summary | |
---|---|
LocatorIF |
getBaseAddress()
PUBLIC: Gets the top level base address of the input source. |
org.xml.sax.InputSource |
getInputSource()
PUBLIC: Gets the SAX input source used by the reader. |
TopicMapStoreFactoryIF |
getStoreFactory()
PUBLIC: Gets the store factory which will be used to create stores. |
void |
importInto(TopicMapIF topicmap)
PUBLIC: Imports an implicitly designated topic map into the given topic map. |
static java.io.Reader |
makeReader(org.xml.sax.InputSource source,
EncodingSnifferIF sniffer)
INTERNAL: Creates a correctly configured Reader from a SAX InputSource object. |
static java.io.Reader |
makeReader(java.io.InputStream stream,
java.lang.String encoding,
EncodingSnifferIF sniffer)
|
TopicMapIF |
read()
PUBLIC: Reads the next topic map available from some implicit, implementation dependent source. |
protected abstract TopicMapIF |
read(TopicMapStoreFactoryIF store_factory)
|
java.util.Collection<TopicMapIF> |
readAll()
PUBLIC: Reads all the topic map available from some implicit, implementation dependent source. |
protected java.util.Collection<TopicMapIF> |
readAll(TopicMapStoreFactoryIF store_factory)
|
void |
setBaseAddress(LocatorIF base_address)
PUBLIC: Sets the top level base address of the input source. |
void |
setInputSource(org.xml.sax.InputSource source)
PUBLIC: Sets the SAX input source used by the reader. |
void |
setStoreFactory(TopicMapStoreFactoryIF store_factory)
PUBLIC: Sets the store factory which will be used to create stores. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.xml.sax.InputSource source
protected LocatorIF base_address
protected TopicMapStoreFactoryIF store_factory
Constructor Detail |
---|
public AbstractTopicMapReader()
Method Detail |
---|
public org.xml.sax.InputSource getInputSource()
public void setInputSource(org.xml.sax.InputSource source)
public LocatorIF getBaseAddress()
public void setBaseAddress(LocatorIF base_address)
public TopicMapStoreFactoryIF getStoreFactory()
public void setStoreFactory(TopicMapStoreFactoryIF store_factory)
Default: InMemoryStoreFactory
store_factory
- The store factory to use. If the parameter
is null the default store factory will be used.public TopicMapIF read() throws java.io.IOException
TopicMapReaderIF
null
is returned when there are no more
topic maps available. In a sense this is iterator-like
behaviour.
read
in interface TopicMapReaderIF
java.io.IOException
- Thrown if reading the source fails.public java.util.Collection<TopicMapIF> readAll() throws java.io.IOException
TopicMapReaderIF
readAll
in interface TopicMapReaderIF
java.io.IOException
- Thrown if reading the source fails.protected java.util.Collection<TopicMapIF> readAll(TopicMapStoreFactoryIF store_factory) throws java.io.IOException
java.io.IOException
protected abstract TopicMapIF read(TopicMapStoreFactoryIF store_factory) throws java.io.IOException
java.io.IOException
public void importInto(TopicMapIF topicmap) throws java.io.IOException
TopicMapImporterIF
importInto
in interface TopicMapImporterIF
topicmap
- The topic map into which the import will be done;
an object implementing TopicMapIF.
java.io.IOException
public static java.io.Reader makeReader(org.xml.sax.InputSource source, EncodingSnifferIF sniffer) throws java.io.IOException
java.io.IOException
public static java.io.Reader makeReader(java.io.InputStream stream, java.lang.String encoding, EncodingSnifferIF sniffer) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |