Package org.cip4.lib.xjdf
Class XJdfDocument
java.lang.Object
org.cip4.lib.xjdf.XJdfDocument
This class provides functionality all about XJDF Documents.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.XJdfDocument(byte[] bytes) Custom Constructor.XJdfDocument(String jobId, String... types) Custom Constructor.XJdfDocument(XJDF xjdf) Custom Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidAppend Audit elements to the XJDF Document.voidaddFinalProduct(FinalProduct... finalProducts) Append final products to the XJDF Document.voidaddGeneralID(String idUsage, Object idValue) Add a general id to the XJDF Document.voidaddGeneralID(String idUsage, String idValue) Add a general id to the XJDF Document.voidaddGeneralID(GeneralID generalID) Add a general id to the XJDF Document.voidaddGeneralIDs(GeneralID... generalIDs) Add multiple general ids to the XJDF Document.addResource(ResourceSet resourceSet, Resource resource) Add a resource to a given resource set.addResourceSet(@NotNull Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage) Add resource set to the xjdf document.addResourceSet(@NotNull Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage) Add resource set to the xjdf document.addResourceSet(@NotNull Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, String processName) Add resource set to the xjdf document.addResourceSet(@NotNull Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, IntegerList combinedProcessIndices) Add resource set to the xjdf document.voidaddResourceSet(ResourceSet resourceSet) Add resource set to the xjdf document.addSpecificResource(ResourceSet resourceSet, SpecificResource specificResource) Add a specific resource to a given resource set.addSpecificResource(ResourceSet resourceSet, SpecificResource specificResource, List<Part> parts) Add a specific resource to a given resource set.addSpecificResource(ResourceSet resourceSet, SpecificResource specificResource, Part part) Add a specific resource to a given resource set.Returns the AuditCreated's header element of the XJDF Document.Returns the combined process (types) specified in the XJDF Document.intgetCombinedProcessIndex(String processName) Returns the combined-process-index of a given process name.Getter of the descriptive name.Returns a final products identifierd by its product id.Returns a list of all final products contained by the XJDF Document.getGeneralID(String idUsage) Return GeneralID object by IDUsage value.<T> TgetGeneralID(String idUsage, Class<T> type) Return the typed value of a GeneralID.getJobID()Getter of the job id.getPartAmount(Class<? extends SpecificResource> resourceType) Returns the PartAmount of the resource found by params .getPartAmount(Class<? extends SpecificResource> resourceType, Part part) Returns the PartAmount of the first matching specific resource within a resource set using partition keys.getPartAmount(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage) Returns the PartAmount of the resource found by params .getPartAmount(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, String processName) Returns the PartAmount of the resource found by params .getPartAmount(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, IntegerList combinedProcessIndices) Returns the PartAmount of the resource found by params .getPartAmount(String resourceId) Returns the PartAmount of a resource found by id.getPartAmount(Resource resource) Returns the PartAmount of a given resource.getPartAmount(ResourceSet resourceSet, Part part) Returns the PartAmount of the first matching specific resource within a resource set using partition keys.getParts(Class<? extends SpecificResource> resourceType) Return the list of parts for a given resource set.getParts(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage) Return the list of parts for a given resource set.getParts(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, String processName) Return the list of parts for a given resource set.getParts(ResourceSet resourceSet) Return the list of parts for a given resource set.Getter of the related job id.getResource(Class<? extends SpecificResource> resourceType) Returns a resource found by params.getResource(Class<? extends SpecificResource> resourceType, Part part) Identifies and returns the first matching specific resource within a resource set using partition keys.getResource(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage) Returns a resource found by params.getResource(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, String processName) Returns a resource found by params.getResource(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, IntegerList combinedProcessIndices) Returns a resource found by params.getResource(String id) Returns a resource found by its unique identifier (ID or ExternalID).getResource(ResourceSet resourceSet, Part part) Identifies and returns the first matching specific resource within a resource set using partition keys.getResources(Class<? extends SpecificResource> resourceType) Returns the generic resources of a resource set for a given specific resource.getResources(Class<? extends SpecificResource> resourceType, Part part) Returns the generic resources of a resource set for a given specific resource by part keys.getResources(ResourceSet resourceSet, Part part) Returns the generic resources of a given resource set by part keys.getResourceSet(Class<? extends SpecificResource> resourceType) Returns the resource set of a specific resource.getResourceSet(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage) Returns the resource set of a specific resource.getResourceSet(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage) Returns the resource set of a specific resource.getResourceSet(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, String processName) Returns the resource set of a specific resource.getResourceSet(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, IntegerList combinedProcessIndices) Returns the matching resource set.<T extends SpecificResource>
TgetSpecificResource(Class<T> resourceType) Identifies and returns the first matching specific resource within the given resource set.<T extends SpecificResource>
TgetSpecificResource(Class<T> resourceType, Part part) Identifies and returns the first matching specific resource within a resource set using partition keys.<T extends SpecificResource>
TgetSpecificResource(Class<T> resourceType, ResourceSet.Usage usage) Returns a specific resource found by params.<T extends SpecificResource>
TgetSpecificResource(Class<T> resourceType, ResourceSet.Usage usage, String processUsage, String processName) Returns a specific resource found by params.<T extends SpecificResource>
TgetSpecificResource(Class<T> resourceType, ResourceSet.Usage usage, String processUsage, IntegerList combinedProcessIndices) Returns a specific resource found by params.<T extends SpecificResource>
TgetSpecificResource(String resourceId) Returns a specific resource found by id.<T extends SpecificResource>
TgetSpecificResource(ResourceSet resourceSet, Part part) Identifies and returns the first matching specific resource within a resource set using partition keys.<T extends SpecificResource>
List<T> getSpecificResources(Class<T> resourceType) Returns the specific resources of a resource set<T extends SpecificResource>
List<T> getSpecificResources(Class<T> resourceType, Part part) Returns the specific resources of a resource set for given partition keys<T extends SpecificResource>
List<T> getSpecificResources(ResourceSet resourceSet, Part part) Returns the specific resources of a resource set for given partition keysgetXJdf()Returns the XJDF Documents XJDF root node.booleanremoveGeneralID(String idUsage) Remove a GeneralID object by IDUsage.booleanremoveGeneralID(GeneralID generalID) Remove a GeneralID object.booleanremoveResource(ResourceSet resourceSet, Part part) Remove resource from a given resource set by part.booleanremoveResourceSet(Class<? extends SpecificResource> resourceType) Remove a resource set from xjdf document.booleanremoveResourceSet(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, String processName) Remove a resource set from xjdf document.booleanremoveResourceSet(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, IntegerList combinedProcessIndices) Remove a resource set from xjdf document.booleanremoveResourceSet(ResourceSet resourceSet) Remove a resource set from xjdf document.voidsetDescriptiveName(String descriptiveName) Sets the documents descriptive name.voidSets the documents job id.voidsetRelatedJobID(String relatedJobID) Sets the documents related job id.toString()byte[]toXml()Returns the current XJDF Document as XML byte array.byte[]toXml(boolean validate) Returns the current XJDF Document as XML byte array.
-
Constructor Details
-
XJdfDocument
public XJdfDocument()Default constructor.
Creates an empty XJDF Document. -
XJdfDocument
Custom Constructor.
Accepting the required attributes of an XJDF Document for initializing.- Parameters:
jobId- The documents JobID.types- The documents types.
-
XJdfDocument
Custom Constructor.
Accepting an XJDF Document as byte array for initializing.- Parameters:
bytes- The XJDF Document as byte array.- Throws:
XJdfParseException
-
XJdfDocument
Custom Constructor.
Accepting an XJDF root node for initializing.- Parameters:
xjdf- The XJDF root node.
-
-
Method Details
-
setDescriptiveName
Sets the documents descriptive name.- Parameters:
descriptiveName- The human-readable job description.
-
getDescriptiveName
Getter of the descriptive name.- Returns:
- Returns the human-readable job description.
-
setRelatedJobID
Sets the documents related job id.- Parameters:
relatedJobID- The documents related job id.
-
getRelatedJobID
Getter of the related job id.- Returns:
- The related job id.
-
setJobID
Sets the documents job id.- Parameters:
jobID- The document's job id.
-
getJobID
Getter of the job id.- Returns:
- The job id.
-
getXJdf
Returns the XJDF Documents XJDF root node.- Returns:
- The XJDF root node.
-
toXml
Returns the current XJDF Document as XML byte array.- Returns:
- The XJDF Document as XML byte array.
- Throws:
XJdfParseExceptionXJdfValidationException
-
toXml
Returns the current XJDF Document as XML byte array.- Parameters:
validate- 'false' in case validation should be skipped.- Returns:
- The XJDF Document as XML byte array.
- Throws:
XJdfParseExceptionXJdfValidationException
-
toString
-
getCombinedProcess
Returns the combined process (types) specified in the XJDF Document.- Returns:
- The combined process specified in this document.
-
getCombinedProcessIndex
Returns the combined-process-index of a given process name.- Returns:
- The combined process index as integer.
- Throws:
XJdfDocumentException
-
addGeneralID
Add a general id to the XJDF Document.- Parameters:
generalID- The GeneralID to be added.
-
addGeneralID
Add a general id to the XJDF Document.- Parameters:
idUsage- The IDUsage value.idValue- The IDValue value.
-
addGeneralID
Add a general id to the XJDF Document.- Parameters:
idUsage- The IDUsage value.idValue- The IDValue value.
-
addGeneralIDs
Add multiple general ids to the XJDF Document.- Parameters:
generalIDs- The GeneralIDs to be added.
-
getGeneralID
Return GeneralID object by IDUsage value.- Parameters:
idUsage- The IDUsage value.- Returns:
- The GeneralID object.
-
getGeneralID
Return the typed value of a GeneralID.- Parameters:
idUsage- The IDUsage value.type- The target type of the IDValue value.- Returns:
- The typed value.
- Throws:
ParseException
-
removeGeneralID
Remove a GeneralID object by IDUsage.- Parameters:
idUsage- The generalId object's idUsage value.- Returns:
- true in case the document had contained such a GeneralID.
-
removeGeneralID
Remove a GeneralID object.- Parameters:
generalID- The generalId object to be removed.- Returns:
- true in case the document had contained such a GeneralID.
-
addAudits
Append Audit elements to the XJDF Document.- Parameters:
audits- The audits to be appended.
-
getAuditCreated
Returns the AuditCreated's header element of the XJDF Document.- Returns:
- The AuditCreated header element.
-
addFinalProduct
Append final products to the XJDF Document.- Parameters:
finalProducts- The final products to be appended.
-
getFinalProducts
Returns a list of all final products contained by the XJDF Document.- Returns:
- List of final products.
-
getFinalProduct
Returns a final products identifierd by its product id.- Returns:
- The final product if exists. Otherwise null.
-
addResourceSet
public ResourceSet addResourceSet(@NotNull @NotNull Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage) Add resource set to the xjdf document.- Parameters:
resourceType- The type of the resource set.usage- The usgae of the resource set.- Returns:
- The newly created resource set element.
-
addResourceSet
public ResourceSet addResourceSet(@NotNull @NotNull Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage) Add resource set to the xjdf document.- Parameters:
resourceType- The type of the resource set.usage- The usgae of the resource set.processUsage- The process usage of the resource set- Returns:
- The newly created resource set element.
-
addResourceSet
public ResourceSet addResourceSet(@NotNull @NotNull Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, String processName) throws XJdfDocumentException Add resource set to the xjdf document.- Parameters:
resourceType- The type of the resource set.usage- The usgae of the resource set.- Returns:
- The newly created resource set element.
- Throws:
XJdfDocumentException
-
addResourceSet
public ResourceSet addResourceSet(@NotNull @NotNull Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, IntegerList combinedProcessIndices) Add resource set to the xjdf document.- Parameters:
resourceType- The type of the resource set.usage- The usgae of the resource set.processUsage- The process usage of the resource setcombinedProcessIndices- The combined-process-index list.- Returns:
- The newly created resource set element.
-
addResourceSet
Add resource set to the xjdf document.- Parameters:
resourceSet- The resource set to be added.
-
removeResourceSet
public boolean removeResourceSet(Class<? extends SpecificResource> resourceType) throws XJdfDocumentException Remove a resource set from xjdf document.- Parameters:
resourceType- The resource type of the resource set- Returns:
- true if this list contained the specified element
- Throws:
XJdfDocumentException
-
removeResourceSet
public boolean removeResourceSet(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, String processName) throws XJdfDocumentException Remove a resource set from xjdf document.- Parameters:
resourceType- The resource type of the resource setusage- The usage of the resource setprocessUsage- The process usage of the resource setprocessName- The process name of the resource set- Returns:
- true if this list contained the specified element
- Throws:
XJdfDocumentException
-
removeResourceSet
public boolean removeResourceSet(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, IntegerList combinedProcessIndices) throws XJdfDocumentException Remove a resource set from xjdf document.- Parameters:
resourceType- The resource type of the resource setusage- The usage of the resource setprocessUsage- The process usage of the resource setcombinedProcessIndices- The combined process indexes of the resource set- Returns:
- true if this list contained the specified element
- Throws:
XJdfDocumentException
-
removeResourceSet
Remove a resource set from xjdf document.- Parameters:
resourceSet- The resource set to be removed.- Returns:
- true if this list contained the specified element
-
addSpecificResource
public Resource addSpecificResource(ResourceSet resourceSet, SpecificResource specificResource) throws XJdfDocumentException Add a specific resource to a given resource set.- Parameters:
resourceSet- The given resource set.specificResource- The specific resource to be added.- Returns:
- The resource object.
- Throws:
XJdfDocumentException- Thrown in case of validation issues.
-
addSpecificResource
public Resource addSpecificResource(ResourceSet resourceSet, SpecificResource specificResource, Part part) throws XJdfDocumentException Add a specific resource to a given resource set.- Parameters:
resourceSet- The given resource set.specificResource- The specific resource to be added.part- A single part tag.- Returns:
- The resource object.
- Throws:
XJdfDocumentException- Thrown in case of validation issues.
-
addSpecificResource
public Resource addSpecificResource(ResourceSet resourceSet, SpecificResource specificResource, List<Part> parts) Add a specific resource to a given resource set.- Parameters:
resourceSet- The given resource set.specificResource- The specific resource to be added.parts- Partitioning of the specific resource.- Returns:
- The resource object.
-
addResource
Add a resource to a given resource set.- Parameters:
resourceSet- The given resource set.resource- The resource to be added.- Returns:
- The resource.
-
getResourceSet
public ResourceSet getResourceSet(Class<? extends SpecificResource> resourceType) throws XJdfDocumentException Returns the resource set of a specific resource.- Parameters:
resourceType- The resource type of the specific resource- Returns:
- The resource set matching the parameters.
- Throws:
XJdfDocumentException
-
getResourceSet
public ResourceSet getResourceSet(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage) throws XJdfDocumentException Returns the resource set of a specific resource.- Parameters:
resourceType- The resource type of the resource setusage- The usage of the resource set- Returns:
- The resource set matching the parameters.
- Throws:
XJdfDocumentException
-
getResourceSet
public ResourceSet getResourceSet(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage) throws XJdfDocumentException Returns the resource set of a specific resource.- Parameters:
resourceType- The resource type of the resource setusage- The usage of the resource setprocessUsage- The process usage of the resource set- Returns:
- The resource set matching the parameters.
- Throws:
XJdfDocumentException
-
getResourceSet
public ResourceSet getResourceSet(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, String processName) throws XJdfDocumentException Returns the resource set of a specific resource.- Parameters:
resourceType- The resource type of the resource setusage- The usage of the resource setprocessUsage- The process usage of the resource setprocessName- The linked process name (via CombinedProcessIndex).- Returns:
- The resource set matching the parameters.
- Throws:
XJdfDocumentException
-
getResourceSet
public ResourceSet getResourceSet(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, IntegerList combinedProcessIndices) throws XJdfDocumentException Returns the matching resource set.- Parameters:
resourceType- The resource type of the resource setusage- The usage of the resource setprocessUsage- The process usage of the resource setcombinedProcessIndices- The combined process indexes of the resource set- Returns:
- The matching resource set
- Throws:
XJdfDocumentException- Thrown in case the resource set cannot be identified uniquely
-
getParts
public List<Part> getParts(Class<? extends SpecificResource> resourceType) throws XJdfDocumentException Return the list of parts for a given resource set.- Parameters:
resourceType- The resource type of the resource set- Returns:
- List of part elements in the resource set.
- Throws:
XJdfDocumentException
-
getParts
public List<Part> getParts(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage) throws XJdfDocumentException Return the list of parts for a given resource set.- Parameters:
resourceType- The resource type of the resource setusage- The usage of the resource set- Returns:
- List of part elements in the resource set.
- Throws:
XJdfDocumentException
-
getParts
public List<Part> getParts(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, String processName) throws XJdfDocumentException Return the list of parts for a given resource set.- Parameters:
resourceType- The resource type of the resource setusage- The usage of the resource setprocessUsage- The process usage of the resource setprocessName- The combined process indexes of the resource set- Returns:
- List of part elements in the resource set.
- Throws:
XJdfDocumentException
-
getParts
Return the list of parts for a given resource set.- Parameters:
resourceSet- The resource set to be analyzed.- Returns:
- List of part elements in the resource set.
-
getResources
public List<Resource> getResources(Class<? extends SpecificResource> resourceType) throws XJdfDocumentException Returns the generic resources of a resource set for a given specific resource.- Parameters:
resourceType- the specific resource.- Returns:
- List of resources of the resource set matching the part keys.
- Throws:
XJdfDocumentException
-
getResources
public List<Resource> getResources(Class<? extends SpecificResource> resourceType, Part part) throws XJdfDocumentException Returns the generic resources of a resource set for a given specific resource by part keys.- Parameters:
resourceType- the specific resource.part- The given Partition Keys used to identify a particular Resource- Returns:
- List of resources of the resource set matching the part keys.
- Throws:
XJdfDocumentException
-
getResources
Returns the generic resources of a given resource set by part keys.- Parameters:
resourceSet- the given resource set.part- The given Partition Keys used to identify a particular Resource- Returns:
- List of resources of the resource set matching the part keys.
-
getResource
public Resource getResource(Class<? extends SpecificResource> resourceType, Part part) throws XJdfDocumentException Identifies and returns the first matching specific resource within a resource set using partition keys.- Parameters:
resourceType- The class of the specific resource.part- The given Partition Keys used to identify a particular Resource- Returns:
- The first Resource identified using partition keys.
- Throws:
XJdfDocumentException
-
getResource
Identifies and returns the first matching specific resource within a resource set using partition keys.- Parameters:
resourceSet- The given resource setpart- The given Partition Keys used to identify a particular Resource- Returns:
- The first Resource identified using partition keys within a given resource set.
-
getResource
public Resource getResource(Class<? extends SpecificResource> resourceType) throws XJdfDocumentException Returns a resource found by params.- Parameters:
resourceType- The resource type of the resource set- Returns:
- The resource object.
- Throws:
XJdfDocumentException
-
getResource
public Resource getResource(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage) throws XJdfDocumentException Returns a resource found by params.- Parameters:
resourceType- The resource type of the resource setusage- The usage of the resource set- Returns:
- The resource object.
- Throws:
XJdfDocumentException
-
getResource
public Resource getResource(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, String processName) throws XJdfDocumentException Returns a resource found by params.- Parameters:
resourceType- The resource type of the resource setusage- The usage of the resource setprocessUsage- The process usage of the resource setprocessName- The combined process indexes of the resource set- Returns:
- The resource object.
- Throws:
XJdfDocumentException
-
getResource
public Resource getResource(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, IntegerList combinedProcessIndices) throws XJdfDocumentException Returns a resource found by params.- Parameters:
resourceType- The resource type of the resource setusage- The usage of the resource setprocessUsage- The process usage of the resource setcombinedProcessIndices- The combined process indexes of the resource set- Returns:
- The resource object.
- Throws:
XJdfDocumentException
-
getResource
Returns a resource found by its unique identifier (ID or ExternalID).- Parameters:
id- The resource's unique identifier (ID or ExternalID).- Returns:
- The resource object.
-
removeResource
Remove resource from a given resource set by part.- Parameters:
resourceSet- The resource setpart- The partitioning of the resource to be deleted.- Returns:
- true in case the resource set contained such an elements
-
getSpecificResources
public <T extends SpecificResource> List<T> getSpecificResources(Class<T> resourceType) throws XJdfDocumentException Returns the specific resources of a resource set- Parameters:
resourceType- the specific resource.- Returns:
- List of resources of the resource set.
- Throws:
XJdfDocumentException
-
getSpecificResources
public <T extends SpecificResource> List<T> getSpecificResources(Class<T> resourceType, Part part) throws XJdfDocumentException Returns the specific resources of a resource set for given partition keys- Parameters:
resourceType- the specific resource.part- The given partition- Returns:
- List of resources of the resource set.
- Throws:
XJdfDocumentException
-
getSpecificResources
public <T extends SpecificResource> List<T> getSpecificResources(ResourceSet resourceSet, Part part) Returns the specific resources of a resource set for given partition keys- Parameters:
resourceSet- the resource set.part- The given partition- Returns:
- List of resources of the resource set.
-
getSpecificResource
public <T extends SpecificResource> T getSpecificResource(Class<T> resourceType, Part part) throws XJdfDocumentException Identifies and returns the first matching specific resource within a resource set using partition keys.- Parameters:
resourceType- The type of the specific resource.part- The given Partition Keys used to identify a particular Resource- Returns:
- The first specific resource identified using partition keys.
- Throws:
XJdfDocumentException
-
getSpecificResource
public <T extends SpecificResource> T getSpecificResource(ResourceSet resourceSet, Part part) throws XJdfDocumentException Identifies and returns the first matching specific resource within a resource set using partition keys.- Parameters:
resourceSet- The resource set.part- The given Partition Keys used to identify a particular Resource- Returns:
- The first specific resource identified using partition keys.
- Throws:
XJdfDocumentException
-
getSpecificResource
Returns a specific resource found by id.- Parameters:
resourceId- The resource's unique identifier.- Returns:
- The specific resource object.
-
getSpecificResource
public <T extends SpecificResource> T getSpecificResource(Class<T> resourceType) throws XJdfDocumentException Identifies and returns the first matching specific resource within the given resource set.- Parameters:
resourceType- The class of the specific resource.- Returns:
- The first specific resource identified using partition keys.
- Throws:
XJdfDocumentException
-
getSpecificResource
public <T extends SpecificResource> T getSpecificResource(Class<T> resourceType, ResourceSet.Usage usage) throws XJdfDocumentException Returns a specific resource found by params.- Parameters:
resourceType- The resource type of the resource setusage- The usage of the resource set- Returns:
- The specific resource object.
- Throws:
XJdfDocumentException
-
getSpecificResource
public <T extends SpecificResource> T getSpecificResource(Class<T> resourceType, ResourceSet.Usage usage, String processUsage, String processName) throws XJdfDocumentException Returns a specific resource found by params.- Parameters:
resourceType- The resource type of the resource setusage- The usage of the resource setprocessUsage- The process usage of the resource setprocessName- The combined process indexes of the resource set- Returns:
- The specific resource object.
- Throws:
XJdfDocumentException
-
getSpecificResource
public <T extends SpecificResource> T getSpecificResource(Class<T> resourceType, ResourceSet.Usage usage, String processUsage, IntegerList combinedProcessIndices) throws XJdfDocumentException Returns a specific resource found by params.- Parameters:
resourceType- The resource type of the resource setusage- The usage of the resource setprocessUsage- The process usage of the resource setcombinedProcessIndices- The combined process indexes of the resource set- Returns:
- The specific resource object.
- Throws:
XJdfDocumentException
-
getPartAmount
Returns the PartAmount of the first matching specific resource within a resource set using partition keys.- Parameters:
resourceSet- The given resource setpart- The given Partition Keys used to identify a particular Resource- Returns:
- The PartAmount of the first Resource identified using partition keys within a given resource set.
- Throws:
XJdfDocumentException
-
getPartAmount
public PartAmount getPartAmount(Class<? extends SpecificResource> resourceType, Part part) throws XJdfDocumentException Returns the PartAmount of the first matching specific resource within a resource set using partition keys.- Parameters:
resourceType- The class of the specific resource.part- The given Partition Keys used to identify a particular Resource- Returns:
- The first Resource identified using partition keys.
- Throws:
XJdfDocumentException
-
getPartAmount
public PartAmount getPartAmount(Class<? extends SpecificResource> resourceType) throws XJdfDocumentException Returns the PartAmount of the resource found by params .- Parameters:
resourceType- The resource type of the resource set- Returns:
- The PartAmount of the identified resource.
- Throws:
XJdfDocumentException
-
getPartAmount
public PartAmount getPartAmount(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage) throws XJdfDocumentException Returns the PartAmount of the resource found by params .- Parameters:
resourceType- The resource type of the resource setusage- The usage of the resource set- Returns:
- The PartAmount of the identified resource.
- Throws:
XJdfDocumentException
-
getPartAmount
public PartAmount getPartAmount(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, String processName) throws XJdfDocumentException Returns the PartAmount of the resource found by params .- Parameters:
resourceType- The resource type of the resource setusage- The usage of the resource setprocessUsage- The process usage of the resource setprocessName- The combined process indexes of the resource set- Returns:
- The PartAmount of the identified resource.
- Throws:
XJdfDocumentException
-
getPartAmount
public PartAmount getPartAmount(Class<? extends SpecificResource> resourceType, ResourceSet.Usage usage, String processUsage, IntegerList combinedProcessIndices) throws XJdfDocumentException Returns the PartAmount of the resource found by params .- Parameters:
resourceType- The resource type of the resource setusage- The usage of the resource setprocessUsage- The process usage of the resource setcombinedProcessIndices- The combined process indexes of the resource set- Returns:
- The first Resource identified using partition keys.
- Throws:
XJdfDocumentException
-
getPartAmount
Returns the PartAmount of a resource found by id.- Parameters:
resourceId- The resource's unique identifier.- Returns:
- The PartAmount object of the identified resource object.
- Throws:
XJdfDocumentException
-
getPartAmount
Returns the PartAmount of a given resource.- Parameters:
resource- The resource object to be analyzed.- Returns:
- The PartAmount object if present.
- Throws:
XJdfDocumentException- In case multiple PartAmount element exist.
-