public class Task extends WorkflowElement
Modifier and Type | Field and Description |
---|---|
boolean |
wasMerged |
relatedSentence
Constructor and Description |
---|
Task() |
Task(WorkflowElement parent,
Sentence s) |
Task(WorkflowElement parent,
Sentence s,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
addFacet(Facet fac)
Adds new facets to the task.
|
void |
addInProduct(Product p) |
void |
addOutProduct(Product p) |
boolean |
containsInProduct(java.lang.String name)
Checks if a task contains a product with a certain name
|
boolean |
containsOutProduct(java.lang.String name)
Checks if a task contains a product with a certain name
|
Task |
copy()
Creates a hard copy of the task
|
boolean |
equals(java.lang.Object obj) |
void |
exportWf2Xml(javax.xml.stream.XMLStreamWriter writer)
Writes the task, its products and facet into the stream.
|
java.util.ArrayList<Facet> |
getAllFacets()
Returns all facets
|
java.util.ArrayList<Product> |
getAllInProducts()
Returns all input products
|
java.util.ArrayList<Product> |
getAllOutProducts()
Returns all output products
|
boolean |
getDataflowAgg() |
java.lang.String |
getName() |
Facet |
getNextFacet()
Returns a facet of the task and deletes it.
|
Product |
getNextInProduct() |
Product |
getNextOutProduct() |
int |
hashCode() |
static Task |
merge(Task t1,
Task t2)
Merges two task.
|
void |
removeInProduct(Product prod) |
void |
removeOutProduct(Product prod) |
void |
setAllInProducts(java.util.ArrayList<Product> ip)
Replaces the ArrayList of input products by the parameter of the method
|
void |
setAllOutProducts(java.util.ArrayList<Product> ip)
Replaces the ArrayList of output products by the parameter of the method
|
void |
setDataflowAggTrue()
Marks that this task aggreates products.
|
void |
setName(java.lang.String name)
Set the name of the task
|
addRelSentence, getId, getParentElement, getResName, reset, setParentElement, setResName
public Task()
name
- the name of the taskpublic Task(WorkflowElement parent, Sentence s, java.lang.String name)
parent
- element of tasks
- sentence of which the task was extractedname
- name of the taskpublic Task(WorkflowElement parent, Sentence s)
public java.lang.String getName()
public boolean containsInProduct(java.lang.String name)
name
- public boolean containsOutProduct(java.lang.String name)
name
- public void setName(java.lang.String name)
name
- public void addInProduct(Product p)
p
- a Product to add as new input product of the taskpublic Product getNextInProduct()
public void removeInProduct(Product prod)
prod
- Removes the product from the list input-products.public void removeOutProduct(Product prod)
prod
- Removes the product from the list output-products.public void addOutProduct(Product p)
p
- a Product to add as new output product of the taskpublic Product getNextOutProduct()
public void addFacet(Facet fac)
f
- facet to addpublic Facet getNextFacet()
public void exportWf2Xml(javax.xml.stream.XMLStreamWriter writer)
exportWf2Xml
in class WorkflowElement
writer
- is the stream writer which is used to writepublic void setDataflowAggTrue()
public boolean getDataflowAgg()
public int hashCode()
hashCode
in class WorkflowElement
public boolean equals(java.lang.Object obj)
equals
in class WorkflowElement
public static Task merge(Task t1, Task t2)
t1
- first Taskt2
- second Taskpublic java.util.ArrayList<Product> getAllInProducts()
public java.util.ArrayList<Facet> getAllFacets()
public void setAllInProducts(java.util.ArrayList<Product> ip)
ip
- public void setAllOutProducts(java.util.ArrayList<Product> ip)
ip
- public java.util.ArrayList<Product> getAllOutProducts()
public Task copy()