Examples of XmlIndent


Examples of com.cybozu.vmbkp.util.XmlIndent

            /* Delete mounted cd-rom information. */
            ovf.deleteMountedCdromInfoInHardwareSection();

            /* fix indent of xml data for human's easy read. */
            XmlIndent xmli = new XmlIndent(ovf.toString());
            xmli.fixIndent();
               
            String ret2 = xmli.toString();
            FileWriter fw2 = new FileWriter(ovfDir.getPath() +
                                            File.pathSeparator +
                                            vmm.getName() + ".ovf");
            fw2.write(ret2);
            fw2.close();
View Full Code Here

Examples of com.cybozu.vmbkp.util.XmlIndent

            String ovfStr1 = vmm.exportOvf();
            VmbkpOvf ovf = new VmbkpOvf(ovfStr1);

            /* Export original ovf. This is just for debug. */
            {
                XmlIndent xmli = new XmlIndent(ovf.toString());
                xmli.fixIndent();
                FileWriter fw = new FileWriter(outOvfPath + ".orig");
                fw.write(xmli.toString());
                fw.close();
            }

            /* Delete scsi controller and disk information. */
            ovf.deleteFilesInReferences();
            ovf.deleteDisksInDiskSection();
            Set<String> ctrlIdSet = ovf.deleteDiskDevicesInHardwareSection();
            ovf.deleteControllerDevicesWithoutChildInHardwareSection(ctrlIdSet);

            /* Delete mounted cd-rom information. */
            ovf.deleteMountedCdromInfoInHardwareSection();

            /* Fix indent of xml data for human's eary read. */
            XmlIndent xmli = new XmlIndent(ovf.toString());
            xmli.fixIndent();
            String ovfStr2 = xmli.toString();
            if (ovfStr2 == null) {
                logger_.warning("ovf is null.");
                return false;
            }

View Full Code Here

Examples of com.cybozu.vmbkp.util.XmlIndent

            /* Delete mounted cd-rom information. */
            ovf.deleteMountedCdromInfoInHardwareSection();
           
            /* fix indent of xml data for human's easy read. */
            XmlIndent xmli = new XmlIndent(ovf.toString());
            xmli.fixIndent();
           
            FileWriter fw = new FileWriter(outputFile);
            fw.write(xmli.toString());
            fw.close();
        } catch (Exception e) {
            e.printStackTrace();
        }

View Full Code Here

Examples of org.linkedin.util.xml.XMLIndent

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

Examples of org.linkedin.util.xml.XMLIndent

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

Examples of org.linkedin.util.xml.XMLIndent

   */
  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

Examples of org.linkedin.util.xml.XMLIndent

  {
    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
Copyright © 2018 www.massapi.com. 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.