|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.core.utils.handlers.GCUBEServiceClientImpl
org.gcube.common.core.state.GCUBEStatefulResource<org.gcube.common.core.state.GCUBEWSResourceKey>
org.gcube.common.core.state.GCUBEWSResource
org.gcube.opensearch.opensearchdatasource.OpenSearchDataSourceResource
public class OpenSearchDataSourceResource
A class containing stateful information regarding an OpenSearch adaptor.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.gcube.common.core.state.GCUBEStatefulResource |
|---|
org.gcube.common.core.state.GCUBEStatefulResource.LOCK, org.gcube.common.core.state.GCUBEStatefulResource.TaskContext |
| Field Summary | |
|---|---|
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
|
| Fields inherited from class org.gcube.common.core.state.GCUBEStatefulResource |
|---|
uuidGen |
| Constructor Summary | |
|---|---|
OpenSearchDataSourceResource()
Empty constructor. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class org.gcube.common.core.state.GCUBEWSResource |
|---|
getCurrentTime, getEPR, getPorttypeContext, getProperty, getPublisher, getResourcePropertySet, getServiceContext, getTerminationTime, getTopicList, getTopicNames, initialise, initialiseContainers, inScope, load, publish, setPortTypeContext, setTerminationTime, unpublish |
| Methods inherited from class org.gcube.common.core.state.GCUBEStatefulResource |
|---|
getID, getLock, getScheduledTasks, getScope, launchTask, onRemove, setID, setPersistenceDelegate, stopTask |
| Methods inherited from class org.gcube.common.core.utils.handlers.GCUBEServiceClientImpl |
|---|
getPortTypeMap, setPortTypeMap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public org.gcube.opensearch.opensearchoperator.resource.ISOpenSearchResource[] openSearchGenericResources
public org.gcube.opensearch.opensearchoperator.resource.ISOpenSearchResourceCache cache
public List<String> searchableFields
public List<String> presentableFields
public List<String> allPresentableNames
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
| Constructor Detail |
|---|
public OpenSearchDataSourceResource()
| Method Detail |
|---|
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 set
protected 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-case
Exception
public void addProviders(String[] fields,
String[] collectionIds,
String[] openSearchResourceIDs,
String[][] fixedParams)
throws Exception
Exception
protected 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 deserialization
protected void onStore(ObjectOutputStream oos)
throws Exception
oos - the output stream to write the resource state to
Exception - an error occured during resource serialization
public 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 use
Exception - 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 CollectionIDs
public void setCollectionID(String[] collectionIDs)
throws Exception
collectionIDs - String[] the new CollectionIDs
Exceptionpublic void addCollectionID(String collectionID)
collectionID - String -the ID to be addedpublic String[] getDescriptionDocumentURI()
String[] the requested DescriptionDocumentURIspublic String getDescriptionDocumentURI(int i)
String the requested DescriptionDocumentURI
public void setDescriptionDocumentURI(String descriptionDocumentURI)
throws Exception
descriptionDocumentURI - String the new DescriptionDocumentURI
Exception - In case of error
public void addDescriptionDocumentURI(String descriptionDocumentURI)
throws Exception
Exception
public void setDescriptionDocumentURI(String[] descriptionDocumentURIs)
throws Exception
descriptionDocumentURIs - String[] the new DescriptionDocumentURIs
Exception - In case of errorpublic String[] getFixedParameters()
String[] the requested FixedParameters
public void setFixedParameters(String[] fixedParameters)
throws Exception
fixedParameters - String[] the new FixedParameters
Exception - 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 document
public 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 provider
Exception - In case of error
public 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 provider
Exception - In case of error
public 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 using
public void onResourceRemoval()
protected void filterFieldInfo(List<String> presentableFields,
List<String> searchableFields)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||