Examples of createDocument()


Examples of org.apache.poi.poifs.filesystem.POIFSFileSystem.createDocument()

            s.setDictionary(m);
            s.setFormatID(SectionIDMap.DOCUMENT_SUMMARY_INFORMATION_ID[0]);
            int codepage = Constants.CP_UNICODE;
            s.setProperty(PropertyIDMap.PID_CODEPAGE, Variant.VT_I2,
                          new Integer(codepage));
            poiFs.createDocument(ps1.toInputStream(), "Test");
            poiFs.writeFilesystem(out);
            out.close();

            /* Read back: */
            final POIFile[] psf = Util.readPropertySets(copy);
View Full Code Here

Examples of org.apache.poi.poifs.filesystem.POIFSFileSystem.createDocument()

            s.setDictionary(m);
            s.setFormatID(SectionIDMap.DOCUMENT_SUMMARY_INFORMATION_ID[0]);
            int codepage = 12345;
            s.setProperty(PropertyIDMap.PID_CODEPAGE, Variant.VT_I2,
                          new Integer(codepage));
            poiFs.createDocument(ps1.toInputStream(), "Test");
            poiFs.writeFilesystem(out);
            out.close();
            fail("This testcase did not detect the invalid codepage value.");
        }
        catch (IllegalPropertySetDataException ex)
View Full Code Here

Examples of org.apache.servicemix.jbi.jaxp.SourceTransformer.createDocument()

    public void buildAggregate(Object aggregation, NormalizedMessage message,
            MessageExchange exchange, boolean doTimeout) throws Exception {
        NormalizedMessage[] messages = ((SplitterAggregation) aggregation).messages;
        String correlationId = ((SplitterAggregation) aggregation).correlationId;
        SourceTransformer st = new SourceTransformer();
        Document doc = st.createDocument();
        Element root = createChildElement(aggregateElementName, doc);
        root.setAttribute(countAttribute, Integer.toString(messages.length));
        for (int i = 0; i < messages.length; i++) {
            if (messages[i] != null) {
                Element elem = st.toDOMElement(messages[i]);
View Full Code Here

Examples of org.apache.xerces.dom.DOMImplementationImpl.createDocument()

    protected Document createXMLFile(String fileName) throws Exception {
        System.out.println("XMLDBTestCase.createXMLFile() - Writing file= " + fileName);       
        FileWriter out = new FileWriter(fileName);

        DOMImplementation documentCreator = new DOMImplementationImpl();
        Document doc = documentCreator.createDocument(null,"XMLDBTests",null);

        Element root = doc.getDocumentElement();

        Element levelZeroTests = doc.createElement("levelZeroTests");
        levelZeroTests.setAttribute("complianceLevel", "0");
View Full Code Here

Examples of org.dom4j.DocumentFactory.createDocument()

   {
      processDir(jbossHome);
      try
      {
         DocumentFactory df = DocumentFactory.getInstance();
         Document doc = df.createDocument();
         Element root = doc.addElement("jar-versions");
         Iterator iter = jars.iterator();
         while( iter.hasNext() )
         {
            JarInfo info = (JarInfo) iter.next();
View Full Code Here

Examples of org.dom4j.DocumentFactory.createDocument()

   * @return Document The XML document
   */
  public Document getResDoc(AssessmentInstance ai, Locale locale, Identity identity) {
    AssessmentContext ac = ai.getAssessmentContext();
    DocumentFactory df = DocumentFactory.getInstance();
    Document res_doc = df.createDocument();
    Element root = df.createElement("qti_result_report");
    res_doc.setRootElement(root);
    Element result = root.addElement("result");
    Element extension_result = result.addElement("extension_result");

View Full Code Here

Examples of org.dom4j.DocumentFactory.createDocument()

   * @see org.olat.core.gui.control.generic.textmarker.TextMarkerManager#saveToFile(org.olat.core.util.vfs.VFSLeaf,
   *      java.util.List)
   */
  public void saveToFile(VFSLeaf textMarkerFile, List textMarkerList) {
    DocumentFactory df = DocumentFactory.getInstance();
    Document doc = df.createDocument();
    // create root element with version information
    Element root = df.createElement(XML_ROOT_ELEMENT);
    root.addAttribute(XML_VERSION_ATTRIBUTE, String.valueOf(VERSION));
    doc.setRootElement(root);
    // add TextMarker elements
View Full Code Here

Examples of org.dom4j.dom.DOMDocumentFactory.createDocument()

    // Test case(s)
    // -------------------------------------------------------------------------
    public void testBug1148333() {
        DOMDocumentFactory factory = (DOMDocumentFactory) DOMDocumentFactory
                .getInstance();
        DOMDocument doc = (DOMDocument) factory.createDocument();
        Element el = doc.addElement("root");
        el.addNamespace("pref2", "uri2");

        DOMDocument clone = (DOMDocument) doc.cloneNode(true);
       
View Full Code Here

Examples of org.eclipse.persistence.platform.xml.XMLPlatform.createDocument()

    private Object buildFragment(Property property, SDODataObject parentObject, SDODataObject value) {
        //build an XML Fragment from this SDO
        XMLPlatform xmlPlatform = XMLPlatformFactory.getInstance().getXMLPlatform();
        XMLMarshaller xmlMarshaller = ((SDOXMLHelper)helperContext.getXMLHelper()).getXmlMarshaller();
        Document doc = xmlPlatform.createDocument();
        XMLRoot root = new XMLRoot();
        root.setObject(value);
        root.setLocalName(property.getName());
        if(((SDOProperty)property).isNamespaceQualified()){
          root.setNamespaceURI(parentObject.getType().getURI());
View Full Code Here

Examples of org.eclipse.persistence.sdo.helper.SDOXMLHelper.createDocument()

            // Bug 8909750 - Toplink already sets this to "GMT".  ADF
            // resets it before we get here, so don't change it again.
            //sdoXMLHelper.setTimeZone(TimeZone.getTimeZone("GMT"));
            sdoXMLHelper.setTimeZoneQualified(true);

            XMLDocument xmlDoc = sdoXMLHelper.createDocument((DataObject) java, xmlTag.getNamespaceURI(), xmlTag.getLocalPart());
            if (xmlDoc == null) {
                return;
            }
            xmlDoc.setXMLDeclaration(false);
            DataObject saveOptions = null;
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.