|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.ontopia.xml.AbstractXMLFormatReader
net.ontopia.topicmaps.xml.XTMTopicMapReader
public class XTMTopicMapReader
PUBLIC: A topic map reader that reads the XTM 1.0 interchange syntax. A topic map is built as part of the import process. A variety of possible input sources are accommodated, by overloading the constructor.
| Constructor Summary | |
|---|---|
XTMTopicMapReader(java.io.File file)
PUBLIC: Creates a topic map reader bound to the file given in the arguments. |
|
XTMTopicMapReader(org.xml.sax.InputSource source,
LocatorIF base_address)
PUBLIC: Creates a topic map reader bound to the input source given in the arguments. |
|
XTMTopicMapReader(java.io.InputStream stream,
LocatorIF base_address)
PUBLIC: Creates a topic map reader bound to the input stream given in the arguments. |
|
XTMTopicMapReader(LocatorIF url)
PUBLIC: Creates a topic map reader bound to the URL given in the arguments. |
|
XTMTopicMapReader(java.io.Reader reader,
LocatorIF base_address)
PUBLIC: Creates a topic map reader bound to the reader given in the arguments. |
|
XTMTopicMapReader(java.lang.String url)
PUBLIC: Creates a topic map reader bound to the URL given in the arguments. |
|
| Method Summary | |
|---|---|
ExternalReferenceHandlerIF |
getExternalReferenceHandler()
PUBLIC: Gets the external reference handler. |
TopicMapStoreFactoryIF |
getStoreFactory()
PUBLIC: Gets the store factory which will be used to create stores. |
boolean |
getValidation()
PUBLIC: Returns true if validation is on, false otherwise. |
void |
importInto(TopicMapIF topicmap)
PUBLIC: Imports an implicitly designated topic map into the given topic map. |
TopicMapIF |
read()
PUBLIC: Reads the next topic map available from some implicit, implementation dependent source. |
java.util.Collection |
readAll()
PUBLIC: Reads all the topic map available from some implicit, implementation dependent source. |
void |
setExternalReferenceHandler(ExternalReferenceHandlerIF ref_handler)
PUBLIC: Sets the external reference handler. |
void |
setFollowTopicRefs(boolean followTopicRefs)
PUBLIC: If set to false topicRef elements pointing to external documents will not be traversed. |
void |
setStoreFactory(TopicMapStoreFactoryIF store_factory)
PUBLIC: Sets the store factory which will be used to create stores. |
void |
setValidation(boolean validate)
PUBLIC: Turn validation of XTM documents according to DTD on or off. |
| Methods inherited from class net.ontopia.xml.AbstractXMLFormatReader |
|---|
getBaseAddress, getInputSource, getXMLReaderFactory, setBaseAddress, setInputSource, setXMLReaderFactory |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XTMTopicMapReader(java.lang.String url)
throws java.net.MalformedURLException
url - The URL of the topic map document.
java.net.MalformedURLExceptionpublic XTMTopicMapReader(LocatorIF url)
url - The URL of the topic map document.
public XTMTopicMapReader(java.io.Reader reader,
LocatorIF base_address)
reader - The reader from which the topic map is to be read.base_address - The base address to be used for resolving
relative references.
public XTMTopicMapReader(java.io.InputStream stream,
LocatorIF base_address)
stream - The input stream from which the topic map is to be read.base_address - The base address to be used for resolving
relative references.
public XTMTopicMapReader(java.io.File file)
throws java.io.IOException
file - The file object from which to read the topic map.
java.io.IOException
public XTMTopicMapReader(org.xml.sax.InputSource source,
LocatorIF base_address)
source - The SAX input source from which the topic map is to be read.base_address - The base address to be used for resolving
relative references.| Method Detail |
|---|
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 ExternalReferenceHandlerIF getExternalReferenceHandler()
public void setExternalReferenceHandler(ExternalReferenceHandlerIF ref_handler)
public void setFollowTopicRefs(boolean followTopicRefs)
public void setValidation(boolean validate)
validate - Will validate if true, will not if false.public boolean getValidation()
public TopicMapIF read()
throws java.io.IOException
TopicMapReaderIFnull is returned when there are no more
topic maps available. In a sense this is iterator-like
behaviour.
read in interface TopicMapReaderIFjava.io.IOException - Thrown if reading the source fails.
public java.util.Collection readAll()
throws java.io.IOException
TopicMapReaderIF
readAll in interface TopicMapReaderIFjava.io.IOException - Thrown if reading the source fails.
public void importInto(TopicMapIF topicmap)
throws java.io.IOException
TopicMapImporterIF
importInto in interface TopicMapImporterIFtopicmap - The topic map into which the import will be done;
an object implementing TopicMapIF.
java.io.IOException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||