public class StatusCounter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected VString |
m_ignoreParts |
protected JDFNode |
m_Node |
protected VJDFAttributeMap |
m_vPartMap |
protected java.util.HashSet<java.lang.String> |
setCopyResInfo |
protected java.util.HashSet<java.lang.String> |
setTrackWaste |
| Constructor and Description |
|---|
StatusCounter(JDFNode node,
VJDFAttributeMap vPartMap,
VElement vResLinks)
construct a StatusUtil for a node n
|
| Modifier and Type | Method and Description |
|---|---|
int |
addEmployee(JDFEmployee employee) |
void |
addIgnorePart(JDFResource.EnumPartIDKey key)
set the partIDKeys to be ignored
|
void |
addModule(java.lang.String moduleID,
java.lang.String moduleType) |
void |
addPhase(java.lang.String refID,
double amount,
double waste,
boolean sumTotal)
add the amount specified by amount and waste to the resource with id refID
|
void |
clearAmounts(java.lang.String refID)
clear all the amounts in the resource with id refID
|
boolean |
clearEmployees() |
JDFResourceLink[] |
getAmountLinks()
get all total amounts of all tracked resources
|
double |
getCurrentCounter() |
java.lang.String |
getDeviceID() |
JDFDoc |
getDocJMFNotification(boolean bClean) |
JDFDoc |
getDocJMFPhaseTime() |
JDFDoc |
getDocJMFResource() |
java.util.Vector<JDFEmployee> |
getEmpoyees() |
java.lang.String |
getFirstRefID()
get the refID of the first resource, i.e.
|
VString |
getIcsVersions() |
protected org.cip4.jdflib.util.StatusCounter.LinkAmount |
getLinkAmount(int n)
get the matching LinkAmount out of this
|
protected org.cip4.jdflib.util.StatusCounter.LinkAmount |
getLinkAmount(java.lang.String refID)
get the matching LinkAmount out of this
|
java.lang.String |
getLinkID(java.lang.String refID)
get the matching LinkAmount out of this
|
VString |
getModuleeID() |
NodeIdentifier |
getNodeIDentifier() |
double |
getPercentComplete() |
double |
getPhaseAmount(java.lang.String refID)
get the total the amount of the resource with id refID
|
double[] |
getPhaseAmounts()
get all phaseamounts of all tracked resources
|
double |
getPhaseWaste(java.lang.String refID)
get the total the amount of the resource with id refID
|
double[] |
getPhaseWastes()
get all phase waste amounts of all tracked resources
|
double |
getPlannedAmount(java.lang.String refID) |
double |
getPlannedWaste(java.lang.String refID) |
java.lang.String |
getQueueEntryID() |
JDFDate |
getStartDate() |
JDFAutoDeviceInfo.EnumDeviceStatus |
getStatus() |
java.lang.String |
getStatusDetails() |
double |
getTotalAmount(java.lang.String refID)
get the total the amount of the resource with id refID
|
double[] |
getTotalAmounts()
get all total amounts of all tracked resources
|
double |
getTotalCounter() |
double |
getTotalWaste(java.lang.String refID)
get the total the amount of the resource with id refID
|
double[] |
getTotalWastes()
get all total amounts of all tracked resources
|
boolean |
removeEmployee(JDFEmployee employee) |
void |
replaceEmployees(java.util.Vector<JDFEmployee> employees)
replace all employees in this - update phases if necessary
|
void |
setActiveNode(JDFNode node,
VJDFAttributeMap vPartMap,
VElement vResLinks)
set the currently active node
|
void |
setCopyResInResInfo(java.lang.String _refID,
boolean b)
set copying the resource into resourceInfo on or off for the resourcelink rl
|
void |
setCurrentCounter(double _currentCounter) |
void |
setDeviceID(java.lang.String deviceid) |
JDFNotification |
setEvent(java.lang.String eventID,
java.lang.String eventValue,
java.lang.String comment)
set event, append the Event element and optionally the comment
overwrites existing values |
void |
setFirstRefID(java.lang.String resID)
set the id of the resource to be tracked in phasetimes, i.e.
|
void |
setIcsVersions(VString icsVersions) |
void |
setOperationMode(JDFAutoMISDetails.EnumDeviceOperationMode _operationMode) |
void |
setPercentComplete(double percent)
set percentComplete to percent
|
boolean |
setPhase(JDFElement.EnumNodeStatus nodeStatus,
java.lang.String nodeStatusDetails,
JDFAutoDeviceInfo.EnumDeviceStatus deviceStatus,
java.lang.String deviceStatusDetails)
Set the Status and StatusDetails of this node update the PhaseTime audit or append a new phasetime as appropriate also prepare a status JMF
|
void |
setPhase(java.lang.String refID,
double amount,
double waste)
set the phase the amount specified by amount and waste to the resource with id refID
|
void |
setPhaseTimeAmounts(boolean bAddAmount) |
JDFProcessRun |
setProcessResult(JDFElement.EnumNodeStatus endStatus) |
void |
setQueueEntryID(java.lang.String _queueEntryID) |
JDFResourceAudit |
setResourceAudit(java.lang.String resID,
JDFAutoResourceAudit.EnumReason reason) |
void |
setTotal(java.lang.String refID,
double amount,
boolean bWaste)
set the total amount specified by amount and waste to the resource with id refID usually called when reading resource audits or resource signals
|
void |
setTotalCounter(double _totalCounter) |
void |
setTrackWaste(java.lang.String resID,
boolean b)
set waste tracking on or off for the resourcelink rl
|
void |
setWorkType(JDFAutoMISDetails.EnumWorkType _workType)
sets the MISDetails/@WorkType for default audis, resource audits and phaseTime elements
|
java.lang.String |
toString() |
void |
updatePercentComplete(double percent)
update percentComplete by percent
|
void |
writeAll() |
protected JDFNode m_Node
protected VJDFAttributeMap m_vPartMap
protected VString m_ignoreParts
protected java.util.HashSet<java.lang.String> setTrackWaste
protected java.util.HashSet<java.lang.String> setCopyResInfo
public StatusCounter(JDFNode node, VJDFAttributeMap vPartMap, VElement vResLinks)
node - the JDFNode that is being processedvPartMap - the map of Parts that is being processed excluding the waste partitionvResLinks - the reslinks that are tracked for amount handlingpublic double getTotalCounter()
public void setTotalCounter(double _totalCounter)
_totalCounter - public double getCurrentCounter()
public void setCurrentCounter(double _currentCounter)
_currentCounter - public int addEmployee(JDFEmployee employee)
employee - public boolean removeEmployee(JDFEmployee employee)
employee - public java.util.Vector<JDFEmployee> getEmpoyees()
public boolean clearEmployees()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public void writeAll()
public void setPhaseTimeAmounts(boolean bAddAmount)
bAddAmount - if true, amounts are added to phasetimespublic void setActiveNode(JDFNode node, VJDFAttributeMap vPartMap, VElement vResLinks)
node - the JDFNode that is being processedvPartMap - the map of Parts that is being processed excluding the waste partitionvResLinks - the reslinks that are tracked for amount handlingprotected org.cip4.jdflib.util.StatusCounter.LinkAmount getLinkAmount(java.lang.String refID)
refID - the refID, name or usage of the resource of the bag - this MUST match the refID of a ResourceLinkpublic java.lang.String getLinkID(java.lang.String refID)
refID - the refID, name or usage of the resource of the bag - this MUST match the refID of a ResourceLinkprotected org.cip4.jdflib.util.StatusCounter.LinkAmount getLinkAmount(int n)
n - the index of the resource of the bag - this MUST match the refID of a ResourceLinkpublic java.lang.String getFirstRefID()
public void setFirstRefID(java.lang.String resID)
resID - public void addIgnorePart(JDFResource.EnumPartIDKey key)
key - public void clearAmounts(java.lang.String refID)
refID - id of the resourcepublic void setPhase(java.lang.String refID,
double amount,
double waste)
refID - , type or usage of the resource, if null all are updatedamount - the amount for this phasewaste - the waste for this phasepublic void addPhase(java.lang.String refID,
double amount,
double waste,
boolean sumTotal)
refID - , type or usage of the resource, if null all are updatedamount - waste - sumTotal - if true, also sum up the total amounts, else only phasepublic void setTotal(java.lang.String refID,
double amount,
boolean bWaste)
refID - , type or usage of the resource, if null all are updatedamount - the amount to setbWaste - if true, set total waste, else set total goodpublic double getTotalAmount(java.lang.String refID)
refID - , type or usage of the resource,public double[] getTotalAmounts()
public JDFResourceLink[] getAmountLinks()
public double[] getPhaseAmounts()
public double getPercentComplete()
public double getPhaseAmount(java.lang.String refID)
refID - , type or usage of the resource,public double getTotalWaste(java.lang.String refID)
refID - , type or usage of the resource,public double[] getTotalWastes()
public double[] getPhaseWastes()
public double getPhaseWaste(java.lang.String refID)
refID - , type or usage of the resource,public JDFNotification setEvent(java.lang.String eventID, java.lang.String eventValue, java.lang.String comment)
eventID - Event/@EventID to seteventValue - Event/@EventValue to setcomment - the comment text, if null no comment is setpublic boolean setPhase(JDFElement.EnumNodeStatus nodeStatus, java.lang.String nodeStatusDetails, JDFAutoDeviceInfo.EnumDeviceStatus deviceStatus, java.lang.String deviceStatusDetails)
nodeStatus - the new status of the nodenodeStatusDetails - the new statusDetails of the nodedeviceStatus - the new status of the devicedeviceStatusDetails - the new statusDetails of the devicepublic JDFDoc getDocJMFPhaseTime()
public JDFDoc getDocJMFResource()
public JDFDoc getDocJMFNotification(boolean bClean)
bClean - public java.lang.String getDeviceID()
public VString getModuleeID()
public void setDeviceID(java.lang.String deviceid)
deviceid - the m_deviceID to setpublic void addModule(java.lang.String moduleID,
java.lang.String moduleType)
moduleID - moduleType - public void setTrackWaste(java.lang.String resID,
boolean b)
resID - the resource id to the resource to trackb - tracking on or offpublic void setCopyResInResInfo(java.lang.String _refID,
boolean b)
_refID - the refid of the resourcelink to the resource to copyb - tracking on or offpublic JDFResourceAudit setResourceAudit(java.lang.String resID, JDFAutoResourceAudit.EnumReason reason)
resID - the resource ID to set/track reason for the auditreason - public JDFProcessRun setProcessResult(JDFElement.EnumNodeStatus endStatus)
endStatus - public void setQueueEntryID(java.lang.String _queueEntryID)
_queueEntryID - public java.lang.String getQueueEntryID()
public void setWorkType(JDFAutoMISDetails.EnumWorkType _workType)
_workType - the worktype to set, if null no MISDetails and no Worktype are added. closes all ongoing phases and starts a new phasepublic JDFAutoDeviceInfo.EnumDeviceStatus getStatus()
public java.lang.String getStatusDetails()
public JDFDate getStartDate()
public void setOperationMode(JDFAutoMISDetails.EnumDeviceOperationMode _operationMode)
_operationMode - public double getPlannedAmount(java.lang.String refID)
refID - the resource ID or namepublic double getPlannedWaste(java.lang.String refID)
refID - the resource ID or namepublic NodeIdentifier getNodeIDentifier()
public void setPercentComplete(double percent)
percent - the percentage to setpublic void updatePercentComplete(double percent)
percent - the percentage to incrementpublic void setIcsVersions(VString icsVersions)
icsVersions - the icsVersions to setpublic VString getIcsVersions()
public void replaceEmployees(java.util.Vector<JDFEmployee> employees)
employees -