List of usage examples for org.jdom2 Element getChildText
public String getChildText(final String cname)
From source file:org.yawlfoundation.yawl.logging.YLogPredicate.java
License:Open Source License
public void fromXML(Element xml) { _startPredicate = xml.getChildText("start"); _completionPredicate = xml.getChildText("completion"); }
From source file:org.yawlfoundation.yawl.mailService.MailService.java
License:Open Source License
private String getDataValue(Element data, String name) { return (data != null) ? data.getChildText(name) : null; }
From source file:org.yawlfoundation.yawl.monitor.jsf.SessionBean.java
License:Open Source License
public void setSelectedCase(CaseInstance caseInstance) { selectedCase = caseInstance;//from w w w .j ava 2 s . c om String caseID = caseInstance.getCaseID(); if (getCurrentItemOrder().getColumn() == TableSorter.ItemColumn.Undefined) { sortCaseItems(TableSorter.ItemColumn.ItemID); } else { refreshCaseItems(caseID, false); } try { caseData = _monClient.getCaseData(caseID); String caseEvent = _monClient.getCaseEvent(caseID, "CaseStart"); if (!caseEvent.startsWith("<fail")) { Element caseElem = JDOMUtil.stringToElement(caseEvent).getChild("event"); caseStartTime = new Long(caseElem.getChildText("timestamp")); startingServiceName = _monClient.getServiceName(new Long(caseElem.getChildText("serviceKey"))); } else { caseStartTime = 0; startingServiceName = "Unavailable"; } caseStartedByName = _monClient.getCaseStartedBy(caseID); } catch (IOException ioe) { caseData = "Unavailable"; caseStartTime = 0; startingServiceName = "Unavailable"; caseStartedByName = "Unavailable"; } }
From source file:org.yawlfoundation.yawl.monitor.MonitorClient.java
License:Open Source License
public List<WorkItemInstance> getWorkItems(String caseID) throws IOException { List<WorkItemInstance> itemList = null; String xml = _interfaceBClient.getWorkItemInstanceSummary(caseID, getEngineHandle()); Element items = JDOMUtil.stringToElement(xml); if (items != null) { itemList = new ArrayList<WorkItemInstance>(); for (Element child : items.getChildren()) { // ignore parent workitems if (!"statusIsParent".equals(child.getChildText("status"))) { itemList.add(new WorkItemInstance(child)); }//from ww w. ja va 2 s . c o m } } return itemList; }
From source file:org.yawlfoundation.yawl.resourcing.AbstractSelector.java
License:Open Source License
/** * Unpacks the xml describing the parameters to a HashMap object * * @param eParams//from w ww .ja v a2s. c o m * @return a [key, value] map of the parameters described by the {@code Element} */ protected static Map<String, String> unmarshalParams(Element eParams) { if (eParams != null) { HashMap<String, String> result = new HashMap<String, String>(); for (Element param : eParams.getChildren()) result.put(param.getChildText("key"), param.getChildText("value")); return result.isEmpty() ? null : result; } return null; }
From source file:org.yawlfoundation.yawl.resourcing.AbstractSelector.java
License:Open Source License
/** * Fills the members of this object with values found in an XML description * * @param e a JDOM Element containing the values * @see #getInformation(String)/*w ww .ja v a2 s . co m*/ */ public void reconstitute(Element e) { setName(e.getChildText("name")); setCanonicalName(e.getChildText("canonicalname")); setDisplayName(e.getChildText("displayname")); setDescription(e.getChildText("description")); List<Element> keys = e.getChild("keys").getChildren(); if (keys != null) { for (Element key : keys) addParam(key.getText(), ""); } }
From source file:org.yawlfoundation.yawl.resourcing.datastore.eventlog.AuditEvent.java
License:Open Source License
public void fromXML(Element xml) { super.fromXML(xml); _userid = xml.getChildText("userid"); }
From source file:org.yawlfoundation.yawl.resourcing.datastore.eventlog.BaseEvent.java
License:Open Source License
public void fromXML(Element xml) { _id = StringUtil.strToLong(xml.getAttributeValue("key"), -1); _event = xml.getChildText("eventtype"); _timeStamp = StringUtil.strToLong(xml.getChildText("timestamp"), -1); }
From source file:org.yawlfoundation.yawl.resourcing.datastore.eventlog.LogMiner.java
License:Open Source License
private String getFieldValue(String caseEventXML, String fieldname) { Element eventElem = JDOMUtil.stringToElement(caseEventXML); if (eventElem != null) { Element firstEvent = eventElem.getChild("event"); if (firstEvent != null) { return firstEvent.getChildText(fieldname); }/* w w w. java 2 s . c om*/ } return null; }
From source file:org.yawlfoundation.yawl.resourcing.datastore.eventlog.ResourceEvent.java
License:Open Source License
public void fromXML(Element xml) { super.fromXML(xml); _specKey = StringUtil.strToLong(xml.getChildText("speckey"), -1); _caseID = xml.getChildText("caseid"); _taskID = xml.getChildText("taskid"); _itemID = xml.getChildText("itemid"); _resourceID = xml.getChildText("resourceid"); }