Package org.w3c.dom

Examples of org.w3c.dom.DOMImplementation


    public static String getServicePolicy(String policyMap, String portProfile, boolean attach) {
        try {
            // Create the document and root element.
            DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
            DOMImplementation domImpl = docBuilder.getDOMImplementation();
            Document doc = createDocument(domImpl);

            // Edit configuration command.
            Element editConfig = doc.createElement("nf:edit-config");
            doc.getDocumentElement().appendChild(editConfig);
View Full Code Here


    public static String getPortProfile(String name) {
        try {
            DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
            DOMImplementation domImpl = docBuilder.getDOMImplementation();
            Document doc = createDocument(domImpl);

            Element get = doc.createElement("nf:get");
            doc.getDocumentElement().appendChild(get);
View Full Code Here

    public static String getPolicyMap(String name) {
        try {
            DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
            DOMImplementation domImpl = docBuilder.getDOMImplementation();
            Document doc = createDocument(domImpl);

            Element get = doc.createElement("nf:get");
            doc.getDocumentElement().appendChild(get);
View Full Code Here

    public static String getHello() {
        try {
            DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
            DOMImplementation domImpl = docBuilder.getDOMImplementation();

            // Root elements.
            Document doc = domImpl.createDocument(s_namespace, "nc:hello", null);

            // Client capacity. We are only supporting basic capacity.
            Element capabilities = doc.createElement("nc:capabilities");
            Element capability = doc.createElement("nc:capability");
            capability.setTextContent("urn:ietf:params:xml:ns:netconf:base:1.0");
View Full Code Here

    public static String getVServiceNode(String vlanId, String ipAddr) {
        try {
            // Create the document and root element.
            DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
            DOMImplementation domImpl = docBuilder.getDOMImplementation();
            Document doc = createDocument(domImpl);

            // Edit configuration command.
            Element editConfig = doc.createElement("nf:edit-config");
            doc.getDocumentElement().appendChild(editConfig);
View Full Code Here

        System.out.println("After garbage collection: "
          + (r.totalMemory() - r.freeMemory())/(1024.0*1024) + "MB");
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        factory.setNamespaceAware(true);
        DocumentBuilder jaxp = factory.newDocumentBuilder();
        DOMImplementation impl = jaxp.getDOMImplementation();
               
        System.gc(); System.gc(); System.gc();
        // Warm up HotSpot
        DOMConverter.convert(doc, impl);
        DOMConverter.convert(doc, impl);
View Full Code Here

          // Level 2 solution. We might want to have an intermediate stage,
          // which would assume DOM Level 2 but not assume Xerces.
          //
          // (Shouldn't have to check whether impl is null in a compliant DOM,
          // but let's be paranoid for a moment...)
          DOMImplementation impl=doc.getImplementation();
          if(impl!=null && impl.hasFeature("Core","2.0"))
          {
                  parent=((Attr)node).getOwnerElement();
                  return parent;
          }
View Full Code Here

          // Level 2 solution. We might want to have an intermediate stage,
          // which would assume DOM Level 2 but not assume Xerces.
          //
          // (Shouldn't have to check whether impl is null in a compliant DOM,
          // but let's be paranoid for a moment...)
          DOMImplementation impl=doc.getImplementation();
          if(impl!=null && impl.hasFeature("Core","2.0"))
          {
                  parent=((Attr)node).getOwnerElement();
                  return parent;
          }
View Full Code Here

   * @throws IOException
   */
  private static synchronized void handleSVG (ByteArrayOutputStream baos, JFreeChart chart, int width, int height)
    throws IOException {
    OutputStreamWriter writer = new OutputStreamWriter(baos, "UTF-8");
    DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();
    Document document = domImpl.createDocument("cewolf-svg", "svg", null);
    SVGGeneratorContext ctx = SVGGeneratorContext.createDefault(document);
//    ctx.setComment("Generated by Cewolf using JFreeChart and Apache Batik SVG Generator");
    SVGGraphics2D svgGenerator = new SVGGraphics2D(ctx, false);
    svgGenerator.setSVGCanvasSize(new Dimension(width, height));
    chart.draw(svgGenerator, new Rectangle2D.Double(0, 0, width, height), null);
View Full Code Here

        int height = size.height;

        if(width > 0 && height > 0)
        {
            DOMImplementation domImpl = getDOMImpl();

            Document document = domImpl.createDocument("www.cs.man.ac.uk/~horridgm", "svg", null);

            // Get an instance of the svg generator
            SVGGraphics2D graphics2D = new SVGGraphics2D(document);

            graphics2D.getGeneratorContext().setPrecision(4);
View Full Code Here

TOP

Related Classes of org.w3c.dom.DOMImplementation

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.