public class DicooglePlatformProxy extends java.lang.Object implements DicooglePlatformInterface
Constructor and Description |
---|
DicooglePlatformProxy(PluginController pluginController) |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<IndexerInterface> |
getAllIndexPlugins()
Obtains a collection of all active index plugins.
|
java.util.Collection<QueryInterface> |
getAllQueryPlugins()
Obtains a collection of all active query plugins.
|
java.util.Collection<QueryInterface> |
getQueryPlugins(boolean onlyEnabled)
Obtains all installed query plugins.
|
QueryInterface |
getQueryProviderByName(java.lang.String name,
boolean onlyEnabled)
Gets the query provider with the given name.
|
java.util.List<java.lang.String> |
getQueryProvidersName(boolean enabled)
Gets the names of all query providers.
|
ServerSettingsReader |
getSettings()
Obtain access to the server's settings.
|
StorageInterface |
getStorageForSchema(java.lang.String schema)
Obtains the storage interface for handling storage of the given scheme.
|
StorageInterface |
getStorageForSchema(java.net.URI location)
Obtains the storage interface for handling content in the given location.
|
StorageInterface |
getStoragePluginForSchema(java.lang.String storage)
Obtains the storage interface for handling storage of the given scheme.
|
java.util.Collection<StorageInterface> |
getStoragePlugins(boolean onlyEnabled)
Obtains all installed storage plugins.
|
java.util.List<Task<Report>> |
index(java.net.URI path)
Easily performs an indexation procedure over all active indexers.
|
java.util.List<Report> |
indexBlocking(java.net.URI path)
Easily performs an indexation procedure over all active indexers.
|
JointQueryTask |
query(JointQueryTask holder,
java.util.List<java.lang.String> querySources,
java.lang.String query,
java.lang.Object... parameters)
Easily performs a query over multiple providers.
|
Task<java.lang.Iterable<SearchResult>> |
query(java.lang.String querySource,
java.lang.String query,
java.lang.Object... parameters)
Easily performs a query over a specific provider.
|
JointQueryTask |
queryAll(JointQueryTask holder,
java.lang.String query,
java.lang.Object... parameters)
Easily performs a query over all query providers.
|
IndexerInterface |
requestIndexPlugin(java.lang.String name)
Gets an installed indexer plugin by name.
|
QueryInterface |
requestQueryPlugin(java.lang.String name)
Gets an installed query plugin by name.
|
java.lang.Iterable<StorageInputStream> |
resolveURI(java.net.URI location,
java.lang.Object... args)
Quickly obtains all storage elements at the given location.
|
public DicooglePlatformProxy(PluginController pluginController)
public IndexerInterface requestIndexPlugin(java.lang.String name)
DicooglePlatformInterface
requestIndexPlugin
in interface DicooglePlatformInterface
name
- the name of the pluginpublic QueryInterface requestQueryPlugin(java.lang.String name)
DicooglePlatformInterface
requestQueryPlugin
in interface DicooglePlatformInterface
name
- the name of the pluginpublic java.util.Collection<IndexerInterface> getAllIndexPlugins()
DicooglePlatformInterface
getAllIndexPlugins
in interface DicooglePlatformInterface
IndexerInterface
public java.util.Collection<QueryInterface> getAllQueryPlugins()
DicooglePlatformInterface
getAllQueryPlugins
in interface DicooglePlatformInterface
QueryInterface
public StorageInterface getStoragePluginForSchema(java.lang.String storage)
DicooglePlatformInterface
getStoragePluginForSchema
in interface DicooglePlatformInterface
storage
- the storage schemenull
if no storage plugin
installed can.public StorageInterface getStorageForSchema(java.net.URI location)
DicooglePlatformInterface
getStorageForSchema
in interface DicooglePlatformInterface
location
- the storage location to checknull
if no storage plugin
installed canpublic java.lang.Iterable<StorageInputStream> resolveURI(java.net.URI location, java.lang.Object... args)
DicooglePlatformInterface
resolveURI
in interface DicooglePlatformInterface
location
- the location to retrieveargs
- a variable list of extra parameters for the retrievepublic java.util.Collection<StorageInterface> getStoragePlugins(boolean onlyEnabled)
DicooglePlatformInterface
getStoragePlugins
in interface DicooglePlatformInterface
onlyEnabled
- whether only enabled plugins should be retrieved (all are retrieved if false
)public StorageInterface getStorageForSchema(java.lang.String schema)
DicooglePlatformInterface
DicooglePlatformInterface.getStoragePluginForSchema(java.lang.String)
.getStorageForSchema
in interface DicooglePlatformInterface
schema
- the storage schemenull
if no storage plugin
installed canpublic java.util.Collection<QueryInterface> getQueryPlugins(boolean onlyEnabled)
DicooglePlatformInterface
getQueryPlugins
in interface DicooglePlatformInterface
onlyEnabled
- whether only enabled plugins should be retrieved (all are retrieved if false
)public java.util.List<java.lang.String> getQueryProvidersName(boolean enabled)
DicooglePlatformInterface
getQueryProvidersName
in interface DicooglePlatformInterface
enabled
- whether only enabled plugins should be retrieved (all are retrieved if false
)public QueryInterface getQueryProviderByName(java.lang.String name, boolean onlyEnabled)
DicooglePlatformInterface
getQueryProviderByName
in interface DicooglePlatformInterface
name
- the unique name of the provideronlyEnabled
- whether only enabled plugins should be retrieved (all are retrieved if false
)public JointQueryTask queryAll(JointQueryTask holder, java.lang.String query, java.lang.Object... parameters)
DicooglePlatformInterface
queryAll
in interface DicooglePlatformInterface
holder
- a query task holder containing callback methodsquery
- a string describing the queryparameters
- a variable list of extra parameters for the querypublic Task<java.lang.Iterable<SearchResult>> query(java.lang.String querySource, java.lang.String query, java.lang.Object... parameters)
DicooglePlatformInterface
query
in interface DicooglePlatformInterface
querySource
- the name of the query provider to issuequery
- a string describing the queryparameters
- a variable list of extra parameters for the querypublic JointQueryTask query(JointQueryTask holder, java.util.List<java.lang.String> querySources, java.lang.String query, java.lang.Object... parameters)
DicooglePlatformInterface
query
in interface DicooglePlatformInterface
holder
- a query task holder containing callback methodsquerySources
- a list of names of query providers to issuequery
- a string describing the queryparameters
- a variable list of extra parameters for the querypublic java.util.List<Task<Report>> index(java.net.URI path)
DicooglePlatformInterface
index
in interface DicooglePlatformInterface
path
- the path to indexpublic java.util.List<Report> indexBlocking(java.net.URI path)
DicooglePlatformInterface
indexBlocking
in interface DicooglePlatformInterface
path
- the path to indexpublic ServerSettingsReader getSettings()
DicooglePlatformInterface
getSettings
in interface DicooglePlatformInterface