/** * Returns a copy of this XmlAttribute. */ public Object clone () { if (getValue() == null) return new XmlAttribute(); return new XmlAttribute((org.jdom.Content)getContent().clone()); }
public Attribute decode (final Object o, final java.util.Map args) throws CodingException { final org.jdom.Element elt = enforceElement(o); //log.debug("decode() elt :\n"+XmlUtils.toString(elt)); final org.jdom.Content c = XmlUtils.getFirstContent(elt); return new XmlAttribute(c); }
private static Attribute toAttribute (final org.jdom.Content c) { if (c == null) return null; if (c instanceof org.jdom.Text) return new StringAttribute(((org.jdom.Text)c).getText()); return new XmlAttribute((org.jdom.Content)c.clone()); }
return new XmlAttribute(con);
/** * Does the job of executing the car or cdr commands (xdr or xar too). */ protected void execute (final InFlowWorkItem wi, org.jdom.Content con) { String command = this.getId().getExpressionName(); if (log.isDebugEnabled()) log.debug("execute() full command >"+command+"<"); final char com = command.charAt(0); command = command.substring(1, command.length()-1); if (com == 'x') { con = xExecute(command, con); } else if (com == 'c') { con = cExecute(command, con); } else { throw new IllegalArgumentException ("not a valid command '"+command+"'"); } ValueUtils.setResult(wi, new XmlAttribute(con)); }
log.debug("reply() result \n"+XmlUtils.xmlToString(c)); ValueUtils.setResult(wi, new XmlAttribute(c));
return new BooleanAttribute((Boolean)o); if (o instanceof org.jdom.Content) return new XmlAttribute((org.jdom.Content)o); if (o instanceof org.jdom.Document) return new XmlAttribute(((org.jdom.Document)o).getRootElement()); if (o instanceof byte[]) return Base64Attribute.newBase64Attribute((byte[])o);
public void apply (final InFlowWorkItem wi) throws ApplyException { //log.debug("apply()"); Attribute value = null; final String sContent = (String)this.lookupVariable(SubProcessRefExpression.V_CPARAMS); if (sContent != null) { try { final org.jdom.Element e = //XmlUtils.extractXmlElement(sContent); XmlUtils.doExtractXmlElement(sContent); value = new XmlAttribute(e); } catch (final Exception e) { throw new ApplyException ("No XML available in var '__cparams__'", e); } } if (value != null) ValueUtils.setResult(wi, value); else ValueUtils.cleanResult(wi); //log.debug("apply() parent is "+this.getParent()); applyToParent(wi); }
(wi, new XmlAttribute((org.jdom.Content)value));
ValueUtils.setResult(wi, new XmlAttribute(cResult));