public class SimpleProduct extends Product
Modifier and Type | Field and Description |
---|---|
static int |
foundCounter |
static int |
notFoundCounter |
Constructor and Description |
---|
SimpleProduct() |
SimpleProduct(java.lang.String name,
int taskId)
Standard constructor for a simple product
|
Modifier and Type | Method and Description |
---|---|
void |
addFacet(Facet f)
Adds a facet to the product
|
void |
addTaskRelatedFacet(SimpleFacet f,
int id)
Add a facet that is linked to a task,
|
boolean |
equals(java.lang.Object obj) |
void |
exportProd2List(javax.xml.stream.XMLStreamWriter writer)
Write a list of all products to xml
|
void |
exportWf2Xml(javax.xml.stream.XMLStreamWriter writer,
int id)
Write the xml representation of an option to the XMLStreamWriter
|
static java.util.ArrayList<Product> |
getAllProductsThreadLocal() |
int |
getId()
Just that everything comiles no real use
|
static java.lang.Integer |
getLastIdThreadLocal() |
java.lang.String |
getName()
Returns the name of the product
|
Facet |
getNextFacet()
Returns the next facet of the product
|
int |
hashCode() |
boolean |
isAnaphora()
Returns true if product is anaphora
|
boolean |
isIngredient() |
static void |
setAllProductsThreadLocal(java.util.ArrayList<Product> allProducts) |
void |
setAnaTrue()
If it was detected that this product is an anaphora it is set true;
|
static void |
setLastIdThreadLocal(java.lang.Integer lastId) |
void |
setName(java.lang.String name)
Sets name of the product
|
public static int notFoundCounter
public static int foundCounter
public SimpleProduct(java.lang.String name, int taskId) throws EmptyProductException, NotAProductException
name
- The name of the producttaskId
- The id of task which contains this productEmptyProductException
- Is thrown when the product is empty.NotAProductException
- Is thrown when detected that its not a product.public SimpleProduct()
public Facet getNextFacet()
getNextFacet
in class Product
public void setAnaTrue()
public boolean isAnaphora()
public java.lang.String getName()
public void setName(java.lang.String name) throws EmptyProductException
setName
in class Product
EmptyProductException
public void addFacet(Facet f)
public void addTaskRelatedFacet(SimpleFacet f, int id)
f
- Facet to be addedid
- id of the task that should be linked to the facetpublic void exportWf2Xml(javax.xml.stream.XMLStreamWriter writer, int id)
exportWf2Xml
in class Product
writer
- id
- The id of the Product.javax.xml.stream.XMLStreamException
public void exportProd2List(javax.xml.stream.XMLStreamWriter writer) throws EmptyProductException
exportProd2List
in class Product
writer
- javax.xml.stream.XMLStreamException
EmptyProductException
public static java.lang.Integer getLastIdThreadLocal()
public static void setLastIdThreadLocal(java.lang.Integer lastId)
public static void setAllProductsThreadLocal(java.util.ArrayList<Product> allProducts)
public static java.util.ArrayList<Product> getAllProductsThreadLocal()
public boolean isIngredient()
public int getId()