Package org.openoffice.xmerge.util.registry

Examples of org.openoffice.xmerge.util.registry.ConverterInfo


  Class c = this.getClass();
  InputStream is = c.getResourceAsStream("XsltPlugin.properties");
  Properties props = new Properties();
  String ext= ".txt";
  String mimeType = null;
  ConverterInfo ci = this.getConverterInfo();
  Enumeration enumerate = ci.getDeviceMime();
  while (enumerate.hasMoreElements()) {      
      mimeType= (String) enumerate.nextElement();
  }
  try {
      props.load(is);
View Full Code Here


             boolean convertFromOffice,String pluginUrl,String FileName,String offMime,String sdMime) throws com.sun.star.uno.RuntimeException, IOException {
   
       String jarName = pluginUrl;
       String name= getFileName(FileName);
   
       ConverterInfo converterInfo = null;
       Enumeration ciEnum= null;
     
       XInputStreamToInputStreamAdapter xis =new XInputStreamToInputStreamAdapter(xml);
   
      
View Full Code Here

      //System.out.println("\nhref "+href+"\nbase "+base);
      if (href !=null){
    if(href.equals("javax.xml.transform.dom.DOMSource")|| href.equals(""))
        return null;
    try{
        ConverterInfo ci = pluginFactory.getConverterInfo();
        String newhRef ="jar:"+ci.getJarName()+"!/"+href;
        //System.out.println("\n Looking For "+ newhRef);
        StreamSource sheetFile= new StreamSource(newhRef);
        return sheetFile;
    }
    catch (Exception e){
View Full Code Here

    private ByteArrayOutputStream  transform(org.w3c.dom.Document xmlDoc)
     throws TransformerException,TransformerConfigurationException
      , FileNotFoundException,IOException{
 
     log("\nTransforming...");
     ConverterInfo ci = pluginFactory.getConverterInfo();
     ByteArrayOutputStream baos= new ByteArrayOutputStream();
     try{
      DocumentBuilderFactory dFactory = DocumentBuilderFactory.newInstance();
      dFactory.setNamespaceAware(true);
      DocumentBuilder dBuilder = dFactory.newDocumentBuilder();
    
      String teststr = ci.getXsltDeserial();
      teststr= teststr.substring(0,6);
      org.w3c.dom.Document xslDoc=null;
            if ((teststr.equals("http:/"))||(teststr.equals("file:/"))
                                    ||(teststr.equals("jar://"))){
          log(ci.getXsltDeserial());
          xslDoc= dBuilder.parse(ci.getXsltDeserial());

      }
      else{     
          log(ci.getJarName()+"!/"+ci.getXsltDeserial());
          xslDoc = dBuilder.parse(
            "jar:"+ci.getJarName()+"!/"+ci.getXsltDeserial());
      }

   
      DOMSource xslDomSource = new DOMSource(xslDoc);
      DOMSource xmlDomSource = new DOMSource(xmlDoc);
View Full Code Here

  Class c = this.getClass();
  InputStream is = c.getResourceAsStream("XsltPlugin.properties");
  Properties props = new Properties();
  String ext= ".txt";
  String mimeType = null;
  ConverterInfo ci = this.getConverterInfo();
  Enumeration enumerate = ci.getDeviceMime();
  while (enumerate.hasMoreElements()) {      
      mimeType= (String) enumerate.nextElement();
  }
  try {
      props.load(is);
View Full Code Here

  Class c = this.getClass();
  InputStream is = c.getResourceAsStream("XsltPlugin.properties");
  Properties props = new Properties();
  String ext= ".txt";
  String mimeType = null;
  ConverterInfo ci = this.getConverterInfo();
  Enumeration enumerate = ci.getDeviceMime();
  while (enumerate.hasMoreElements()) {      
      mimeType= (String) enumerate.nextElement();
  }
  try {
      props.load(is);
View Full Code Here

      //System.out.println("\nhref "+href+"\nbase "+base);
      if (href !=null){
    if(href.equals("javax.xml.transform.dom.DOMSource")|| href.equals(""))
        return null;
    try{
        ConverterInfo ci = pluginFactory.getConverterInfo();
        String newhRef ="jar:"+ci.getJarName()+"!/"+href;
        //System.out.println("\n Looking For "+ newhRef);
        StreamSource sheetFile= new StreamSource(newhRef);
        return sheetFile;
    }
    catch (Exception e){
View Full Code Here

    private ByteArrayOutputStream  transform(org.w3c.dom.Document xmlDoc)
     throws TransformerException,TransformerConfigurationException
      , FileNotFoundException,IOException{
 
     log("\nTransforming...");
     ConverterInfo ci = pluginFactory.getConverterInfo();
     ByteArrayOutputStream baos= new ByteArrayOutputStream();
     try{
      DocumentBuilderFactory dFactory = DocumentBuilderFactory.newInstance();
      dFactory.setNamespaceAware(true);
      DocumentBuilder dBuilder = dFactory.newDocumentBuilder();
    
      String teststr = ci.getXsltDeserial();
      teststr= teststr.substring(0,6);
      org.w3c.dom.Document xslDoc=null;
            if ((teststr.equals("http:/"))||(teststr.equals("file:/"))
                                    ||(teststr.equals("jar://"))){
          log(ci.getXsltDeserial());
          xslDoc= dBuilder.parse(ci.getXsltDeserial());

      }
      else{     
          log(ci.getJarName()+"!/"+ci.getXsltDeserial());
          xslDoc = dBuilder.parse(
            "jar:"+ci.getJarName()+"!/"+ci.getXsltDeserial());
      }

   
      DOMSource xslDomSource = new DOMSource(xslDoc);
      DOMSource xmlDomSource = new DOMSource(xmlDoc);
View Full Code Here

      //System.out.println("\nhref "+href+"\nbase "+base);
      if (href !=null){
    if(href.equals("javax.xml.transform.dom.DOMSource")|| href.equals(""))
        return null;
    try{
        ConverterInfo ci = pluginFactory.getConverterInfo();
        String newhRef ="jar:"+ci.getJarName()+"!/"+href;
        //System.out.println("\n Looking For "+ newhRef);
        StreamSource sheetFile= new StreamSource(newhRef);
        return sheetFile;
    }
    catch (Exception e){
View Full Code Here

    private ByteArrayOutputStream transform(org.w3c.dom.Document domDoc)
     throws TransformerException,TransformerConfigurationException
      , FileNotFoundException,IOException{
     //System.out.println("\nTransforming...");
     ConverterInfo ci = pluginFactory.getConverterInfo();
     //DOMResult xmlDomResult = new DOMResult();
     ByteArrayOutputStream baos= new ByteArrayOutputStream();
     try{
           
      DocumentBuilderFactory dFactory = DocumentBuilderFactory.newInstance();
      dFactory.setNamespaceAware(true);
    
      DocumentBuilder dBuilder = dFactory.newDocumentBuilder();
      String teststr = ci.getXsltSerial();
     
      teststr= teststr.substring(0,6);
      org.w3c.dom.Document xslDoc=null;
            if ((teststr.equals("http:/"))||(teststr.equals("file:/"))
                                    ||(teststr.equals("jar://"))){
          System.out.println(ci.getXsltSerial());
          xslDoc= dBuilder.parse(ci.getXsltSerial());

      }
      else{     
          //System.out.println(ci.getJarName()+"!/"+ci.getXsltSerial());
          xslDoc = dBuilder.parse(
            "jar:"+ci.getJarName()+"!/"+ci.getXsltSerial());
      }
    
      DOMSource xslDomSource = new DOMSource(xslDoc);      
      DOMSource xmlDomSource = new DOMSource(domDoc);   
 
View Full Code Here

TOP

Related Classes of org.openoffice.xmerge.util.registry.ConverterInfo

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.