org.yawlfoundation.yawl.scheduling
Class Case

java.lang.Object
  extended by org.yawlfoundation.yawl.scheduling.Case

public class Case
extends Object

Represents a YAWL case

Author:
sga, jku

Field Summary
protected  String caseId
           
 
Constructor Summary
Case(String id)
           
Case(String caseId, String caseName, String caseDescription, org.jdom.Document rup)
           
 
Method Summary
 String getCaseDescription()
           
 String getCaseId()
           
 String getCaseName()
           
 List<org.jdom.Element> getData()
           
 String getDescription()
           
 long getId()
           
 String getParentNetId(String id)
          Returns ID of parent net
 org.jdom.Document getRUP()
           
 String getRupAsString()
           
 String getSavedBy()
           
 String getText(int depth, String xPath)
          Gets the value for an XPath expression for an Element at a specified depth in the case's data
 String getText(String xPath)
          Traverses case data attempting to find an element that returns a non-null result for an XPath expression
 long getTimestamp()
           
 boolean isActive()
           
 String readCaseData(String caseId)
          Read case data from the YAWL work queue
 void setActive(boolean active)
           
 void setCaseId(String id)
           
 void setCaseName(String name)
           
 void setDescription(String desc)
           
 void setId(long id)
           
 void setRUP(org.jdom.Document doc)
           
 void setRupAsString(String ras)
           
 void setSavedBy(String saver)
           
 void setTimestamp(long time)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

caseId

protected String caseId
Constructor Detail

Case

public Case(String id)

Case

public Case(String caseId,
            String caseName,
            String caseDescription,
            org.jdom.Document rup)
Method Detail

getId

public long getId()

setId

public void setId(long id)

getCaseId

public String getCaseId()

setCaseId

public void setCaseId(String id)

getCaseName

public String getCaseName()

setCaseName

public void setCaseName(String name)

getCaseDescription

public String getCaseDescription()

getDescription

public String getDescription()

setDescription

public void setDescription(String desc)

getRUP

public org.jdom.Document getRUP()

setRUP

public void setRUP(org.jdom.Document doc)

getSavedBy

public String getSavedBy()

setSavedBy

public void setSavedBy(String saver)

isActive

public boolean isActive()

setActive

public void setActive(boolean active)

getTimestamp

public long getTimestamp()

setTimestamp

public void setTimestamp(long time)

getRupAsString

public String getRupAsString()

setRupAsString

public void setRupAsString(String ras)

getData

public List<org.jdom.Element> getData()

readCaseData

public String readCaseData(String caseId)
                    throws IOException
Read case data from the YAWL work queue

Parameters:
caseId - the case to get the data for
Returns:
the net-level data for the case id
Throws:
IOException - if the case data can't be retrieved from the engine
See Also:
readCaseData()

getParentNetId

public String getParentNetId(String id)
Returns ID of parent net

If the Id passed as the argument is a root ID, it will be returned unchanged.

Parameters:
id - the id of a child net
Returns:
the id of its parent

getText

public String getText(int depth,
                      String xPath)
Gets the value for an XPath expression for an Element at a specified depth in the case's data

Parameters:
depth - the depth of the Element to use from the case data
xPath - the XPath expression
Returns:
the result of the XPath evaluation, or null if the depth exceeds the depth of the case data's Elements, or if the XPath expression evaluates to null, or if the Element result of the XPath expression contains no text

getText

public String getText(String xPath)
Traverses case data attempting to find an element that returns a non-null result for an XPath expression

Parameters:
xPath - the expression to evaluate
Returns:
the text matching the XPath evaluation, or null if no match is found


Copyright © 2004-2012 The YAWL Foundation.