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 booleanalwaysReindexOnLoadprotected 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 voidclose()PUBLIC: Closes all open stores and the reference itself.voiddelete()INTERNAL: Deletes the topic map pointed to.voiddeleteFullTextIndex()PUBLIC: Removes the full-text index of the topicmap if full-text indexing is enabled.booleangetAlwaysReindexOnLoad()protected abstract TopicMapReaderIFgetImporter()protected longgetLastModifiedAt(File file)protected longgetLastModifiedAt(URL url)protected TopicMapIFloadTopicMap(boolean readonly)voidopen()PUBLIC: Opens the reference.voidreindexFulltextIndex()PUBLIC: Triggers a full reindexing of the topicmap if full-text indexing is enabled.voidsetAlwaysReindexOnLoad(boolean alwaysReindexOnLoad)voidsynchronizeFulltextIndex(TopicMapStoreIF store)INTERNAL: Synchronizes the underlying fulltext index with the latest changes in the topic map.voidtransactionAbort(TopicMapTransactionIF transaction)voidtransactionCommit(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:TopicMapReferenceIFPUBLIC: Opens the reference.- Specified by:
openin interfaceTopicMapReferenceIF- Overrides:
openin classAbstractURLTopicMapReference
-
loadTopicMap
protected TopicMapIF loadTopicMap(boolean readonly) throws IOException
- Specified by:
loadTopicMapin 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:AbstractURLTopicMapReferenceINTERNAL: 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 classAbstractURLTopicMapReference
-
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 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:
transactionCommitin interfaceTransactionEventListenerIF
-
transactionAbort
public void transactionAbort(TopicMapTransactionIF transaction)
- Specified by:
transactionAbortin interfaceTransactionEventListenerIF
-
getImporter
protected abstract TopicMapReaderIF getImporter() throws IOException
- Throws:
IOException
-
-