Package net.ontopia.topicmaps.xml
Class XTMPathTopicMapSource
java.lang.Object
net.ontopia.topicmaps.entry.AbstractPathTopicMapSource
net.ontopia.topicmaps.entry.AbstractOntopolyTopicMapSource
net.ontopia.topicmaps.xml.XTMPathTopicMapSource
- All Implemented Interfaces:
FileFilter,AutoCloseable,TopicMapSourceIF
INTERNAL: Source that locates XTM topic map documents in a directory
on the file system.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected ExternalReferenceHandlerIFprotected booleanFields inherited from class net.ontopia.topicmaps.entry.AbstractOntopolyTopicMapSource
alwaysReindexOnLoad, indexDirectory, maintainFulltextIndexes, supportsCreate, supportsDeleteFields inherited from class net.ontopia.topicmaps.entry.AbstractPathTopicMapSource
base_address, duplicate_suppression, hidden, id, path, refmap, suffix, title -
Constructor Summary
ConstructorsConstructorDescriptionXTMPathTopicMapSource(String path, FileFilter filter) INTERNAL: Constructor that takes the file directory and a file filter.XTMPathTopicMapSource(String path, String suffix) -
Method Summary
Modifier and TypeMethodDescriptioncreateReference(URL url, String id, String title, LocatorIF base_address) PUBLIC: Gets the external reference handler.EXPERIMENTAL: Gets the name of the external reference handler class.booleanPUBLIC: Returns true if validation is on, false otherwise.protected TopicMapWriterIFINTERNAL: Used by createTopicMap to serialize the new topic map.voidsetExternalReferenceHandler(ExternalReferenceHandlerIF ref_handler) PUBLIC: Sets the external reference handler.voidsetExternalReferenceHandlerClass(String ref_handler) EXPERIMENTAL: Sets the name of the external reference handler class.voidsetFollowTopicRefs(boolean followTopicRefs) PUBLIC: If set to false topicRef elements pointing to external documents will not be traversed.voidsetValidation(boolean validate) PUBLIC: Turn validation of XTM documents according to DTD on or off.Methods inherited from class net.ontopia.topicmaps.entry.AbstractOntopolyTopicMapSource
createTopicMap, getAlwaysReindexOnLoad, getIndexDirectory, getMaintainFulltextIndexes, getSupportsCreate, getSupportsDelete, setAlwaysReindexOnLoad, setIndexDirectory, setMaintainFulltextIndexes, setSupportsCreate, setSupportsDelete, supportsCreate, supportsDeleteMethods inherited from class net.ontopia.topicmaps.entry.AbstractPathTopicMapSource
accept, close, createReference, getBase, getBaseAddress, getDuplicateSuppression, getFileFilter, getHidden, getId, getPath, getReferences, getSuffix, getTitle, refresh, refreshFromClasspath, refreshFromFilesystem, setBase, setBaseAddress, setDuplicateSuppression, setFileFilter, setHidden, setId, setPath, setSuffix, setTitle
-
Field Details
-
ref_handler
-
followTopicRefs
protected boolean followTopicRefs -
validate
protected boolean validate
-
-
Constructor Details
-
XTMPathTopicMapSource
public XTMPathTopicMapSource() -
XTMPathTopicMapSource
-
XTMPathTopicMapSource
INTERNAL: Constructor that takes the file directory and a file filter.- Parameters:
path- the path to search for TopicMapsfilter- a java.io.FileFilter to filter the specified path- Since:
- 1.3.4
-
-
Method Details
-
createReference
public TopicMapReferenceIF createReference(URL url, String id, String title, LocatorIF base_address) - Specified by:
createReferencein classAbstractOntopolyTopicMapSource
-
setFollowTopicRefs
public void setFollowTopicRefs(boolean followTopicRefs) PUBLIC: If set to false topicRef elements pointing to external documents will not be traversed. The default is that the documents pointed to by those elements will be loaded (as per the XTM 1.0 specification).- Since:
- 3.2
-
setExternalReferenceHandler
PUBLIC: Sets the external reference handler. -
setExternalReferenceHandlerClass
EXPERIMENTAL: Sets the name of the external reference handler class. The specified class must have a default constructor. -
getExternalReferenceHandlerClass
EXPERIMENTAL: Gets the name of the external reference handler class. -
getExternalReferenceHandler
PUBLIC: Gets the external reference handler. The reference handler will receive notifications on references to external topics and topic maps. -
setValidation
public void setValidation(boolean validate) PUBLIC: Turn validation of XTM documents according to DTD on or off. The validation checks if the documents read follow the DTD, and will abort import if they do not.- Parameters:
validate- Will validate if true, will not if false.- Since:
- 2.0
-
getValidation
public boolean getValidation()PUBLIC: Returns true if validation is on, false otherwise.- Since:
- 2.0
-
getWriter
INTERNAL: Used by createTopicMap to serialize the new topic map.- Specified by:
getWriterin classAbstractOntopolyTopicMapSource- Throws:
IOException
-