Package net.ontopia.topicmaps.entry
Class AbstractURLTopicMapReference
java.lang.Object
net.ontopia.topicmaps.entry.AbstractTopicMapReference
net.ontopia.topicmaps.entry.AbstractURLTopicMapReference
- All Implemented Interfaces:
AutoCloseable,TopicMapReferenceIF
- Direct Known Subclasses:
AbstractOntopolyURLReference
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 Summary
FieldsModifier and TypeFieldDescriptionprotected LocatorIFprotected booleanprotected Stringprotected booleanprotected booleanprotected TopicMapStoreIFprotected URLFields inherited from class net.ontopia.topicmaps.entry.AbstractTopicMapReference
deleted, id, isopen, listeners, source, title, topic_listeners -
Constructor Summary
ConstructorsConstructorDescriptionAbstractURLTopicMapReference(String id, String title, URL url, LocatorIF base_address) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()PUBLIC: Closes all open stores and the reference itself.createStore(boolean readonly) PUBLIC: Creates a topic map store that lets you access the referenced topic map.voiddelete()INTERNAL: Deletes the topic map pointed to.INTERNAL: Returns the base address locator to be used when loading the topic map.booleanINTERNAL: Gets the duplicate suppression flag.booleanINTERNAL: Returns true if stores will keep underlying fulltext indexes up-to-date.booleanINTERNAL: Flag that indicates whether the same store should be returned by the createStore(boolean) method on every.getURL()INTERNAL: Returns the URL of the topic map pointed at.protected abstract TopicMapIFloadTopicMap(boolean readonly) voidopen()PUBLIC: Opens the reference.voidsetBaseAddress(LocatorIF base_address) INTERNAL: Sets the base address locator to be used when loading the topic map.voidsetDuplicateSuppression(boolean duplicate_suppression) INTERNAL: Sets the duplicate suppression flag.voidsetIndexDirectory(String indexDirectory) voidsetMaintainFulltextIndexes(boolean maintainFulltextIndexes) INTERNAL: Specifies whether underlying fulltext indexes are to be kept up-to-date or not.voidsetReuseStore(boolean reuse_store) INTERNAL: Sets the reuse_store flag.protected voidsetTopicListeners(TopicMapListenerIF[] topic_listeners) 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
-
Field Details
-
url
-
base_address
-
duplicate_suppression
protected boolean duplicate_suppression -
reuse_store
protected boolean reuse_store -
store
-
maintainFulltextIndexes
protected boolean maintainFulltextIndexes -
indexDirectory
-
-
Constructor Details
-
AbstractURLTopicMapReference
-
-
Method Details
-
getURL
INTERNAL: Returns the URL of the topic map pointed at. -
getBaseAddress
INTERNAL: Returns the base address locator to be used when loading the topic map. -
setBaseAddress
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:TopicMapReferenceIFPUBLIC: Opens the reference.- Specified by:
openin interfaceTopicMapReferenceIF- Overrides:
openin classAbstractTopicMapReference
-
close
public void close()Description copied from interface:TopicMapReferenceIFPUBLIC: 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceTopicMapReferenceIF- Overrides:
closein classAbstractTopicMapReference
-
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:
deletein interfaceTopicMapReferenceIF- Overrides:
deletein classAbstractTopicMapReference- Since:
- 1.3.2
-
createStore
Description copied from interface:TopicMapReferenceIFPUBLIC: Creates a topic map store that lets you access the referenced topic map.- Specified by:
createStorein interfaceTopicMapReferenceIF- Specified by:
createStorein classAbstractTopicMapReference- Throws:
IOException
-
loadTopicMap
- Throws:
IOException
-
toString
-
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
-
setIndexDirectory
-
setTopicListeners
- Overrides:
setTopicListenersin classAbstractTopicMapReference
-