Package org.jdom.output

Examples of org.jdom.output.XMLOutputter.output()


     
     
      FitsOutput fitsOut = fits.examine(input);
     
    XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat());
    serializer.output(fitsOut.getFitsXml(), System.out);
   
    TextMD textmd = (TextMD)fitsOut.getStandardXmlContent();
    textmd.setRoot(true);
   
    XMLOutputFactory xmlof = XMLOutputFactory.newInstance();
View Full Code Here


      }
      //else output FITS XML to -o
      else {
        Document doc = result.getFitsXml();
        XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat());
        serializer.output(doc, out);
      }
   
    }
    finally {
      if(out != null) {
View Full Code Here

    //add the normal fits xml output
    result.addStandardCombinedFormat();
   
    //output the merged JDOM Document
    XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat());
    serializer.output(result.getFitsXml(), out);

  }
 
  public static void outputStandardSchemaXml(FitsOutput fitsOutput, OutputStream out) throws XMLStreamException, IOException {
    XmlContent xml = fitsOutput.getStandardXmlContent();
View Full Code Here

       try {
         Fits fits = new Fits(configDirPath);
         FitsOutput result = fits.examine(file);
         Document doc = result.getFitsXml();
         XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat());
         serializer.output(doc, out);
       }
       catch(FitsException e) {
         e.printStackTrace();
       }
       finally {
View Full Code Here

        continue;
      }
      StringWriter sw = new StringWriter();
     
      FitsOutput fitsOut = fits.examine(inputFile);
      serializer.output(fitsOut.getFitsXml(), sw);
      String actualStr = sw.toString();
     
      File outputFile = new File(outputDir + File.separator + inputFile.getName()+".xml");
      if(!outputFile.exists()) {
        System.err.println("Not Found: "+outputFile.getPath());
View Full Code Here

        System.err.println("Not Found: "+outputFile.getPath());
        continue;
      }
      Document expectedXml = builder.build(new FileInputStream(outputFile));
      sw = new StringWriter();
      serializer.output(expectedXml, sw);
      String expectedStr = sw.toString();
     
      //get the file name in case of a failure
      FitsMetadataElement item = fitsOut.getMetadataElement("filename");
        DifferenceListener myDifferenceListener = new IgnoreAttributeValuesDifferenceListener();
View Full Code Here

  }
 
  public void saveToDisk(String location) throws IOException {
    XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat());
    OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(location),"UTF-8");
    serializer.output(fitsXml, out);
    out.close();
  }
 
  public void output(OutputStream outstream) throws IOException {
    XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat());
View Full Code Here

  }
 
  public void output(OutputStream outstream) throws IOException {
    XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat());
    OutputStreamWriter out = new OutputStreamWriter(outstream,"UTF-8");
    serializer.output(fitsXml, out);
    out.close();
  }
 
    public Boolean checkWellFormed() {
    FitsMetadataElement wellFormed = getMetadataElement("well-formed")
View Full Code Here

     
     
      FitsOutput fitsOut = fits.examine(input);
     
    XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat());
    serializer.output(fitsOut.getFitsXml(), System.out);
   
    XmlContent xml = fitsOut.getStandardXmlContent();
   
    if(xml != null) {
      xml.setRoot(true);
View Full Code Here

      }
     
      FitsOutput fitsOut = fits.examine(input);
     
    XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat());
    serializer.output(fitsOut.getFitsXml(), System.out);
   
    Mix mix = (Mix)fitsOut.getStandardXmlContent();
    mix.setRoot(true);
       
    XMLOutputFactory xmlof = XMLOutputFactory.newInstance();
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.