Examples of DocumentImpl


Examples of org.apache.axiom.om.impl.dom.DocumentImpl

            OMDOMFactory factory = new OMDOMFactory();
            // Not really sure whether this will work :-?
            XMLStreamReader reader = StAXUtils
                    .createXMLStreamReader(inputSource.getCharacterStream());
            StAXOMBuilder builder = new StAXOMBuilder(factory, reader);
            DocumentImpl doc = (DocumentImpl) builder.getDocument();
            ((ElementImpl) doc.getDocumentElement()).build();
            return (DocumentImpl) builder.getDocument();
        } catch (XMLStreamException e) {
            throw new SAXException(e);
        }
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.DocumentImpl

     * Returns a new document impl.
     *
     * @see javax.xml.parsers.DocumentBuilder#newDocument()
     */
    public Document newDocument() {
        DocumentImpl documentImpl = new DocumentImpl(factory);
        documentImpl.setComplete(true);
        return documentImpl;
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.DocumentImpl

    }

    public Document parse(InputSource inputSource) throws SAXException, IOException {
        OMXMLParserWrapper builder = factory.getMetaFactory().createOMBuilder(factory,
                StAXParserConfiguration.DEFAULT, inputSource);
        DocumentImpl doc = (DocumentImpl) builder.getDocument();
        doc.close(true);
        return doc;
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.DocumentImpl

    public OMMetaFactory getMetaFactory() {
        return metaFactory;
    }

    public OMDocument createOMDocument() {
        return new DocumentImpl(this);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.DocumentImpl

        }
        return comment;
    }

    public OMDocument createOMDocument(OMXMLParserWrapper builder) {
        return new DocumentImpl(builder, this);
    }
View Full Code Here

Examples of org.apache.axis2.om.impl.dom.DocumentImpl

  /**
   * Returns a new document impl
   * @see javax.xml.parsers.DocumentBuilder#newDocument()
   */
  public Document newDocument() {
    DocumentImpl documentImpl = new DocumentImpl();
    documentImpl.setComplete(true);
    return documentImpl;
  }
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.runtime.DocumentImpl

        ObjectType type = getTypeFromObjectData(objectData);

        /* determine type */
        switch (objectData.getBaseTypeId()) {
        case CMIS_DOCUMENT:
            return new DocumentImpl((SessionImpl) this.session, type, objectData, context);
        case CMIS_FOLDER:
            return new FolderImpl((SessionImpl) this.session, type, objectData, context);
        case CMIS_POLICY:
            return new PolicyImpl((SessionImpl) this.session, type, objectData, context);
        case CMIS_RELATIONSHIP:
View Full Code Here

Examples of org.apache.jackrabbit.ocm.testmodel.auto.impl.DocumentImpl

    //---------------------------------------------------------------------------------------------------------
      Folder  folder = new FolderImpl();
      folder.setPath("/folder2");
      folder.setName("folder2");       
   
      Document document = new DocumentImpl();
      document.setPath("/folder2/document4");
      document.setName("document4");
      document.setContentType("plain/text");
      DocumentStream documentStream = new DocumentStream();
      documentStream.setEncoding("utf-8");
      documentStream.setContent("Test Content 4".getBytes());
      document.setDocumentStream(documentStream);      

      Folder subFolder = new FolderImpl();
      subFolder.setName("subfolder");
      subFolder.setPath("/folder2/subfolder");
                 
View Full Code Here

Examples of org.apache.jackrabbit.ocm.testmodel.inheritance.impl.DocumentImpl

      ObjectContentManager ocm = this.getObjectContentManager();

      //---------------------------------------------------------------------------------------------------------
      // Insert
      //---------------------------------------------------------------------------------------------------------     
            DocumentImpl documentImpl = new DocumentImpl();
            documentImpl.setPath("/document1");
            documentImpl.setName("document name");
            documentImpl.setContentType("plain/text");
            DocumentStream documentStream = new DocumentStream();
            documentStream.setEncoding("utf-8");
            documentStream.setContent("Test Content".getBytes());
            documentImpl.setDocumentStream(documentStream);
            Document document = documentImpl;
           
            ocm.insert(document);
      ocm.save();
View Full Code Here

Examples of org.apache.xerces.dom.DocumentImpl

       
        // retrieve the node from the display
        gistoolkit.common.Node tempRootNode = inDisplay.getNode();
       
        // Convert the Node elements to an XML DOM representation
        Document tempDocument = new DocumentImpl();
        Element tempRootElement = tempDocument.createElement("GISToolkit");     // Create Root Element
        addNode(tempDocument, tempRootElement, tempRootNode);
        tempDocument.appendChild(tempRootElement);
       
        // write the XML Document
        File tempFile = new File(inFileName);
        OutputFormat    format  = new OutputFormat( tempDocument );   //Serialize DOM
        format.setIndenting(true);
        format.setLineSeparator("\n");
        FileWriter  fout = new FileWriter(tempFile);        //Writer will be a String
        XMLSerializer    serial = new XMLSerializer( fout, format );
        serial.asDOMSerializer();                            // As a DOM Serializer
        serial.serialize( tempDocument.getDocumentElement() );
        fout.close();
    }
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.