Package org.linkedin.util.xml

Examples of org.linkedin.util.xml.XMLIndent


  /**
   * Constructor
   */
  public XmlStepCompletionStatusVisitor()
  {
    _xml = new XMLIndent();
    _tagName = null;
    _attributes = null;
    _throwable = null;
  }
View Full Code Here


  /**
   * Constructor
   */
  public XmlStepVisitor()
  {
    this(new XMLIndent(), null, null);
  }
View Full Code Here

   */
  public String toXml(Map<String, Object> context)
  {
    XmlStepVisitor<T> visitor = new XmlStepVisitor<T>();

    XMLIndent xml = visitor.getXml();

    xml.addXMLDecl("1.0");

    Map<String, Object> attributes = new LinkedHashMap<String, Object>();
    attributes.putAll(_metadata);

    if(context != null)
    {
      attributes.putAll(context);
    }

    if(_step != null)
    {
      xml.addOpeningTag("plan", attributes);
      _step.acceptVisitor(visitor);
      xml.addClosingTag("plan");
    }
    else
    {
      xml.addEmptyTag("plan", attributes);
    }

    return xml.getXML();
  }
View Full Code Here

  {
    if(_stepExecution.isCompleted())
    {
      XmlStepCompletionStatusVisitor<T> visitor = new XmlStepCompletionStatusVisitor<T>();

      XMLIndent xml = visitor.getXml();

      xml.addXMLDecl("1.0");

      Map<String, Object> attributes = new LinkedHashMap<String, Object>();
      attributes.putAll(_plan.getMetadata());
      if(context != null)
      {
        attributes.putAll(context);
      }

      xml.addOpeningTag("plan", attributes);
      _stepExecution.getCompletionStatus().acceptVisitor(visitor);
      xml.addClosingTag("plan");

      return xml.getXML();
    }
    else
    {
      return _plan.toXml();
    }
View Full Code Here

TOP

Related Classes of org.linkedin.util.xml.XMLIndent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.