org.cip4.jdflib.extensions
Class XJDFHelper
java.lang.Object
org.cip4.jdflib.extensions.BaseXJDFHelper
org.cip4.jdflib.extensions.XJDFHelper
public class XJDFHelper
- extends BaseXJDFHelper
- Author:
- Rainer Prosi, Heidelberger Druckmaschinen *
|
Method Summary |
SetHelper |
appendParameter(String name,
JDFResourceLink.EnumUsage usage)
|
ProductHelper |
appendProduct()
|
SetHelper |
appendResource(String name,
JDFResourceLink.EnumUsage usage)
|
SetHelper |
appendSet(String family,
String name,
JDFResourceLink.EnumUsage usage)
|
SetHelper |
getCreateParameterSet(String name,
JDFResourceLink.EnumUsage usage)
|
SetHelper |
getCreateResourceSet(String name,
JDFResourceLink.EnumUsage usage)
|
SetHelper |
getCreateSet(String family,
String name,
JDFResourceLink.EnumUsage usage)
|
static XJDFHelper |
getHelper(XMLDoc doc)
factoy to create a helper from a doc |
String |
getJobID()
|
PartitionHelper |
getPartition(String name,
int iSet,
int iPart)
|
KElement |
getResource(String name,
int iSet,
int iPart)
|
ProductHelper |
getRootProduct(int iProduct)
get the Root product by index
- note that this need not be the index in the product list but rather depends on the index of the ID in ProductList/@RootProducts |
Vector<ProductHelper> |
getRootProductHelpers()
|
SetHelper |
getSet(String name,
int iSkip)
|
Vector<SetHelper> |
getSets()
|
VString |
getTypes()
|
void |
removeSet(String name)
|
void |
setTypes(String types)
|
void |
setTypes(VString vtypes)
|
String |
toString()
|
boolean |
writeToFile(String file)
|
void |
writeToStream(OutputStream os)
|
PRODUCT
public static final String PRODUCT
- See Also:
- Constant Field Values
RESOURCE
public static final String RESOURCE
- See Also:
- Constant Field Values
PARAMETER
public static final String PARAMETER
- See Also:
- Constant Field Values
XJDFHelper
public XJDFHelper(KElement xjdf)
- Parameters:
xjdf - if null a new XJDF is generated, else the xjdf root to be manipulated
XJDFHelper
public XJDFHelper(String jobID,
String jobPartID,
VJDFAttributeMap parts)
- Parameters:
jobID - , if null a new jobid is generatedjobPartID - parts -
getHelper
public static XJDFHelper getHelper(XMLDoc doc)
- factoy to create a helper from a doc
- Parameters:
doc - the xmldoc to parse
- Returns:
- the helper
getSets
public Vector<SetHelper> getSets()
- Returns:
- the vector of parametersets and resourcesets
getJobID
public String getJobID()
- Returns:
- the
getRootProduct
public ProductHelper getRootProduct(int iProduct)
- get the Root product by index
- note that this need not be the index in the product list but rather depends on the index of the ID in ProductList/@RootProducts
- Parameters:
iProduct - the index of root products
- Returns:
- the product, null if no matching product exists
getRootProductHelpers
public Vector<ProductHelper> getRootProductHelpers()
- Returns:
- the xjdf root element
getPartition
public PartitionHelper getPartition(String name,
int iSet,
int iPart)
- Parameters:
name - iSet - iPart -
- Returns:
- PartitionHelper for the requested partition, null if it ain't there
getResource
public KElement getResource(String name,
int iSet,
int iPart)
- Parameters:
name - iSet - iPart -
- Returns:
- resource for the requested partition, null if it ain't there
getSet
public SetHelper getSet(String name,
int iSkip)
- Parameters:
name - iSkip -
- Returns:
- the SetHelper for the vector of parametersets and resourcesets
appendSet
public SetHelper appendSet(String family,
String name,
JDFResourceLink.EnumUsage usage)
- Parameters:
family - name - usage - TODO
- Returns:
- a new set element
getCreateSet
public SetHelper getCreateSet(String family,
String name,
JDFResourceLink.EnumUsage usage)
- Parameters:
family - name - usage -
- Returns:
- a new set element
getCreateResourceSet
public SetHelper getCreateResourceSet(String name,
JDFResourceLink.EnumUsage usage)
- Parameters:
name - usage -
- Returns:
- a new set element
getCreateParameterSet
public SetHelper getCreateParameterSet(String name,
JDFResourceLink.EnumUsage usage)
- Parameters:
name - usage -
- Returns:
- a new set element
removeSet
public void removeSet(String name)
- Parameters:
name -
appendParameter
public SetHelper appendParameter(String name,
JDFResourceLink.EnumUsage usage)
- Parameters:
name - usage - TODO
- Returns:
- a new set element
appendProduct
public ProductHelper appendProduct()
- Returns:
- a new set element
appendResource
public SetHelper appendResource(String name,
JDFResourceLink.EnumUsage usage)
- Parameters:
name - usage - TODO
- Returns:
- a new set element
toString
public String toString()
- Overrides:
toString in class Object
- Returns:
- See Also:
Object.toString()
writeToFile
public boolean writeToFile(String file)
- Parameters:
file -
- Returns:
writeToStream
public void writeToStream(OutputStream os)
throws IOException
- Parameters:
os -
- Throws:
IOException
setTypes
public void setTypes(String types)
- Parameters:
types -
setTypes
public void setTypes(VString vtypes)
- Parameters:
vtypes -
getTypes
public VString getTypes()
- Returns:
- types the vector of types
Copyright © 2013. All Rights Reserved.