Package nz.govt.natlib.meta

Examples of nz.govt.natlib.meta.TransformProcessor


    // create a complete XML file, just a <File>...</File> section.
    // Different Harvester implementations may use the transformer mapping
    // to create complete XML documents; it's up to the Harvester what it
    // expects the transformation to achieve.
    LogManager.getInstance().logMessage(LogMessage.WORTHLESS_CHATTER, "Starting Transformation");
    TransformProcessor transformer = TransformProcessor.getInstance(adapter
        .getOutputType(), getOutputType());
   
    // Transform the document into the target format.
    LogManager.getInstance().logMessage(LogMessage.WORTHLESS_CHATTER, "Finished Transformation");
    transformer.transform(new ByteArrayInputStream(bout.toByteArray()),
        byteOut);
    bout.close();
  }
View Full Code Here


    endTag("Object");

    // then transform overall - if required...
    // TransformProcessor transformer =
    // TransformProcessor.getInstance("object.dtd","nlnz_presmet.xsd");
    TransformProcessor transformer = TransformProcessor.getInstance(null);
    transformer.transform(new ByteArrayInputStream(byteOut.toByteArray()),
        file);

    // closeup...
    byteOut.close();
    formatter = null;
View Full Code Here

      out = new FileOutputStream(f);

      String outDTD = config.getOutputDTD();
     
      // This loads the DoNohtingTransformer.
      TransformProcessor transformer = new DoNothingTransformer();
       
        //TransformProcessor.getInstance(
        //  inDTD, outDTD);
     

      ByteArrayOutputStream bout = new ByteArrayOutputStream(2048);
      ParserContext handler = new ParserContext();
      ParserListener listener = new DTDXmlParserListener(bout,
          outDTD == null ? null : Config.getInstance()
              .getXMLBaseURL()
              + "/" + outDTD);
      handler.addListener(listener);
      adapter.adapt(file, handler);

      transformer.transform(new ByteArrayInputStream(bout.toByteArray()),
          out);
    } finally {
      if (out != null) {
        out.close();
      }
View Full Code Here

TOP

Related Classes of nz.govt.natlib.meta.TransformProcessor

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.