public class CachedSource extends Object implements Source
| Constructor and Description |
|---|
CachedSource(Source source) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkStatus()
Updates the cached Source with the current status of the wrapped source.
|
boolean |
equals(Object o) |
String |
getAttributeValue(String attr)
Returns the value of an arbitrary attribute
|
Set<ContentType> |
getContentTypes()
Gets the
ContentTypes that are currently stored by the Source. |
String |
getDescription()
Returns a description of the describable item.
|
String |
getId()
Returns the name, aka ID, of the describable item.
|
String |
getOrganization()
Returns the organization associated with the describable item.
|
ddf.catalog.util.impl.SourceStatus |
getSourceStatus()
Returns the known SourceStatus of this Cached Source.
|
String |
getTitle()
Returns the title of the describable item.
|
String |
getVersion()
Retrieve the version.
|
int |
hashCode() |
boolean |
isAvailable()
This method states whether this source is available, typically connecting and performing some
sort of simple query or ping to the native catalog.
|
boolean |
isAvailable(SourceMonitor callback)
This method is the same as
Source.isAvailable() but allows a caller to provide a SourceMonitor callback object which is meant to be used as a way for the Source to
dynamically contact the caller with its availability. |
SourceResponse |
query(QueryRequest request) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetSecurityAttributespublic CachedSource(Source source)
public String getVersion()
DescribablegetVersion in interface Describablepublic String getId()
Describablehtml for a MetacardTransformer that transforms Metacards to HTMLgetId in interface Describablepublic String getTitle()
DescribablegetTitle in interface Describablepublic String getDescription()
DescribablegetDescription in interface Describablepublic String getOrganization()
DescribablegetOrganization in interface Describablepublic boolean isAvailable()
SourceThis is expected to be an expensive operation, possibly involving network I/O.
Typically only CatalogFramework implementations will call this and only
periodically.
isAvailable in interface Sourceddf.catalog.util.SourcePollerpublic boolean isAvailable(SourceMonitor callback)
SourceSource.isAvailable() but allows a caller to provide a SourceMonitor callback object which is meant to be used as a way for the Source to
dynamically contact the caller with its availability. The intent is to return a boolean as to
whether the Source is available at this very moment and also to use the SourceMonitor object to update the caller of this method if this Source's availability changes
later in the future.isAvailable in interface Sourcecallback - - used to notify the caller of this method when the Source object wants
to update its availability.public SourceResponse query(QueryRequest request) throws UnsupportedQueryException
query in interface Sourcerequest - the query to executeSourceResponse with query results and query response detailsUnsupportedQueryException - when the query is not understood, malformed, or not supported
by a Sourcepublic Set<ContentType> getContentTypes()
SourceContentTypes that are currently stored by the Source. Notice the
return object is a Set, meaning it returns all unique content types found in the Source
without duplications.getContentTypes in interface SourceSet of ContentTypes currently available from this Source.public ddf.catalog.util.impl.SourceStatus getSourceStatus()
public void checkStatus()
public String getAttributeValue(String attr)
attr - The attribute value requestedThis work is licensed under a Creative Commons Attribution 4.0 International License.