Examples of format()


Examples of org.jzkit.search.util.QueryFormatter.QueryFormatter.format()

  public IRResultSet evaluate(IRQuery q, Object user_info, Observer[] observers) {
    SOLRResultSet result = null;
    try {
      log.debug("Casting internal query tree using "+query_formatter);
      QueryFormatter formatter = (QueryFormatter) ctx.getBean(query_formatter);
      String query = formatter.format(q.getQueryModel().toInternalQueryModel(ctx));
      result = new SOLRResultSet(observers, base_url, query, code,field_lists, q);
      result.countHits();
      result.setStatus(IRResultSetStatus.COMPLETE);
    }
    catch ( Exception e ) {
View Full Code Here

Examples of org.kapott.hbci.manager.ChallengeInfo.Param.format()

   
    version = getHhdVersion(code,ChallengeInfo.VERSION_HHD_1_2);
    p = version.getParams().get(1);
    Assert.assertEquals(p.getPath(),"BTG.value");
    Assert.assertEquals(p.getType(),"Wrt");
    Assert.assertEquals(p.format("100"),"100,");
    Assert.assertEquals(p.format("100.50"),"100,5");
    Assert.assertEquals(p.format("100.99"),"100,99");
    Assert.assertNull(p.format(null));
   
    version = getHhdVersion(code,ChallengeInfo.VERSION_HHD_1_3);
View Full Code Here

Examples of org.lilyproject.indexer.model.indexerconf.Formatter.format()

            return extractContent(table, indexValues, repository);
        }

        Formatter formatter = conf.getFormatters().getFormatter(valueDef.getFormatter());

        return formatter.format(indexValues, repository);
    }

    /**
     * Direct 'evaluation' (content extraction, formatting) of a given field
     * from a record. Should only be called if the field is present in the
View Full Code Here

Examples of org.lilyproject.indexer.model.indexerconf.NameTemplate.format()

public class NameTemplateTest {

    @Test
    public void testLiteral() throws Exception {
        NameTemplate template = new NameTemplateParser().parse("foobar", defaultValidator());
        assertEquals("foobar", template.format(getResolver()));
    }

    @Test
    public void testVar() throws Exception {
        NameTemplate template = new NameTemplateParser().parse("${var1}", defaultValidator());
View Full Code Here

Examples of org.mindswap.pellet.jena.NodeFormatter.format()

      for( int i = 0; i < resultVars.size(); i++ ) {
        String var = (String) resultVars.get( i );
        RDFNode result = binding.get( var );

        // format the result
        formattedBinding.add( formatter.format( result ) );
      }

      if( data.add( formattedBinding ) )
        count++;
    }
View Full Code Here

Examples of org.mindswap.pellet.utils.Timer.format()

 
 
  protected void finishTask(String task) {
    Timer timer = timers.getTimer( task );
    timer.stop();
    verbose( "Finished " + task + " in " + timer.format() );
  }
}
View Full Code Here

Examples of org.ocpsoft.pretty.time.PrettyTime.format()

      DateTime time = new DateTime();
      int secondsRemain = 60 - time.getSecondOfMinute();
      DateTime deniedTime = time.plusSeconds(secondsRemain);
      PrettyTime prettyTime = new PrettyTime();
      prettyTime.setUnits(new Second(prettyTime.getLocale()));
      return prettyTime.format(deniedTime.toDate());
   }

   public String getSecondsUntilDenied()
   {
      DateTime time = new DateTime();
View Full Code Here

Examples of org.ocpsoft.prettytime.PrettyTime.format()

     *
     * @return
     */
    public static final String prettyTime(Date date) {
        PrettyTime p = new PrettyTime();
        return p.format(date);

    }

    public static final String prettyTime(long millisecond) {
        PrettyTime p = new PrettyTime();
View Full Code Here

Examples of org.olap4j.layout.RectangularCellSetFormatter.format()

        RectangularCellSetFormatter formatter =
            new RectangularCellSetFormatter(false);

        // Print out.
        PrintWriter writer = new PrintWriter(System.out);
        formatter.format(cellSet, writer);
        writer.flush();

        statement.close();
        connection.close();
    }
View Full Code Here

Examples of org.openjena.riot.out.NodeFormatterTTL.format()

                   
                    Node n = b.get(v) ;
                    if ( n != null )
                    {
                        // This will not include a raw tab.
                        formatter.format(w, n);
                    }
                }
                w.write(NL) ;
            }
           
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.