public class OpenSearchDataSourceResource
extends org.gcube.common.core.state.GCUBEWSResource
| Modifier and Type | Field and Description |
|---|---|
List<String> |
allPresentableNames |
protected boolean |
bInitializing
Is the resource in the initialization state or not?
|
org.gcube.opensearch.opensearchoperator.resource.ISOpenSearchResourceCache |
cache |
org.gcube.opensearch.opensearchoperator.resource.ISOpenSearchResource[] |
openSearchGenericResources |
List<String> |
presentableFields |
static String |
RP_ADAPTOR_ID
The list of standard resource properties defined by every OpenSearch WS resource
|
static String |
RP_COLLECTION_ID |
static String |
RP_DESCRIPTION_DOCUMENT_URI |
static String |
RP_FIELDS |
static String |
RP_FIXEDPARAMETERS |
static String |
RP_OPENSEARCH_RESOURCE |
static String |
RP_SUPPORTED_RELATIONS |
protected static String[] |
RPNames |
List<String> |
searchableFields |
| Constructor and Description |
|---|
OpenSearchDataSourceResource()
Empty constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCachedOpenSearchResource(String ddURL,
org.gcube.common.core.informationsystem.client.XMLResult resource)
Adds an OpenSearch Resource to the brokered provider's resource cache
|
void |
addCachedOpenSearchResources(Map<String,org.gcube.common.core.informationsystem.client.XMLResult> resources)
Adds the OpenSearch Resources contained in the map to the brokered provider's resource cache
|
void |
addCollectionID(String collectionID)
Adds a collection id to the collectionID resource property
|
void |
addDescriptionDocumentURI(String descriptionDocumentURI) |
void |
addProviders(String[] fields,
String[] collectionIds,
String[] openSearchResourceIDs,
String[][] fixedParams) |
protected void |
filterFieldInfo(List<String> presentableFields,
List<String> searchableFields) |
String |
getAdaptorID()
Getter method for the AdaptorID Resource Property
|
org.gcube.opensearch.opensearchoperator.resource.OpenSearchResource |
getCachedOpenSearchResource(String ddURL)
Returns the cached OpenSearch Resource of a brokered provider whose description document URL is ddURL
|
List<org.gcube.opensearch.opensearchoperator.resource.OpenSearchResource> |
getCachedOpenSearchResources()
Returns all cached OpenSearch Resources of the brokered providers associated with the provider of this WS-Resource
|
String[] |
getCollectionID()
Getter method for the CollectionID list Resource Property
|
Document |
getDescriptionDocument(int i)
Getter method for the cached Description document
|
String[] |
getDescriptionDocumentURI()
Getter method for the DescriptionDocumentURI list Resource Property
|
String |
getDescriptionDocumentURI(int i)
Getter method for the DescriptionDocument Resource Property
|
String[] |
getFields()
Getter method for the Fields list Resource Property
|
String[] |
getFixedParameters()
Getter method for the FixedParameters list Resource Property
|
gr.uoa.di.madgik.environment.hint.EnvHintCollection |
getISEnvHints()
Retrieves the
InformationSystem environmental hints that this resource is using |
String[] |
getOpenSearchResource()
Getter method for the OpenSearchResource list Resource Property
|
String |
getOpenSearchResource(int i)
Getter method for the OpenSearchResource Resource Property
|
String[] |
getPropertyNames()
Retrieves the property names
|
protected void |
initialise(Object... args)
This method is used to initialize the resource instance, and must be called before using the resource instance.
|
boolean |
isInitializing()
Returns the current initialization state of the resource
|
protected void |
onLoad(ObjectInputStream ois,
boolean firstLoad)
Invoked when a resource is being created from a serialized, previously saved state.
|
void |
onResourceRemoval() |
protected void |
onStore(ObjectOutputStream oos)
Invoked when the state of the resource must be saved (resource serialization)
|
URI |
query(String cqlQuery)
Performs a query on the OpenSearch provider that is connected to this resource.
|
static org.gcube.common.core.informationsystem.client.XMLResult |
retrieveGenericResource(String id,
org.gcube.common.core.scope.GCUBEScope scope)
Retrieves a generic resource using the IS
|
static String[] |
retrieveTemplates(org.gcube.opensearch.opensearchlibrary.DescriptionDocument dd,
org.gcube.opensearch.opensearchoperator.resource.OpenSearchResource res) |
void |
setAdaptorID(String adaptorID)
Setter method for the AdaptorID Resource Property
|
void |
setCollectionID(String[] collectionIDs)
Setter method for the CollectionID list Resource Property
|
void |
setDescriptionDocumentURI(String descriptionDocumentURI)
Setter method for the DescriptionDocument Resource Property
|
void |
setDescriptionDocumentURI(String[] descriptionDocumentURIs)
Setter method for the DescriptionDocumentURI list Resource Property
|
void |
setFixedParameters(String[] fixedParameters)
Setter method for the FixedParameters list Resource Property
|
void |
setIsInitializing(boolean isInitializing)
Specifies the current state of the resource (initializing or not)
|
void |
setOpenSearchResource(String openSearchResource)
Setter method for the OpenSearchResource Resource Property
|
void |
setOpenSearchResource(String[] openSearchResource)
Setter method for the OpenSearchResource list Resource Property
|
void |
store() |
getCurrentTime, getEPR, getPorttypeContext, getProperty, getPublisher, getResourcePropertySet, getServiceContext, getTerminationTime, getTopicList, getTopicNames, initialise, initialiseContainers, inScope, load, publish, setPortTypeContext, setTerminationTime, unpublishgetID, getLock, getScheduledTasks, getScope, launchTask, onRemove, setID, setPersistenceDelegate, stopTaskpublic org.gcube.opensearch.opensearchoperator.resource.ISOpenSearchResource[] openSearchGenericResources
public org.gcube.opensearch.opensearchoperator.resource.ISOpenSearchResourceCache cache
public static final String RP_ADAPTOR_ID
public static final String RP_COLLECTION_ID
public static final String RP_SUPPORTED_RELATIONS
public static final String RP_FIELDS
public static final String RP_DESCRIPTION_DOCUMENT_URI
public static final String RP_FIXEDPARAMETERS
public static final String RP_OPENSEARCH_RESOURCE
protected static String[] RPNames
protected boolean bInitializing
public OpenSearchDataSourceResource()
public static String[] retrieveTemplates(org.gcube.opensearch.opensearchlibrary.DescriptionDocument dd, org.gcube.opensearch.opensearchoperator.resource.OpenSearchResource res) throws Exception
Exceptionpublic String[] getPropertyNames()
getPropertyNames in class org.gcube.common.core.state.GCUBEWSResourcepublic boolean isInitializing()
public void setIsInitializing(boolean isInitializing)
isInitializing - the initialization state to setprotected void initialise(Object... args) throws Exception
initialise in class org.gcube.common.core.state.GCUBEWSResourcekey - String - used as the key for this OpenSearch adaptorcollectionIDs - String[] - a list of IDs of the collections(for now we have only one collection) that refer to this OpenSearch adaptorgenericResource - String - the openSearch generic resource expressed as an XMLResultopenSearchResource - String - the ID of the openSearch generic resourcefixedParameters - String - parameters that must be fixed in the templates of a broker, in the broker-caseExceptionpublic void addProviders(String[] fields, String[] collectionIds, String[] openSearchResourceIDs, String[][] fixedParams) throws Exception
Exceptionprotected void onLoad(ObjectInputStream ois, boolean firstLoad) throws Exception
ois - the input stream through which the state can be readindicates - if the resource is being loaded for the first time (hard load) or not (soft load)Exception - an error occured during resource deserializationprotected void onStore(ObjectOutputStream oos) throws Exception
oos - the output stream to write the resource state toException - an error occured during resource serializationpublic static org.gcube.common.core.informationsystem.client.XMLResult retrieveGenericResource(String id, org.gcube.common.core.scope.GCUBEScope scope) throws Exception
id - The id of the generic resource to retrievescope - The scope to useException - In case of errorpublic void store()
store in interface org.globus.wsrf.PersistenceCallbackstore in class org.gcube.common.core.state.GCUBEStatefulResource<org.gcube.common.core.state.GCUBEWSResourceKey>public String getAdaptorID()
String the requested adaptorIDpublic void setAdaptorID(String adaptorID)
adaptorID - String the new AdaptorIDpublic String[] getFields()
String[] the requested Fieldspublic String[] getCollectionID()
String[] the requested CollectionIDspublic void setCollectionID(String[] collectionIDs) throws Exception
collectionIDs - String[] the new CollectionIDsExceptionpublic void addCollectionID(String collectionID)
collectionID - String -the ID to be addedpublic String[] getDescriptionDocumentURI()
String[] the requested DescriptionDocumentURIspublic String getDescriptionDocumentURI(int i)
String the requested DescriptionDocumentURIpublic void setDescriptionDocumentURI(String descriptionDocumentURI) throws Exception
descriptionDocumentURI - String the new DescriptionDocumentURIException - In case of errorpublic void addDescriptionDocumentURI(String descriptionDocumentURI) throws Exception
Exceptionpublic void setDescriptionDocumentURI(String[] descriptionDocumentURIs) throws Exception
descriptionDocumentURIs - String[] the new DescriptionDocumentURIsException - In case of errorpublic String[] getFixedParameters()
String[] the requested FixedParameterspublic void setFixedParameters(String[] fixedParameters) throws Exception
fixedParameters - String[] the new FixedParametersException - In case of errorpublic String getOpenSearchResource(int i)
String the OpenSearchResource IDpublic String[] getOpenSearchResource()
String the OpenSearchResource IDpublic void setOpenSearchResource(String openSearchResource)
openSearchResource - String the new OpenSearchResource IDpublic void setOpenSearchResource(String[] openSearchResource)
openSearchResource - String the new OpenSearchResource IDpublic Document getDescriptionDocument(int i)
public org.gcube.opensearch.opensearchoperator.resource.OpenSearchResource getCachedOpenSearchResource(String ddURL)
ddURL - the URL of the brokered provider's description documentpublic List<org.gcube.opensearch.opensearchoperator.resource.OpenSearchResource> getCachedOpenSearchResources()
public void addCachedOpenSearchResource(String ddURL, org.gcube.common.core.informationsystem.client.XMLResult resource) throws Exception
ddURL - the URL of the brokered provider's description documentresource - the OpenSearch Resource for the brokered providerException - In case of errorpublic void addCachedOpenSearchResources(Map<String,org.gcube.common.core.informationsystem.client.XMLResult> resources) throws Exception
resources - A map containing a mappings from description document URLs to OpenSearch Resources for
each brokered providerException - In case of errorpublic URI query(String cqlQuery) throws RemoteException
queryString - String - the query to be performed (using custom
syntax @see )URI - representation of the EPR for a resultset service which holds the results of the query.RemoteException - In case of errorpublic gr.uoa.di.madgik.environment.hint.EnvHintCollection getISEnvHints()
InformationSystem environmental hints that this resource is usingpublic void onResourceRemoval()
Copyright © 2014. All Rights Reserved.