Package net.ontopia.topicmaps.entry
Class AbstractOntopolyURLReference
- java.lang.Object
-
- net.ontopia.topicmaps.entry.AbstractTopicMapReference
-
- net.ontopia.topicmaps.entry.AbstractURLTopicMapReference
-
- net.ontopia.topicmaps.entry.AbstractOntopolyURLReference
-
- All Implemented Interfaces:
AutoCloseable
,TopicMapReferenceIF
,TransactionEventListenerIF
- Direct Known Subclasses:
CTMTopicMapReference
,LTMTopicMapReference
,RDFTopicMapReference
,TMXMLTopicMapReference
,XTMTopicMapReference
public abstract class AbstractOntopolyURLReference extends AbstractURLTopicMapReference implements TransactionEventListenerIF
INTERNAL: Common abstract superclass for references from sources that support what Ontopoly needs.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
alwaysReindexOnLoad
protected Set<FulltextImplementationIF>
ftmanagers
-
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
Constructors Constructor Description AbstractOntopolyURLReference(URL url, String id, String title, LocatorIF base)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
PUBLIC: Closes all open stores and the reference itself.void
delete()
INTERNAL: Deletes the topic map pointed to.void
deleteFullTextIndex()
PUBLIC: Removes the full-text index of the topicmap if full-text indexing is enabled.boolean
getAlwaysReindexOnLoad()
protected abstract TopicMapReaderIF
getImporter()
protected long
getLastModifiedAt(File file)
protected long
getLastModifiedAt(URL url)
protected TopicMapIF
loadTopicMap(boolean readonly)
void
open()
PUBLIC: Opens the reference.void
reindexFulltextIndex()
PUBLIC: Triggers a full reindexing of the topicmap if full-text indexing is enabled.void
setAlwaysReindexOnLoad(boolean alwaysReindexOnLoad)
void
synchronizeFulltextIndex(TopicMapStoreIF store)
INTERNAL: Synchronizes the underlying fulltext index with the latest changes in the topic map.void
transactionAbort(TopicMapTransactionIF transaction)
void
transactionCommit(TopicMapTransactionIF transaction)
-
Methods inherited from class net.ontopia.topicmaps.entry.AbstractURLTopicMapReference
createStore, getBaseAddress, getDuplicateSuppression, getIndexDirectory, getMaintainFulltextIndexes, getReuseStore, getURL, 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
-
-
-
-
Field Detail
-
alwaysReindexOnLoad
protected boolean alwaysReindexOnLoad
-
ftmanagers
protected Set<FulltextImplementationIF> ftmanagers
-
-
Method Detail
-
open
public void open()
Description copied from interface:TopicMapReferenceIF
PUBLIC: Opens the reference.- Specified by:
open
in interfaceTopicMapReferenceIF
- Overrides:
open
in classAbstractURLTopicMapReference
-
loadTopicMap
protected TopicMapIF loadTopicMap(boolean readonly) throws IOException
- Specified by:
loadTopicMap
in classAbstractURLTopicMapReference
- Throws:
IOException
-
getLastModifiedAt
protected long getLastModifiedAt(File file)
-
getLastModifiedAt
protected long getLastModifiedAt(URL url)
-
getAlwaysReindexOnLoad
public boolean getAlwaysReindexOnLoad()
-
setAlwaysReindexOnLoad
public void setAlwaysReindexOnLoad(boolean alwaysReindexOnLoad)
-
delete
public void delete()
Description copied from class:AbstractURLTopicMapReference
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 interfaceTopicMapReferenceIF
- Overrides:
delete
in classAbstractURLTopicMapReference
-
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 interfaceAutoCloseable
- Specified by:
close
in interfaceTopicMapReferenceIF
- Overrides:
close
in classAbstractURLTopicMapReference
-
synchronizeFulltextIndex
public void synchronizeFulltextIndex(TopicMapStoreIF store)
INTERNAL: Synchronizes the underlying fulltext index with the latest changes in the topic map.- Since:
- 5.4.0
-
reindexFulltextIndex
public void reindexFulltextIndex()
PUBLIC: Triggers a full reindexing of the topicmap if full-text indexing is enabled.- Since:
- 5.4.0
-
deleteFullTextIndex
public void deleteFullTextIndex()
PUBLIC: Removes the full-text index of the topicmap if full-text indexing is enabled.- Since:
- 5.4.0
-
transactionCommit
public void transactionCommit(TopicMapTransactionIF transaction)
- Specified by:
transactionCommit
in interfaceTransactionEventListenerIF
-
transactionAbort
public void transactionAbort(TopicMapTransactionIF transaction)
- Specified by:
transactionAbort
in interfaceTransactionEventListenerIF
-
getImporter
protected abstract TopicMapReaderIF getImporter() throws IOException
- Throws:
IOException
-
-