public final class KnowledgeSourceImpl extends AbstractSource<KnowledgeSourceUpdatedEvent,KnowledgeSourceBackend,KnowledgeSourceUpdatedEvent,KnowledgeSourceBackendUpdatedEvent> implements KnowledgeSource
| Constructor and Description |
|---|
KnowledgeSourceImpl(KnowledgeSourceBackend... backends) |
addSourceListener, fireClosedUnexpectedly, fireSourceUpdated, getBackends, isClosed, removeSourceListener, setEventListeners, unrecoverableErrorOccurredclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddSourceListener, getBackends, removeSourceListener, setEventListenersunrecoverableErrorOccurredpublic KnowledgeSourceImpl(KnowledgeSourceBackend... backends)
public List<PropositionDefinition> readInverseIsA(PropositionDefinition propDef) throws KnowledgeSourceReadException
readInverseIsA in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<PropositionDefinition> readIsA(PropositionDefinition propDef) throws KnowledgeSourceReadException
readIsA in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<String> readIsAPropIds(PropositionDefinition propDef) throws KnowledgeSourceReadException
readIsAPropIds in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<PropositionDefinition> readInverseIsA(String id) throws KnowledgeSourceReadException
readInverseIsA in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<PropositionDefinition> readIsA(String id) throws KnowledgeSourceReadException
readIsA in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<String> readIsAPropIds(String id) throws KnowledgeSourceReadException
readIsAPropIds in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<PropositionDefinition> readAbstractedFrom(AbstractionDefinition propDef) throws KnowledgeSourceReadException
readAbstractedFrom in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<AbstractionDefinition> readAbstractedInto(PropositionDefinition propDef) throws KnowledgeSourceReadException
readAbstractedInto in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<String> readAbstractedIntoPropIds(PropositionDefinition propDef) throws KnowledgeSourceReadException
readAbstractedIntoPropIds in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<PropositionDefinition> readAbstractedFrom(String id) throws KnowledgeSourceReadException
readAbstractedFrom in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<AbstractionDefinition> readAbstractedInto(String id) throws KnowledgeSourceReadException
readAbstractedInto in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<String> readAbstractedIntoPropIds(String id) throws KnowledgeSourceReadException
readAbstractedIntoPropIds in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<ContextDefinition> readInduces(TemporalPropositionDefinition propDef) throws KnowledgeSourceReadException
readInduces in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<String> readInducesPropIds(TemporalPropositionDefinition propDef) throws KnowledgeSourceReadException
readInducesPropIds in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<ContextDefinition> readInduces(String id) throws KnowledgeSourceReadException
readInduces in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<String> readInducesPropIds(String id) throws KnowledgeSourceReadException
readInducesPropIds in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<ContextDefinition> readSubContextOfs(String id) throws KnowledgeSourceReadException
readSubContextOfs in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<String> readSubContextOfPropIds(String id) throws KnowledgeSourceReadException
readSubContextOfPropIds in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<ContextDefinition> readSubContextOfs(ContextDefinition cd) throws KnowledgeSourceReadException
readSubContextOfs in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<String> readSubContextOfPropIds(ContextDefinition cd) throws KnowledgeSourceReadException
readSubContextOfPropIds in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<ContextDefinition> readSubContexts(String contextId) throws KnowledgeSourceReadException
readSubContexts in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<ContextDefinition> readSubContexts(ContextDefinition contextDef) throws KnowledgeSourceReadException
readSubContexts in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<PropositionDefinition> readParents(PropositionDefinition propDef) throws KnowledgeSourceReadException
readParents in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<String> readParentPropIds(PropositionDefinition propDef) throws KnowledgeSourceReadException
readParentPropIds in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<PropositionDefinition> readParents(String propId) throws KnowledgeSourceReadException
readParents in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<String> readParentPropIds(String propId) throws KnowledgeSourceReadException
readParentPropIds in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<TemporalPropositionDefinition> readInducedBy(String contextId) throws KnowledgeSourceReadException
readInducedBy in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<TemporalPropositionDefinition> readInducedBy(ContextDefinition contextDef) throws KnowledgeSourceReadException
readInducedBy in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic boolean hasTemporalPropositionDefinition(String id) throws KnowledgeSourceReadException
hasTemporalPropositionDefinition in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic TemporalPropositionDefinition readTemporalPropositionDefinition(String id) throws KnowledgeSourceReadException
readTemporalPropositionDefinition in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<TemporalPropositionDefinition> readTemporalPropositionDefinitions(String... propIds) throws KnowledgeSourceReadException
readTemporalPropositionDefinitions in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic PropositionDefinition readPropositionDefinition(String id) throws KnowledgeSourceReadException
readPropositionDefinition in interface KnowledgeSourceid - a proposition id String. Cannot be null.PropositionDefinition, or null if none was
found with the given id.KnowledgeSourceReadException - if an error occurred reading from
the knowledge base.public List<PropositionDefinition> readPropositionDefinitions(String... propIds) throws KnowledgeSourceReadException
readPropositionDefinitions in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic boolean hasPropositionDefinition(String id) throws KnowledgeSourceReadException
hasPropositionDefinition in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic AbstractionDefinition readAbstractionDefinition(String id) throws KnowledgeSourceReadException
readAbstractionDefinition in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<AbstractionDefinition> readAbstractionDefinitions(String... propIds) throws KnowledgeSourceReadException
readAbstractionDefinitions in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic ContextDefinition readContextDefinition(String id) throws KnowledgeSourceReadException
readContextDefinition in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<ContextDefinition> readContextDefinitions(String... propIds) throws KnowledgeSourceReadException
readContextDefinitions in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic boolean hasAbstractionDefinition(String id) throws KnowledgeSourceReadException
hasAbstractionDefinition in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic boolean hasContextDefinition(String id) throws KnowledgeSourceReadException
hasContextDefinition in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic ValueSet readValueSet(String id) throws KnowledgeSourceReadException
readValueSet in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic boolean hasValueSet(String id) throws KnowledgeSourceReadException
hasValueSet in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic void close()
throws SourceCloseException
AbstractSourceSource as a listener to the Backends
provided to the constructor.
Must be called by subclasses, or proper cleanup will not occur.close in interface AutoCloseableclose in interface Source<KnowledgeSourceUpdatedEvent,KnowledgeSourceBackend,KnowledgeSourceBackendUpdatedEvent>close in class AbstractSource<KnowledgeSourceUpdatedEvent,KnowledgeSourceBackend,KnowledgeSourceUpdatedEvent,KnowledgeSourceBackendUpdatedEvent>SourceCloseExceptionpublic void clear()
clear in interface Source<KnowledgeSourceUpdatedEvent,KnowledgeSourceBackend,KnowledgeSourceBackendUpdatedEvent>public Set<String> collectPropIdDescendantsUsingAllNarrower(boolean inDataSourceOnly, String... propIds) throws KnowledgeSourceReadException
collectPropIdDescendantsUsingAllNarrower in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic Set<PropositionDefinition> collectPropDefDescendantsUsingAllNarrower(boolean inDataSourceOnly, String... propIds) throws KnowledgeSourceReadException
collectPropDefDescendantsUsingAllNarrower in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic Set<String> collectPropIdDescendantsUsingInverseIsA(String... propIds) throws KnowledgeSourceReadException
collectPropIdDescendantsUsingInverseIsA in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic Set<PropositionDefinition> collectPropDefDescendantsUsingInverseIsA(String... propIds) throws KnowledgeSourceReadException
collectPropDefDescendantsUsingInverseIsA in interface KnowledgeSourceKnowledgeSourceReadExceptionpublic List<String> getPropositionDefinitionsByTerm(And<TermSubsumption> termSubsumptionClause) throws KnowledgeSourceReadException
getPropositionDefinitionsByTerm in interface KnowledgeSourceMap of Strings to a List of
Strings, with the keys being Term IDs and the values
being lists of PropositionDefinition IDs.KnowledgeSourceReadExceptionpublic void backendUpdated(KnowledgeSourceBackendUpdatedEvent event)
BackendListenerbackendUpdated in interface BackendListener<KnowledgeSourceBackendUpdatedEvent>event - an EventObjectpublic List<String> getMatchingPropIds(String searchKey) throws KnowledgeSourceReadException
getMatchingPropIds in interface KnowledgeSourcesearchKey - KnowledgeSourceReadExceptionCopyright © 2012–2018 Emory University. All rights reserved.