Examples of WriterConfig


Examples of com.ctc.wstx.api.WriterConfig

    {
        /* Need to ensure that the configuration object is not shared
         * any more; otherwise later changes via factory could be
         * visible half-way through output...
         */
        WriterConfig cfg = mConfig.createNonShared();
        XmlWriter xw;

        boolean autoCloseOutput = requireAutoClose || mConfig.willAutoCloseOutput();

        if (w == null) {
View Full Code Here

Examples of com.toc.logging.config.WriterConfig

    try {
      // If the writers map is null, initial the writers map.
      if(writers == null) {
        writers = new HashMap<String,WriterConfig>();
      }
      writers.put(name, new WriterConfig(domain, target, output, pattern,
          datePattern, filePath, logPath, fileName,
          maxFileSize, separateFrequency, stream, enabled, wellFormat));
    } catch(Exception e) {
      throw ExceptionHelper.parse(e);
    }   
View Full Code Here

Examples of com.toc.logging.config.WriterConfig

   * Constrain a new Log object without configuration object.
   * @throws GenericException Throw the GenericException, refer to com.toc.lib.exception.GenericException.
   */
  public Log() throws GenericException {
    try {
      defaultWriter = new ConsoleWriter(new WriterConfig());
      writers = new ArrayList<Writer>();
      config = new Configuration();
      loadConfig(config);
    } catch(Exception e) {
      e.printStackTrace();
View Full Code Here

Examples of com.toc.logging.config.WriterConfig

   * @param config {@link com.toc.logging.Configuration}
   * @throws GenericException Throw the GenericException, refer to com.toc.lib.exception.GenericException.
   */
  public Log(Configuration config) throws GenericException {
    try {
      defaultWriter = new ConsoleWriter(new WriterConfig());
      writers = new ArrayList<Writer>();
      loadConfig(config);
   } catch(Exception e) {
     e.printStackTrace();
    }
View Full Code Here

Examples of com.toc.logging.config.WriterConfig

      this.config = config;
      this.enabled = config.isEnabled();
      writers.clear();
      if(config.getWriters() != null && config.getWriters().size() > 0) {
        for(Iterator<WriterConfig> it = config.getWriters().values().iterator(); it.hasNext();) {
          WriterConfig writerConfig = it.next();
          writers.addAll(WriterFactory.create(writerConfig));
        }
      } else {
        //If no writer is defined in the configuration object, use default writer.
        writers.add(defaultWriter);
View Full Code Here

Examples of org.openrdf.rio.WriterConfig

   
    private WriterConfig config;
   
    public SPARQLResultsHTMLWriter(OutputStream out) {
        this.out = out;
        this.config = new WriterConfig();
    }
View Full Code Here

Examples of org.openrdf.rio.WriterConfig

                + "@prefix dc:    <http://purl.org/dc/elements/1.1/> ."
                + " :G { "
                + "  <http://www.example.com/archive/100/v1> dc:isVersionOf <http://www.example.com/resource/100>    .        }";
        Model parse = Rio.parse(new StringReader(input), "", RDFFormat.TRIG);

        WriterConfig config = new WriterConfig();
        config.set(JSONLDSettings.JSONLD_MODE, JSONLDMode.COMPACT);

        StringWriter output = new StringWriter();
        Rio.write(parse, output, RDFFormat.JSONLD, config);

        System.out.println(output);
View Full Code Here

Examples of org.openrdf.rio.WriterConfig

        final Statement st5 = vf.createStatement(uri1, uri2, litWithSingleQuotes);
        final Statement st6 = vf.createStatement(uri1, uri2, litWithDoubleQuotes);

        final ByteArrayOutputStream out = new ByteArrayOutputStream();
        final RDFWriter rdfWriter = rdfWriterFactory.getWriter(out);
        final WriterConfig writerConfig = rdfWriter.getWriterConfig();
        writerConfig.set(BasicWriterSettings.RDF_LANGSTRING_TO_LANG_LITERAL, true);
        writerConfig.set(BasicWriterSettings.XSD_STRING_TO_PLAIN_LITERAL, true);
        rdfWriter.handleNamespace("ex", ex);
        rdfWriter.startRDF();
        rdfWriter.handleStatement(st1);
        rdfWriter.handleStatement(st2);
        rdfWriter.handleStatement(st3);
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.