Examples of DOMImplementation


Examples of org.w3c.dom.DOMImplementation

  }
 
  private void generateFileAsSVG(Map whiteBoardObjects, String roomRecordingInXML, RecordingConversionJob recordingConversionJob) throws Exception {
   
    // Get a DOMImplementation.
        DOMImplementation domImpl =
            GenericDOMImplementation.getDOMImplementation();

        // Create an instance of org.w3c.dom.Document.
        //String svgNS = "http://www.w3.org/2000/svg";
        String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;

        Document document = domImpl.createDocument(svgNS, "svg", null);
       
        // Get the root element (the 'svg' element).
        Element svgRoot = document.getDocumentElement();

       
View Full Code Here

Examples of org.w3c.dom.DOMImplementation

                    tempPath =  tempPath + ".svg";
                }
                tempFile = new File(tempPath);
            }
            // Get a DOMImplementation
            DOMImplementation domImpl =
            GenericDOMImplementation.getDOMImplementation();
           
            // Create an instance of org.w3c.dom.Document
            Document document = domImpl.createDocument(null, "svg", null);
           
            // Create an instance of the SVG Generator
            SVGGraphics2D svgGenerator = new SVGGraphics2D(document);
           
            // Ask the test to render into the SVG Graphics2D implementation
View Full Code Here

Examples of org.w3c.dom.DOMImplementation

     * @param graphSheet   the preview graph sheet
     * @param supportSize  the support size of the exported image
     */
    protected Document buildDOM(GraphSheet graphSheet, SupportSize supportSize) {
        // creates SVG document
        DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
        DocumentType doctype = impl.createDocumentType(
                "-//W3C//DTD SVG 1.1//EN",
                "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd",
                "");
        doc = impl.createDocument(namespaceURI, "svg", doctype);

        // initializes CSS and SVG specific DOM interfaces
        UserAgent userAgent = new UserAgentAdapter();
        DocumentLoader loader = new DocumentLoader(userAgent);
        BridgeContext ctx = new BridgeContext(userAgent, loader);
View Full Code Here

Examples of org.w3c.dom.DOMImplementation

       
        if (source == null ) {
          return null;
        } else if (source != null && source.getOwnerDocument() != null) {

            DOMImplementation thisImpl = this.getImplementation();
            DOMImplementation otherImpl = source.getOwnerDocument().getImplementation();
           
            // when the source node comes from a different implementation.
            if (thisImpl != otherImpl) {
           
                // Adopting from a DefferedDOM to DOM
View Full Code Here

Examples of org.w3c.dom.DOMImplementation

    @Override
    public void setDocument(Document document) {
        if (saajMessage.getSOAPPart() != document) {
            Assert.state(messageFactory != null, "Could find message factory to use");
            try {
                DOMImplementation implementation = document.getImplementation();
                Assert.isInstanceOf(DOMImplementationLS.class, implementation);

                DOMImplementationLS loadSaveImplementation = (DOMImplementationLS) implementation;
                LSOutput output = loadSaveImplementation.createLSOutput();
                ByteArrayOutputStream bos = new ByteArrayOutputStream();
View Full Code Here

Examples of org.w3c.dom.DOMImplementation

     * @throws IllegalArgumentException in case of errors
     * @see org.apache.rampart.util.Axis2Util.getSOAPEnvelopeFromDOMDocument(Document, boolean)
     */
    public static SOAPEnvelope toEnvelope(Document document) {
        try {
            DOMImplementation implementation = document.getImplementation();
            Assert.isInstanceOf(DOMImplementationLS.class, implementation);

            DOMImplementationLS loadSaveImplementation = (DOMImplementationLS) implementation;
            LSOutput output = loadSaveImplementation.createLSOutput();
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
View Full Code Here

Examples of org.w3c.dom.DOMImplementation

        Document document = returnedElement.getDocument();
        if (document == null) {
            document = new Document(returnedElement);
        }
        DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
        DOMImplementation domImplementation = documentBuilder.getDOMImplementation();
        org.w3c.dom.Document w3cDocument = DOMConverter.convert(document, domImplementation);
        return new DOMSource(w3cDocument);
    }
View Full Code Here

Examples of org.w3c.dom.DOMImplementation

    LSOutput output;

    // Initialize the XML document
    try {
      DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance();
      DOMImplementation impl = registry.getDOMImplementation("Core 3.0");
      d = impl.createDocument(null, null, null);
      DOMImplementationLS implLS = (DOMImplementationLS) impl.getFeature("LS",
          "3.0");
      output = implLS.createLSOutput();
      output.setCharacterStream(out);
      serializer = implLS.createLSSerializer();
    } catch (ClassNotFoundException e) {
View Full Code Here

Examples of org.w3c.dom.DOMImplementation

        Element root = getElement(value, rootName);
        try {
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
            factory.setNamespaceAware(true);
            DocumentBuilder builder = factory.newDocumentBuilder();
            DOMImplementation impl = builder.getDOMImplementation();

            return DOMConverter.convert(new Document(root), impl);
        } catch (ParserConfigurationException e) {
            throw new IllegalStateException(e);
        }
View Full Code Here

Examples of org.w3c.dom.DOMImplementation

    @Test
    public void testSerializeToXML() throws ParserConfigurationException, TransformerException, IOException {
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        DocumentBuilder builder = factory.newDocumentBuilder();
        DOMImplementation impl = builder.getDOMImplementation();
        Document doc = impl.createDocument(null, null, null);
        Node n1 = doc.createElement("DIV");
        Node n2 = doc.createElement("SPAN");
        Node n3 = doc.createElement("P");
        n1.setTextContent("Content 1");
        n2.setTextContent("Content 2");
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.