public abstract class AbstractTopicMapReader extends Object implements TopicMapReaderIF
| Modifier and Type | Field and Description |
|---|---|
protected LocatorIF |
base_address |
protected Reader |
reader |
protected TopicMapStoreFactoryIF |
store_factory |
protected InputStream |
stream |
protected URL |
url |
| Constructor and Description |
|---|
AbstractTopicMapReader(File file) |
AbstractTopicMapReader(InputStream stream,
LocatorIF base_address) |
AbstractTopicMapReader(Reader reader,
LocatorIF base_address) |
AbstractTopicMapReader(URL url) |
AbstractTopicMapReader(URL url,
LocatorIF base_address) |
| Modifier and Type | Method and Description |
|---|---|
LocatorIF |
getBaseAddress()
PUBLIC: Gets the top level base address of the input source.
|
Reader |
getReader() |
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 Reader |
makeReader(InputStream stream,
String encoding,
EncodingSnifferIF sniffer) |
static Reader |
makeReader(LocatorIF locator,
EncodingSnifferIF sniffer) |
protected Reader |
makeReader(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) |
Collection<TopicMapIF> |
readAll()
PUBLIC: Reads all the topic map available from some implicit,
implementation dependent source.
|
protected Collection<TopicMapIF> |
readAll(TopicMapStoreFactoryIF store_factory) |
void |
setAdditionalProperties(Map<String,Object> properties)
Default implemenentation does not accept any additional properties
|
void |
setBaseAddress(LocatorIF base_address)
PUBLIC: Sets the top level base address of the input source.
|
void |
setReader(Reader reader) |
void |
setStoreFactory(TopicMapStoreFactoryIF store_factory)
PUBLIC: Sets the store factory which will be used to create stores.
|
protected URL url
protected Reader reader
protected InputStream stream
protected LocatorIF base_address
protected TopicMapStoreFactoryIF store_factory
public AbstractTopicMapReader(URL url) throws MalformedURLException
MalformedURLExceptionpublic AbstractTopicMapReader(InputStream stream, LocatorIF base_address)
public AbstractTopicMapReader(File file) throws MalformedURLException
MalformedURLExceptionpublic Reader getReader()
public void setReader(Reader reader)
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 IOException
TopicMapReaderIFnull is returned when there are no more
topic maps available. In a sense this is iterator-like
behaviour.read in interface TopicMapReaderIFIOException - Thrown if reading the source fails.public Collection<TopicMapIF> readAll() throws IOException
TopicMapReaderIFreadAll in interface TopicMapReaderIFIOException - Thrown if reading the source fails.protected Collection<TopicMapIF> readAll(TopicMapStoreFactoryIF store_factory) throws IOException
IOExceptionprotected abstract TopicMapIF read(TopicMapStoreFactoryIF store_factory) throws IOException
IOExceptionpublic void setAdditionalProperties(Map<String,Object> properties)
setAdditionalProperties in interface TopicMapReaderIFproperties - public void importInto(TopicMapIF topicmap) throws IOException
TopicMapReaderIFimportInto in interface TopicMapReaderIFtopicmap - The topic map into which the import will be done;
an object implementing TopicMapIF.IOExceptionpublic static Reader makeReader(InputStream stream, String encoding, EncodingSnifferIF sniffer) throws IOException
IOExceptionpublic static Reader makeReader(LocatorIF locator, EncodingSnifferIF sniffer) throws IOException
IOExceptionprotected Reader makeReader(String encoding, EncodingSnifferIF sniffer) throws IOException
IOException