Package org.openoffice.xmerge.util.registry

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


    @return  The first <code>Convert</code> object that supports
    *           the specified conversion.
    */
    public Convert getConverter(String mimeTypeIn, String mimeTypeOut) {

        ConverterInfo foundInfo = null;
    boolean toOffice;
       
    toOffice = foundInfo.isValidOfficeType(mimeTypeOut);
   
        // findConverterInfo expects the second paramenter to be the
    // destination MimeType
        if (toOffice)
            foundInfo = ConverterInfoMgr.findConverterInfo(mimeTypeIn, mimeTypeOut);
View Full Code Here


    *
    *  @return  true if the conversion is possible, false otherwise.
    */
    public boolean canConvert(String mimeTypeIn, String mimeTypeOut) {

    ConverterInfo foundInfo = null;

        // findConverterInfo expects the second paramenter to be the
    // destination MimeType
        if (foundInfo.isValidOfficeType(mimeTypeOut)) 
            foundInfo = ConverterInfoMgr.findConverterInfo(mimeTypeIn, mimeTypeOut);
        else
            foundInfo = ConverterInfoMgr.findConverterInfo(mimeTypeOut, mimeTypeIn);

        if (foundInfo != null)
View Full Code Here

    @return  The first <code>Convert</code> object that supports
    *           the specified conversion.
    */
    public Convert getConverter(String mimeTypeIn, String mimeTypeOut) {

        ConverterInfo foundInfo = null;
    boolean toOffice;
       
    toOffice = foundInfo.isValidOfficeType(mimeTypeOut);
   
        // findConverterInfo expects the second paramenter to be the
    // destination MimeType
        if (toOffice)
            foundInfo = ConverterInfoMgr.findConverterInfo(mimeTypeIn, mimeTypeOut);
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

             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 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

  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 enumer = ci.getDeviceMime();
  while (enumer.hasMoreElements()) {      
      mimeType= (String) enumer.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 enumer = ci.getDeviceMime();
  while (enumer.hasMoreElements()) {      
      mimeType= (String) enumer.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

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.