public abstract class AbstractKnowledgeSourceBackend extends AbstractBackend<KnowledgeSourceBackendUpdatedEvent> implements KnowledgeSourceBackend
KnowledgeSourceBackend interface
to minimize the effort required to implement this interface.| Constructor and Description |
|---|
AbstractKnowledgeSourceBackend() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Implemented as a no-op.
|
protected void |
fireKnowledgeSourceBackendUpdated()
Notifies registered listeners that the backend has been updated.
|
String[] |
getPropositionsByTerm(String termId)
A default implementation that returns an empty list.
|
List<String> |
getPropositionsByTermSubsumption(And<TermSubsumption> termId)
A default implementation that returns an empty List.
|
ValueSet |
readValueSet(String id)
A default implementation that returns
null. |
addBackendListener, fireBackendUpdated, fireUnrecoverableError, getConfigurationsId, getId, initialize, removeBackendListener, setIdclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcollectPropDefDescendantsUsingAllNarrower, collectPropDefDescendantsUsingInverseIsA, collectPropIdDescendantsUsingAllNarrower, collectPropIdDescendantsUsingInverseIsA, getKnowledgeSourceSearchResults, readAbstractedInto, readAbstractionDefinition, readAbstractionDefinitions, readContextDefinition, readContextDefinitions, readInduces, readIsA, readPropositionDefinition, readPropositionDefinitions, readSubContextOfs, readTemporalPropositionDefinition, readTemporalPropositionDefinitionsaddBackendListener, getConfigurationsId, getDisplayName, getId, initialize, removeBackendListenerpublic ValueSet readValueSet(String id) throws KnowledgeSourceReadException
null. Override this
if your knowledge base contains value sets.readValueSet in interface KnowledgeSourceBackendid - a proposition id String.ValueSet, always null in
this implementation.KnowledgeSourceReadExceptionpublic List<String> getPropositionsByTermSubsumption(And<TermSubsumption> termId) throws KnowledgeSourceReadException
getPropositionsByTermSubsumption in interface KnowledgeSourceBackendtermId - the term subsumptions to match in the knowledge sourceList.KnowledgeSourceReadException - if there is a problem reading from the knowledge sourcepublic String[] getPropositionsByTerm(String termId) throws KnowledgeSourceReadException
getPropositionsByTerm in interface KnowledgeSourceBackendtermId - the term ID to look upList of proposoition IDs related to the given termKnowledgeSourceReadException - if there is a problem reading from the Knowledge sourceorg.protempa.KnowledgeSourceBackend#getPropositionsByTerm(java.lang.String)public void close()
close in interface Backend<KnowledgeSourceBackendUpdatedEvent>org.protempa.KnowledgeSourceBackend#close()protected void fireKnowledgeSourceBackendUpdated()
org.protempa.KnowledgeSourceBackendUpdatedEvent,
org.protempa.KnowledgeSourceBackendListenerCopyright © 2012–2016 Emory University. All rights reserved.