Examples of IndentedWriter


Examples of org.apache.jena.atlas.io.IndentedWriter

        query.addResultVar(varTitle) ;
       
        // Print query with line numbers
        // Prefix mapping just helps serialization
        query.getPrefixMapping().setNsPrefix("dc" , DC.getURI()) ;
        query.serialize(new IndentedWriter(System.out,true)) ;
        System.out.println() ;
       
        QueryExecution qexec = QueryExecutionFactory.create(query, model) ;

        try {
View Full Code Here

Examples of org.apache.jena.atlas.io.IndentedWriter

        String queryString = prolog + NL +
            "SELECT ?title WHERE {?x dc:title ?title}" ;
       
        Query query = QueryFactory.create(queryString) ;
        // Print with line numbers
        query.serialize(new IndentedWriter(System.out,true)) ;
        System.out.println() ;
       
        // Create a single execution of this query, apply to a model
        // which is wrapped up as a Dataset
       
View Full Code Here

Examples of org.apache.jena.atlas.io.IndentedWriter

     * @param syntax  Syntax URI
     */
   
    static public void serialize(Query query, OutputStream out, Syntax syntax)
    {
        IndentedWriter writer = new IndentedWriter(out) ;
        serialize(query, writer, syntax) ;
        writer.flush() ;
        try { out.flush() ; } catch (Exception ex) { }
    }
View Full Code Here

Examples of org.apache.jena.atlas.io.IndentedWriter

    QuerySerializer(OutputStream        _out,
                    FormatterElement    formatterElement,
                    FmtExprSPARQL       formatterExpr,
                    FormatterTemplate   formatterTemplate)
    {
        this(new IndentedWriter(_out),
             formatterElement, formatterExpr, formatterTemplate) ;
    }
View Full Code Here

Examples of org.metawidget.statically.StaticUtils.IndentedWriter

         HtmlTag listItem = new HtmlTag("li");
         listItem.getChildren().add(outcomeTargetLink);
         unorderedList.getChildren().add(listItem);
      }

      Writer writer = new IndentedWriter(new StringWriter(), this.navigationTemplateIndent);
      unorderedList.write(writer);

      Map<Object, Object> context = CollectionUtils.newHashMap();
      context.put("appName", StringUtils.uncamelCase(this.project.getProjectRoot().getName()));
      context.put("navigation", writer.toString().trim());
      context.put("targetDir", targetDir);

      if (this.navigationTemplate == null)
      {
         loadTemplates();
View Full Code Here

Examples of org.metawidget.statically.StaticUtils.IndentedWriter

         HtmlTag listItem = new HtmlTag("li");
         listItem.getChildren().add(outcomeTargetLink);
         unorderedList.getChildren().add(listItem);
      }

      Writer writer = new IndentedWriter(new StringWriter(), this.navigationTemplateIndent);
      unorderedList.write(writer);

      Map<Object, Object> context = CollectionUtils.newHashMap();
      context.put("appName", StringUtils.uncamelCase(this.project.getRoot().getName()));
      context.put("navigation", writer.toString().trim());
      context.put("targetDir", targetDir);

      if (this.navigationTemplate == null)
      {
         loadTemplates();
      }

      try
      {
         return ScaffoldUtil.createOrOverwrite((FileResource<?>) getTemplateStrategy()
                  .getDefaultTemplate(),
                  this.templateProcessor.processTemplate(context, navigationTemplate));
      }
      finally
      {
         writer.close();
      }
   }
View Full Code Here

Examples of org.metawidget.statically.StaticUtils.IndentedWriter

         HtmlTag listItem = new HtmlTag("li");
         listItem.getChildren().add(outcomeTargetLink);
         unorderedList.getChildren().add(listItem);
      }

      Writer writer = new IndentedWriter(new StringWriter(), this.navigationTemplateIndent);
      unorderedList.write(writer);

      Map<Object, Object> context = CollectionUtils.newHashMap();
      context.put("appName", StringUtils.uncamelCase(this.project.getProjectRoot().getName()));
      context.put("navigation", writer.toString().trim());
      context.put("targetDir", targetDir);

      if (this.navigationTemplate == null)
      {
         loadTemplates();
      }

      try
      {
         return ScaffoldUtil.createOrOverwrite(this.prompt, (FileResource<?>) getTemplateStrategy()
                  .getDefaultTemplate(),
                  this.navigationTemplate.render(context),
                  overwrite);
      }
      finally
      {
         writer.close();
      }
   }
View Full Code Here

Examples of org.metawidget.statically.StaticUtils.IndentedWriter

         HtmlTag listItem = new HtmlTag("li");
         listItem.getChildren().add(outcomeTargetLink);
         unorderedList.getChildren().add(listItem);
      }

      Writer writer = new IndentedWriter(new StringWriter(), this.navigationTemplateIndent);
      unorderedList.write(writer);
      Map<Object, Object> context = CollectionUtils.newHashMap();
      context.put("navigation", writer.toString().trim());

      if (this.navigationTemplate == null)
      {
         loadTemplates();
      }
View Full Code Here

Examples of org.metawidget.statically.StaticUtils.IndentedWriter

         HtmlTag listItem = new HtmlTag("li");
         listItem.getChildren().add(outcomeTargetLink);
         unorderedList.getChildren().add(listItem);
      }

      Writer writer = new IndentedWriter(new StringWriter(), this.navigationTemplateIndent);
      unorderedList.write(writer);

      Map<Object, Object> context = CollectionUtils.newHashMap();
      context.put("appName", StringUtils.uncamelCase(this.origin.getRootDirectory().getName()));
      context.put("navigation", writer.toString().trim());
      context.put("targetDir", targetDir);

      if (this.navigationTemplate == null)
      {
         loadTemplates();
      }

      try
      {
         return ScaffoldUtil.createOrOverwrite((FileResource<?>) getTemplateStrategy()
                  .getDefaultTemplate(),
                  this.templateProcessor.processTemplate(context, navigationTemplate),
                  true);
      }
      finally
      {
         writer.close();
      }
   }
View Full Code Here

Examples of org.openjena.atlas.io.IndentedWriter

        String queryString = prolog + NL +
            "SELECT ?title WHERE {?x dc:title ?title}" ;
       
        Query query = QueryFactory.create(queryString) ;
        // Print with line numbers
        query.serialize(new IndentedWriter(System.out,true)) ;
        System.out.println() ;
       
        // Create a single execution of this query, apply to a model
        // which is wrapped up as a Dataset
       
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.