Package org.openoffice.xmerge.converter.xml.xslt

Examples of org.openoffice.xmerge.converter.xml.xslt.GenericOfficeDocument


        this.orig = doc;
    }

    public void merge(org.openoffice.xmerge.Document modifiedDoc) throws MergeException {

        GenericOfficeDocument wdoc1 = (GenericOfficeDocument) orig;
        GenericOfficeDocument wdoc2 = (GenericOfficeDocument) modifiedDoc;

        Document doc1 = wdoc1.getContentDOM();
        Document doc2 = wdoc2.getContentDOM();

        Iterator i1 = new ParaNodeIterator(cc_, doc1.getDocumentElement());
        Iterator i2 = new ParaNodeIterator(cc_, doc2.getDocumentElement());

        DiffAlgorithm diffAlgo = new IteratorLCSAlgorithm();
View Full Code Here


     public Document createOfficeDocument(String name, InputStream is)
        throws IOException {

        // read zipped XML stream
        GenericOfficeDocument doc = new GenericOfficeDocument(name);
        doc.read(is);
        return doc;
    }
View Full Code Here

   
     public Document createOfficeDocument(String name, InputStream is,boolean isZip)
        throws IOException {

        // read zipped XML stream
        GenericOfficeDocument doc = new GenericOfficeDocument(name);
        doc.read(is,isZip);
        return doc;
    }
View Full Code Here

    public Document deserialize() throws ConvertException, IOException {
  log("\nFound the XSLT deserializer");
  Enumeration enumerate = cd.getDocumentEnumeration();
  org.w3c.dom.Document domDoc=null;
  DOMDocument docOut=null;
  GenericOfficeDocument doc = null;
  ByteArrayOutputStream baos =null;
  GenericOfficeDocument sxwDoc = new GenericOfficeDocument("output");
  while (enumerate.hasMoreElements()) {      
     docOut = (DOMDocument) enumerate.nextElement();
  }
  domDoc = docOut.getContentDOM()
  try{
       baos = transform(domDoc);
       sxwDoc.initContentDOM();
       DocumentBuilderFactory dFactory = DocumentBuilderFactory.newInstance();
       dFactory.setNamespaceAware(true);
       DocumentBuilder dBuilder = dFactory.newDocumentBuilder();
       sxwDoc.setContentDOM(dBuilder.parse(new ByteArrayInputStream(baos.toByteArray())));
 
  }
  catch(Exception e){
      System.out.println("The following error occurred:"+e);
  }
View Full Code Here

        this.orig = doc;
    }

    public void merge(org.openoffice.xmerge.Document modifiedDoc) throws MergeException {

        GenericOfficeDocument wdoc1 = (GenericOfficeDocument) orig;
        GenericOfficeDocument wdoc2 = (GenericOfficeDocument) modifiedDoc;

        Document doc1 = wdoc1.getContentDOM();
        Document doc2 = wdoc2.getContentDOM();

        Iterator i1 = new ParaNodeIterator(cc_, doc1.getDocumentElement());
        Iterator i2 = new ParaNodeIterator(cc_, doc2.getDocumentElement());

        DiffAlgorithm diffAlgo = new IteratorLCSAlgorithm();
View Full Code Here

     public Document createOfficeDocument(String name, InputStream is)
        throws IOException {

        // read zipped XML stream
        GenericOfficeDocument doc = new GenericOfficeDocument(name);
        doc.read(is);
        return doc;
    }
View Full Code Here

   
     public Document createOfficeDocument(String name, InputStream is,boolean isZip)
        throws IOException {

        // read zipped XML stream
        GenericOfficeDocument doc = new GenericOfficeDocument(name);
        doc.read(is,isZip);
        return doc;
    }
View Full Code Here

    public Document deserialize() throws ConvertException, IOException {
  log("\nFound the XSLT deserializer");
  Enumeration enumer = cd.getDocumentEnumeration();
  org.w3c.dom.Document domDoc=null;
  DOMDocument docOut=null;
  GenericOfficeDocument doc = null;
  ByteArrayOutputStream baos =null;
  GenericOfficeDocument sxwDoc = new GenericOfficeDocument("output");
  while (enumer.hasMoreElements()) {      
     docOut = (DOMDocument) enumer.nextElement();
  }
  domDoc = docOut.getContentDOM()
  try{
       baos = transform(domDoc);
       sxwDoc.initContentDOM();
       DocumentBuilderFactory dFactory = DocumentBuilderFactory.newInstance();
       dFactory.setNamespaceAware(true);
       DocumentBuilder dBuilder = dFactory.newDocumentBuilder();
       sxwDoc.setContentDOM(dBuilder.parse(new ByteArrayInputStream(baos.toByteArray())));
 
  }
  catch(Exception e){
      System.out.println("The following error occurred:"+e);
  }
View Full Code Here

        this.orig = doc;
    }

    public void merge(org.openoffice.xmerge.Document modifiedDoc) throws MergeException {

        GenericOfficeDocument wdoc1 = (GenericOfficeDocument) orig;
        GenericOfficeDocument wdoc2 = (GenericOfficeDocument) modifiedDoc;

        Document doc1 = wdoc1.getContentDOM();
        Document doc2 = wdoc2.getContentDOM();

        Iterator i1 = new ParaNodeIterator(cc_, doc1.getDocumentElement());
        Iterator i2 = new ParaNodeIterator(cc_, doc2.getDocumentElement());

        DiffAlgorithm diffAlgo = new IteratorLCSAlgorithm();
View Full Code Here

     public Document createOfficeDocument(String name, InputStream is)
        throws IOException {

        // read zipped XML stream
        GenericOfficeDocument doc = new GenericOfficeDocument(name);
        doc.read(is);
        return doc;
    }
View Full Code Here

TOP

Related Classes of org.openoffice.xmerge.converter.xml.xslt.GenericOfficeDocument

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.