net.ontopia.topicmaps.xml
Class XTMPathTopicMapSource

java.lang.Object
  extended by net.ontopia.topicmaps.entry.AbstractPathTopicMapSource
      extended by net.ontopia.topicmaps.entry.AbstractOntopolyTopicMapSource
          extended by net.ontopia.topicmaps.xml.XTMPathTopicMapSource
All Implemented Interfaces:
java.io.FileFilter, TopicMapSourceIF

public class XTMPathTopicMapSource
extends AbstractOntopolyTopicMapSource

INTERNAL: Source that locates XTM topic map documents in a directory on the file system.


Constructor Summary
XTMPathTopicMapSource()
           
XTMPathTopicMapSource(java.lang.String path, java.io.FileFilter filter)
          INTERNAL: Constructor that takes the file directory and a file filter.
XTMPathTopicMapSource(java.lang.String path, java.lang.String suffix)
           
 
Method Summary
 TopicMapReferenceIF createReference(java.net.URL url, java.lang.String id, java.lang.String title, LocatorIF base_address)
           
 ExternalReferenceHandlerIF getExternalReferenceHandler()
          PUBLIC: Gets the external reference handler.
 java.lang.String getExternalReferenceHandlerClass()
          EXPERIMENTAL: Gets the name of the external reference handler class.
 boolean getValidation()
          PUBLIC: Returns true if validation is on, false otherwise.
 void setExternalReferenceHandler(ExternalReferenceHandlerIF ref_handler)
          PUBLIC: Sets the external reference handler.
 void setExternalReferenceHandlerClass(java.lang.String ref_handler)
          EXPERIMENTAL: Sets the name of the external reference handler class.
 void setFollowTopicRefs(boolean followTopicRefs)
          PUBLIC: If set to false topicRef elements pointing to external documents will not be traversed.
 void setValidation(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, setDeleteFiles, setIndexDirectory, setMaintainFulltextIndexes, setSupportsCreate, setSupportsDelete, supportsCreate, supportsDelete
 
Methods inherited from class net.ontopia.topicmaps.entry.AbstractPathTopicMapSource
accept, getBase, getBaseAddress, getDuplicateSuppression, getFileFilter, getHidden, getId, getPath, getReferences, getSuffix, getTitle, refresh, setBase, setBaseAddress, setDuplicateSuppression, setFileFilter, setHidden, setId, setPath, setSuffix, setTitle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XTMPathTopicMapSource

public XTMPathTopicMapSource()

XTMPathTopicMapSource

public XTMPathTopicMapSource(java.lang.String path,
                             java.lang.String suffix)

XTMPathTopicMapSource

public XTMPathTopicMapSource(java.lang.String path,
                             java.io.FileFilter filter)
INTERNAL: Constructor that takes the file directory and a file filter.

Parameters:
path - the path to search for TopicMaps
filter - a java.io.FileFilter to filter the specified path
Since:
1.3.4
Method Detail

createReference

public TopicMapReferenceIF createReference(java.net.URL url,
                                           java.lang.String id,
                                           java.lang.String title,
                                           LocatorIF base_address)
Specified by:
createReference in class AbstractOntopolyTopicMapSource

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 void setExternalReferenceHandler(ExternalReferenceHandlerIF ref_handler)
PUBLIC: Sets the external reference handler.


setExternalReferenceHandlerClass

public void setExternalReferenceHandlerClass(java.lang.String ref_handler)
EXPERIMENTAL: Sets the name of the external reference handler class. The specified class must have a default constructor.


getExternalReferenceHandlerClass

public java.lang.String getExternalReferenceHandlerClass()
EXPERIMENTAL: Gets the name of the external reference handler class.


getExternalReferenceHandler

public ExternalReferenceHandlerIF 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


Copyright © 2000-2009 Ontopia.