net.ontopia.topicmaps.xml
Class XTMTopicMapReference

java.lang.Object
  extended by net.ontopia.topicmaps.entry.AbstractTopicMapReference
      extended by net.ontopia.topicmaps.entry.AbstractURLTopicMapReference
          extended by net.ontopia.topicmaps.entry.AbstractOntopolyURLReference
              extended by net.ontopia.topicmaps.xml.XTMTopicMapReference
All Implemented Interfaces:
TopicMapReferenceIF, TransactionEventListenerIF

public class XTMTopicMapReference
extends AbstractOntopolyURLReference

INTERNAL: An XTM document topic map reference.


Field Summary
protected  boolean followTopicRefs
           
protected  ExternalReferenceHandlerIF ref_handler
           
protected  boolean validate
           
 
Fields inherited from class net.ontopia.topicmaps.entry.AbstractOntopolyURLReference
alwaysReindexOnLoad, ftmanager
 
Fields inherited from class net.ontopia.topicmaps.entry.AbstractURLTopicMapReference
base_address, duplicate_suppression, indexDirectory, maintainFulltextIndexes, reuse_store, store, url
 
Fields inherited from class net.ontopia.topicmaps.entry.AbstractTopicMapReference
deleted, id, isopen, listeners, source, title, topic_listeners
 
Constructor Summary
XTMTopicMapReference(java.net.URL url, java.lang.String id, java.lang.String title)
           
XTMTopicMapReference(java.net.URL url, java.lang.String id, java.lang.String title, LocatorIF base_address)
           
 
Method Summary
 ExternalReferenceHandlerIF getExternalReferenceHandler()
          PUBLIC: Gets the external reference handler.
protected  TopicMapImporterIF getImporter()
           
 boolean getValidation()
          PUBLIC: Returns true if validation is on, false otherwise.
 void save()
          INTERNAL: Saves the topic map as an XTM document in the location managed by the reference's source.
 void setExternalReferenceHandler(ExternalReferenceHandlerIF 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 setValidation(boolean validate)
          PUBLIC: Turn validation of XTM documents according to DTD on or off.
 
Methods inherited from class net.ontopia.topicmaps.entry.AbstractOntopolyURLReference
close, delete, getAlwaysReindexOnLoad, getLastModifiedAt, getLastModifiedAt, getSearcher, loadTopicMap, setAlwaysReindexOnLoad, synchronizeFulltextIndex, synchronizeFulltextIndex, transactionAbort, transactionCommit
 
Methods inherited from class net.ontopia.topicmaps.entry.AbstractURLTopicMapReference
createStore, getBaseAddress, getDuplicateSuppression, getIndexDirectory, getMaintainFulltextIndexes, getReuseStore, getURL, open, setBaseAddress, setDuplicateSuppression, setIndexDirectory, setMaintainFulltextIndexes, setReuseStore, setTopicListeners, toString
 
Methods inherited from class net.ontopia.topicmaps.entry.AbstractTopicMapReference
addTopicListener, clear, getId, getSource, getTitle, getTopicListeners, isDeleted, isOpen, makeListenerArray, registerTopicListeners, removeTopicListener, setId, setSource, setTitle, storeClosed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ref_handler

protected ExternalReferenceHandlerIF ref_handler

followTopicRefs

protected boolean followTopicRefs

validate

protected boolean validate
Constructor Detail

XTMTopicMapReference

public XTMTopicMapReference(java.net.URL url,
                            java.lang.String id,
                            java.lang.String title)

XTMTopicMapReference

public XTMTopicMapReference(java.net.URL url,
                            java.lang.String id,
                            java.lang.String title,
                            LocatorIF base_address)
Method Detail

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 those the documents pointed to by those elements will be loaded (as per the XTM specification).

Since:
3.2

setExternalReferenceHandler

public void setExternalReferenceHandler(ExternalReferenceHandlerIF handler)
PUBLIC: Sets the external reference handler.


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

save

public void save()
          throws java.io.IOException
INTERNAL: Saves the topic map as an XTM document in the location managed by the reference's source.

Throws:
java.io.IOException

getImporter

protected TopicMapImporterIF getImporter()
Specified by:
getImporter in class AbstractOntopolyURLReference


Copyright © 2000-2012 Ontopia.