Class AbstractURLTopicMapReference

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

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
  • Field Details

    • url

      protected URL url
    • base_address

      protected LocatorIF base_address
    • duplicate_suppression

      protected boolean duplicate_suppression
    • reuse_store

      protected boolean reuse_store
    • store

      protected TopicMapStoreIF store
    • maintainFulltextIndexes

      protected boolean maintainFulltextIndexes
    • indexDirectory

      protected String indexDirectory
  • Constructor Details

    • AbstractURLTopicMapReference

      public AbstractURLTopicMapReference(String id, String title, URL url, LocatorIF base_address)
  • Method Details

    • getURL

      public 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 AutoCloseable
      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 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:
      IOException
    • loadTopicMap

      protected abstract TopicMapIF loadTopicMap(boolean readonly) throws IOException
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class 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 String getIndexDirectory()
    • setIndexDirectory

      public void setIndexDirectory(String indexDirectory)
    • setTopicListeners

      protected void setTopicListeners(TopicMapListenerIF[] topic_listeners)
      Overrides:
      setTopicListeners in class AbstractTopicMapReference