net.ontopia.topicmaps.entry
Class AbstractURLTopicMapReference

java.lang.Object
  extended by net.ontopia.topicmaps.entry.AbstractTopicMapReference
      extended by net.ontopia.topicmaps.entry.AbstractURLTopicMapReference
All Implemented Interfaces:
TopicMapReferenceIF
Direct Known Subclasses:
AbstractOntopolyURLReference, CTMTopicMapReference, RDFTopicMapReference

public abstract class AbstractURLTopicMapReference
extends AbstractTopicMapReference

INTERNAL: An abstract topic map reference class that retrieves topic maps referenced through URLs. Subclasses should implement the loadTopicMap method.

Since:
1.3.2

Constructor Summary
AbstractURLTopicMapReference(java.lang.String id, java.lang.String title, java.net.URL url, LocatorIF base_address)
           
 
Method Summary
 void close()
          PUBLIC: Closes all open stores and the reference itself.
 TopicMapStoreIF createStore(boolean readonly)
          PUBLIC: Creates a topic map store that lets you access the referenced topic map.
 void delete()
          INTERNAL: Deletes the topic map pointed to.
 LocatorIF getBaseAddress()
          INTERNAL: Returns the base address locator to be used when loading the topic map.
 boolean getDuplicateSuppression()
          INTERNAL: Gets the duplicate suppression flag.
 java.lang.String getIndexDirectory()
           
 boolean getMaintainFulltextIndexes()
          INTERNAL: Returns true if stores will keep underlying fulltext indexes up-to-date.
 boolean getReuseStore()
          INTERNAL: Flag that indicates whether the same store should be returned by the createStore(boolean) method on every.
 java.net.URL getURL()
          INTERNAL: Returns the URL of the topic map pointed at.
 void open()
          PUBLIC: Opens the reference.
 void setBaseAddress(LocatorIF base_address)
          INTERNAL: Sets the base address locator to be used when loading the topic map.
 void setDuplicateSuppression(boolean duplicate_suppression)
          INTERNAL: Sets the duplicate suppression flag.
 void setIndexDirectory(java.lang.String indexDirectory)
           
 void setMaintainFulltextIndexes(boolean maintainFulltextIndexes)
          INTERNAL: Specifies whether underlying fulltext indexes are to be kept up-to-date or not.
 void setReuseStore(boolean reuse_store)
          INTERNAL: Sets the reuse_store flag.
 java.lang.String toString()
           
 
Methods inherited from class net.ontopia.topicmaps.entry.AbstractTopicMapReference
addTopicListener, clear, getId, getSource, getTitle, isDeleted, isOpen, registerTopicListeners, removeTopicListener, setId, setSource, setTitle, storeClosed
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractURLTopicMapReference

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

getURL

public java.net.URL getURL()
INTERNAL: Returns the URL of the topic map pointed at.


getBaseAddress

public LocatorIF getBaseAddress()
INTERNAL: Returns the base address locator to be used when loading the topic map.


setBaseAddress

public void setBaseAddress(LocatorIF base_address)
INTERNAL: Sets the base address locator to be used when loading the topic map.


getDuplicateSuppression

public boolean getDuplicateSuppression()
INTERNAL: Gets the duplicate suppression flag. If the flag is true duplicate suppression is to be performed when loading the topic maps.

Since:
1.4.2

setDuplicateSuppression

public void setDuplicateSuppression(boolean duplicate_suppression)
INTERNAL: Sets the duplicate suppression flag. If the flag is true duplicate suppression is to be performed when loading the topic maps.

Since:
1.4.2

getReuseStore

public boolean getReuseStore()
INTERNAL: Flag that indicates whether the same store should be returned by the createStore(boolean) method on every. If the flag is false then a new store will be returned every time. Returning a new store every time effectively means that the referenced topic map will be loaded on every method call.

Since:
2.1

setReuseStore

public void setReuseStore(boolean reuse_store)
INTERNAL: Sets the reuse_store flag.

Since:
2.1

open

public void open()
Description copied from interface: TopicMapReferenceIF
PUBLIC: Opens the reference.

Specified by:
open in interface TopicMapReferenceIF
Overrides:
open in class AbstractTopicMapReference

close

public void close()
Description copied from interface: TopicMapReferenceIF
PUBLIC: Closes all open stores and the reference itself. Note that topic map stores created through this reference are closed and dereferenced when the reference is closed. The reference can be reopened after it has been closed.

Specified by:
close in interface TopicMapReferenceIF
Overrides:
close in class AbstractTopicMapReference

delete

public void delete()
INTERNAL: Deletes the topic map pointed to. The reference is closed before the topic map is deleted. Note that only URIs pointing to through files can actually be deleted, i.e. "file:" URLs.

Specified by:
delete in interface TopicMapReferenceIF
Overrides:
delete in class AbstractTopicMapReference
Since:
1.3.2

createStore

public TopicMapStoreIF createStore(boolean readonly)
                            throws java.io.IOException
Description copied from interface: TopicMapReferenceIF
PUBLIC: Creates a topic map store that lets you access the referenced topic map.

Specified by:
createStore in interface TopicMapReferenceIF
Specified by:
createStore in class AbstractTopicMapReference
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getMaintainFulltextIndexes

public boolean getMaintainFulltextIndexes()
INTERNAL: Returns true if stores will keep underlying fulltext indexes up-to-date.

Returns:
True if fulltext indexes are maintained.
Since:
3.0

setMaintainFulltextIndexes

public void setMaintainFulltextIndexes(boolean maintainFulltextIndexes)
INTERNAL: Specifies whether underlying fulltext indexes are to be kept up-to-date or not.

Parameters:
maintainFulltextIndexes - True if fulltext indexes are maintained.
Since:
3.0

getIndexDirectory

public java.lang.String getIndexDirectory()

setIndexDirectory

public void setIndexDirectory(java.lang.String indexDirectory)


Copyright © 2000-2010 Ontopia.