public final class TermSourceImpl extends AbstractSource<TermSourceUpdatedEvent,TermSourceBackend,TermSourceUpdatedEvent,TermSourceBackendUpdatedEvent> implements TermSource
| Constructor and Description |
|---|
TermSourceImpl(TermSourceBackend[] backends) |
| Modifier and Type | Method and Description |
|---|---|
void |
backendUpdated(TermSourceBackendUpdatedEvent event)
Notifies a listener when it needs to reread data in the backend.
|
void |
clear() |
void |
close()
|
List<String> |
getTermSubsumption(String termId)
Gets the term subsumption for the given term ID.
|
Term |
readTerm(String id) |
addSourceListener, fireClosedUnexpectedly, fireSourceUpdated, getBackends, isClosed, removeSourceListener, unrecoverableErrorOccurredclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddSourceListener, getBackends, removeSourceListenerunrecoverableErrorOccurredpublic TermSourceImpl(TermSourceBackend[] backends)
public Term readTerm(String id) throws TermSourceReadException
readTerm in interface TermSourceTermSourceReadExceptionpublic List<String> getTermSubsumption(String termId) throws TermSourceReadException
getTermSubsumption in interface TermSourcetermId - the term ID to subsumeList of term IDs composing the given term's subsumptionTermSourceReadExceptionpublic 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<TermSourceUpdatedEvent,TermSourceBackend,TermSourceBackendUpdatedEvent>close in class AbstractSource<TermSourceUpdatedEvent,TermSourceBackend,TermSourceUpdatedEvent,TermSourceBackendUpdatedEvent>SourceCloseExceptionpublic void backendUpdated(TermSourceBackendUpdatedEvent event)
BackendListenerbackendUpdated in interface BackendListener<TermSourceBackendUpdatedEvent>event - an EventObjectpublic void clear()
clear in interface Source<TermSourceUpdatedEvent,TermSourceBackend,TermSourceBackendUpdatedEvent>Copyright © 2012–2016 Emory University. All rights reserved.