|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.kwfgrid.gwes.XMLDB
public class XMLDB
Singleton pattern. Assumes that workflows and resources are in the same eXist database.
| Method Summary | |
|---|---|
protected String |
connectAdmin()
Used by the XMLDBSessionManager. |
protected String |
connectQuery()
Used by the XMLDBSessionManager. |
protected void |
disconnectAdmin(String sessionId)
Used by the XMLDBSessionManager. |
protected void |
disconnectQuery(String sessionId)
Used by the XMLDBSessionManager. |
String[] |
getAvailableResources(String ofClass)
Get a list of all available resources. |
String[] |
getCheckpoints(String workflowID)
|
String[] |
getData(String workflowID,
String placeID)
|
String |
getDescription(String workflowID)
|
String |
getEarliestWorkflowXML(String workflowID)
|
String[] |
getFaultToleranceStatistics()
|
static XMLDB |
getFirstInstance(String xmldbUrl,
String user,
String password)
Create a new xmldb instance with url, username and password. |
ActivityDescription |
getGRAMActivityDescription(net.kwfgrid.gworkflowdl.structure.OperationCandidate op)
Lookup GRAM activity description for specific hardware/software. |
float |
getHardwareQuality(String resourceUri)
|
static XMLDB |
getInstance()
Get the xmldb instance or create a new one if null. |
String |
getLatestWorkflowDocument(String collectionStr)
|
String |
getLatestWorkflowXML(String workflowID)
|
String[][] |
getProperties(String workflowID)
|
String |
getProperty(String workflowID,
String name)
|
String |
getResourceDescription(String resourceUri)
|
DistributionSet |
getResourceDurationStatistics(String operationName,
String resourceName)
|
String |
getSpecificWorkflowXML(String resourcePath)
|
int |
getStatus(String workflowID)
|
String[] |
getTemporaryWorkflowDirectories(String workflowID)
|
String[] |
getWorkflowIDs()
|
String[] |
getWorkflowStatistics()
|
Map<String,String[]> |
getWorkflowStatusMap()
|
String |
getWSActivityDescription(net.kwfgrid.gworkflowdl.structure.OperationCandidate op)
Lookup WS activity description for specific WSOperation. |
void |
incrementResourceScore(String resourceUri,
int increment)
Increment or decrement the score of a resource. |
String |
lookupManagedJobFactoryService(String resourceUri)
|
void |
removeWorkflow(String workflowID)
|
void |
setDescription(String workflowID,
String description)
|
void |
setProperty(String workflowID,
String name,
String value)
|
void |
storeTemporaryWorkflowDirectory(String resourceUri,
String host,
String directory,
String workflowID,
String activityID)
|
void |
storeTokenData(String workflowID,
String placeID,
net.kwfgrid.gworkflowdl.structure.Token token,
String[] owls)
Store a data token in the XML database. |
String |
storeWorkflow(net.kwfgrid.gworkflowdl.structure.Workflow workflow)
|
void |
updateResourceDurationStatistics(String operationName,
String resourceName,
DistributionSet distSet)
|
QueryServiceStub.QueryResponse |
xQueryResponse(String xquery)
|
String[] |
xQueryResult(String xquery)
|
String |
xQueryResult0(String xquery)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static XMLDB getInstance()
throws DatabaseException
null if there an exception occurs.
DatabaseException
public static XMLDB getFirstInstance(String xmldbUrl,
String user,
String password)
throws DatabaseException
DatabaseException
protected String connectQuery()
throws DatabaseException
DatabaseException
protected void disconnectQuery(String sessionId)
throws DatabaseException
sessionId -
DatabaseException
protected String connectAdmin()
throws DatabaseException
DatabaseException
protected void disconnectAdmin(String sessionId)
throws DatabaseException
sessionId -
DatabaseException
public String[] xQueryResult(String xquery)
throws DatabaseException
DatabaseException
public String xQueryResult0(String xquery)
throws DatabaseException
DatabaseException
public QueryServiceStub.QueryResponse xQueryResponse(String xquery)
throws DatabaseException
DatabaseException
public String storeWorkflow(net.kwfgrid.gworkflowdl.structure.Workflow workflow)
throws DatabaseException
DatabaseException
public int getStatus(String workflowID)
throws DatabaseException,
NoSuchWorkflowException
DatabaseException
NoSuchWorkflowException
public String[] getCheckpoints(String workflowID)
throws DatabaseException
DatabaseException
public String getSpecificWorkflowXML(String resourcePath)
throws DatabaseException
DatabaseException
public String getLatestWorkflowXML(String workflowID)
throws DatabaseException,
NoSuchWorkflowException
DatabaseException
NoSuchWorkflowException
public String getEarliestWorkflowXML(String workflowID)
throws DatabaseException
DatabaseException
public void storeTokenData(String workflowID,
String placeID,
net.kwfgrid.gworkflowdl.structure.Token token,
String[] owls)
throws DatabaseException
workflowID - placeID - token - owls -
DatabaseException
public String getWSActivityDescription(net.kwfgrid.gworkflowdl.structure.OperationCandidate op)
throws DatabaseException
op -
DatabaseException
public ActivityDescription getGRAMActivityDescription(net.kwfgrid.gworkflowdl.structure.OperationCandidate op)
throws DatabaseException
op -
DatabaseException
public String lookupManagedJobFactoryService(String resourceUri)
throws DatabaseException
DatabaseException
public String[] getWorkflowStatistics()
throws DatabaseException
DatabaseException
public float getHardwareQuality(String resourceUri)
throws DatabaseException
DatabaseException
public void incrementResourceScore(String resourceUri,
int increment)
throws DatabaseException
resourceUri - The URI of the resource.increment - can be positive to increase or negative to decrease the score.
DatabaseException
public DistributionSet getResourceDurationStatistics(String operationName,
String resourceName)
throws DatabaseException
DatabaseException
public void updateResourceDurationStatistics(String operationName,
String resourceName,
DistributionSet distSet)
throws DatabaseException
DatabaseException
public void storeTemporaryWorkflowDirectory(String resourceUri,
String host,
String directory,
String workflowID,
String activityID)
throws DatabaseException
DatabaseException
public String[] getTemporaryWorkflowDirectories(String workflowID)
throws DatabaseException
DatabaseException
public void removeWorkflow(String workflowID)
throws DatabaseException,
NoSuchWorkflowException
DatabaseException
NoSuchWorkflowException
public String[] getWorkflowIDs()
throws DatabaseException
DatabaseException
public String[] getData(String workflowID,
String placeID)
throws DatabaseException,
NoSuchWorkflowException
DatabaseException
NoSuchWorkflowException
public Map<String,String[]> getWorkflowStatusMap()
throws DatabaseException
DatabaseException
public String getDescription(String workflowID)
throws DatabaseException,
NoSuchWorkflowException
DatabaseException
NoSuchWorkflowException
public void setDescription(String workflowID,
String description)
throws DatabaseException,
NoSuchWorkflowException
DatabaseException
NoSuchWorkflowException
public void setProperty(String workflowID,
String name,
String value)
throws DatabaseException,
NoSuchWorkflowException
DatabaseException
NoSuchWorkflowException
public String getProperty(String workflowID,
String name)
throws DatabaseException,
NoSuchWorkflowException
DatabaseException
NoSuchWorkflowException
public String[][] getProperties(String workflowID)
throws DatabaseException,
NoSuchWorkflowException
DatabaseException
NoSuchWorkflowException
public String[] getFaultToleranceStatistics()
throws DatabaseException,
NoSuchWorkflowException
DatabaseException
NoSuchWorkflowException
public String[] getAvailableResources(String ofClass)
throws DatabaseException
String[] resources = getAvailableResources("urn:dgrdl:software");
resources[0]=
<resource>
<uri>software:cat-fhrg</uri> // Operation URI
<classUri>urn:dgrdl:software:cat</classUri> // Operation Class URI (workflow: operationClass name="...")
<name>cat</name> // Operation Name
<description>Program that concatenates two files<description> // Operation Description
</resource>
ofClass - The class which this resource should be part of. This method only checkes whether the class starts
with the given ofClass parameter, e.g., "urn:dgrdl:software" would match both classes: "urn:dgrdl:software:A"
as well as "urn:dgrdl:software:B". If ofClass is null then all classes of resources are
returned.
DatabaseException
public String getResourceDescription(String resourceUri)
throws DatabaseException
DatabaseException
public String getLatestWorkflowDocument(String collectionStr)
throws DatabaseException,
NoSuchWorkflowException
DatabaseException
NoSuchWorkflowException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||