org.gcube.application.framework.vremanagement.vremanagement.impl
Class ISInfo

java.lang.Object
  extended by org.gcube.application.framework.vremanagement.vremanagement.impl.ISInfo
All Implemented Interfaces:
ISInfoI

public class ISInfo
extends Object
implements ISInfoI

Author:
Valia Tsaqgkalidou (NKUA)

Field Summary
protected static org.gcube.common.core.informationsystem.client.ISClient client
          is client in order to query IS
protected static org.gcube.common.core.informationsystem.publisher.ISPublisher publisher
           
protected  org.gcube.application.framework.core.session.ASLSession session
          ASLSession to be used
 
Constructor Summary
ISInfo(org.gcube.application.framework.core.session.ASLSession session)
          Constructs a ISInfo object
 
Method Summary
 void addExternalRIToVRE(File file)
          
 void addGHNToScope(String url)
          Adds a GHN to the active VRE
 void addRIToScope(String url, String className, String name)
          Adds a service to the active VRE
 boolean existsGHN(String namePort)
          
 org.gcube.common.core.resources.GCUBECollection getCollection(org.gcube.common.core.scope.GCUBEScope scope, String collectionID)
          Return a collection profile.
 List<org.gcube.common.core.informationsystem.client.RPDocument> getCollectionIndices(org.gcube.common.core.scope.GCUBEScope scope, String collectionID)
          Return all indices associated with a given collection.
 List<org.gcube.common.core.resources.GCUBECollection> getCollections(org.gcube.common.core.scope.GCUBEScope scope)
          Returns all profiles of collections present in the given scope.
 List<org.gcube.common.core.informationsystem.client.RPDocument> getIndices(org.gcube.common.core.scope.GCUBEScope scope, String mcollectionID)
          Return all indices associated with a given metadata collection.
 List<org.gcube.common.core.resources.GCUBEMCollection> getMCollections(org.gcube.common.core.scope.GCUBEScope scope, String collectionID)
          Return all metadata-collections associated with the given collection.
 List<org.gcube.common.core.informationsystem.client.RPDocument> getWS(String type)
          
 List<org.gcube.common.core.informationsystem.client.RPDocument> getXMLIndices(org.gcube.common.core.scope.GCUBEScope scope, String mcollectionID)
          Return all XML indices associated with the given metadata collection.
 List<org.gcube.common.core.informationsystem.client.XMLResult> queryIS(String query)
          
 void removeExternalRIToVRE(String id)
          
 void removeGHNToScope(String url)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

session

protected org.gcube.application.framework.core.session.ASLSession session
ASLSession to be used


client

protected static org.gcube.common.core.informationsystem.client.ISClient client
is client in order to query IS


publisher

protected static org.gcube.common.core.informationsystem.publisher.ISPublisher publisher
Constructor Detail

ISInfo

public ISInfo(org.gcube.application.framework.core.session.ASLSession session)
Constructs a ISInfo object

Parameters:
session - the D4Science session to be used for retrieving information needed
Method Detail

queryIS

public List<org.gcube.common.core.informationsystem.client.XMLResult> queryIS(String query)

Specified by:
queryIS in interface ISInfoI
Parameters:
query - an XQuery to be submitted on IS
Returns:
a list of XMLResults that represent resources form IS (like RIs, Generic Resources, Collections, etc)

getWS

public List<org.gcube.common.core.informationsystem.client.RPDocument> getWS(String type)

Specified by:
getWS in interface ISInfoI
Parameters:
type - the of the WSs to be retrieved
Returns:
a list of RPDocuments

addGHNToScope

public void addGHNToScope(String url)
Adds a GHN to the active VRE

Specified by:
addGHNToScope in interface ISInfoI
Parameters:
url - the GHN url

removeGHNToScope

public void removeGHNToScope(String url)

Specified by:
removeGHNToScope in interface ISInfoI
Parameters:
url - server:port of the GHN to be removed

addRIToScope

public void addRIToScope(String url,
                         String className,
                         String name)
Adds a service to the active VRE

Specified by:
addRIToScope in interface ISInfoI
Parameters:
url - the Running Instance url
className - the name of the class where the RI will belong
name - the name of teh service it provides

addExternalRIToVRE

public void addExternalRIToVRE(File file)

Specified by:
addExternalRIToVRE in interface ISInfoI
Parameters:
file - the file that contains the external running instance to be added

removeExternalRIToVRE

public void removeExternalRIToVRE(String id)

Specified by:
removeExternalRIToVRE in interface ISInfoI
Parameters:
id - the id of the external running instance to be removed

existsGHN

public boolean existsGHN(String namePort)

Specified by:
existsGHN in interface ISInfoI
Parameters:
namePort - GHN name:port
Returns:
true if GHN exists, otherwise false

getCollections

public List<org.gcube.common.core.resources.GCUBECollection> getCollections(org.gcube.common.core.scope.GCUBEScope scope)
                                                                     throws Exception
Returns all profiles of collections present in the given scope.

Specified by:
getCollections in interface ISInfoI
Parameters:
scope - the scope of the collections.
Returns:
a list of collections profile.
Throws:
Exception - when an error occurs.

getMCollections

public List<org.gcube.common.core.resources.GCUBEMCollection> getMCollections(org.gcube.common.core.scope.GCUBEScope scope,
                                                                              String collectionID)
                                                                       throws Exception
Return all metadata-collections associated with the given collection.

Specified by:
getMCollections in interface ISInfoI
Parameters:
scope - the scope of the metadata collections.
collectionID - the associated collection.
Returns:
a list of metadata collections profile.
Throws:
Exception

getXMLIndices

public List<org.gcube.common.core.informationsystem.client.RPDocument> getXMLIndices(org.gcube.common.core.scope.GCUBEScope scope,
                                                                                     String mcollectionID)
                                                                              throws Exception
Return all XML indices associated with the given metadata collection.

Specified by:
getXMLIndices in interface ISInfoI
Parameters:
scope - the indices scope.
mcollectionID - the metadata collection id.
Returns:
a list of Resource document.
Throws:
Exception

getIndices

public List<org.gcube.common.core.informationsystem.client.RPDocument> getIndices(org.gcube.common.core.scope.GCUBEScope scope,
                                                                                  String mcollectionID)
                                                                           throws Exception
Return all indices associated with a given metadata collection.

Specified by:
getIndices in interface ISInfoI
Parameters:
scope - the indices scope.
mcollectionID - the metadata collection id.
Returns:
a list of Resource document.
Throws:
Exception

getCollectionIndices

public List<org.gcube.common.core.informationsystem.client.RPDocument> getCollectionIndices(org.gcube.common.core.scope.GCUBEScope scope,
                                                                                            String collectionID)
                                                                                     throws Exception
Return all indices associated with a given collection.

Specified by:
getCollectionIndices in interface ISInfoI
Parameters:
scope - the indices scope.
collectionID - the collection id.
Returns:
a list of Resource document.
Throws:
Exception

getCollection

public org.gcube.common.core.resources.GCUBECollection getCollection(org.gcube.common.core.scope.GCUBEScope scope,
                                                                     String collectionID)
                                                              throws Exception
Return a collection profile.

Specified by:
getCollection in interface ISInfoI
Parameters:
scope - the collection scope.
collectionID - the collection id.
Returns:
a collection profile.
Throws:
Exception


Copyright © 2013. All Rights Reserved.