Examples of format()


Examples of com.hp.hpl.jena.sparql.resultset.TSVOutput.format()

     */
   
    static public void outputAsTSV(OutputStream outStream, boolean booleanResult)
    {
        TSVOutput fmt = new TSVOutput() ;
        fmt.format(outStream, booleanResult) ;
    }

    /** Output a result set in TSV format
     *  @param resultSet     result set
     */
 
View Full Code Here

Examples of com.hp.hpl.jena.sparql.resultset.TextOutput.format()

     * @param pmap      Prefix mapping for abbreviating URIs.
     */
    public static void out(OutputStream out, ResultSet qresults, PrefixMapping pmap)
    {
        TextOutput tFmt = new TextOutput(pmap) ;
        tFmt.format(out, qresults) ;
    }

    /**
     * Output a result set in a text format.  The result set is consumed.
     * Use @see{ResultSetFactory.makeRewindable(ResultSet)} for a rewindable one.
View Full Code Here

Examples of com.hp.hpl.jena.sparql.resultset.XMLOutput.format()

     */
   
    static public void outputAsXML(OutputStream outStream, ResultSet qresults, String stylesheet)
    {
        XMLOutput xOut = new XMLOutput(stylesheet) ;
        xOut.format(outStream, qresults) ;
    }
   
    // ----  XML output: ASK
   
    /** Output a boolean result in the XML format
View Full Code Here

Examples of com.hp.hpl.jena.sparql.serializer.FmtExpr.format()

    }
   
    public static void fmtSPARQL(IndentedWriter iOut, Expr expr, SerializationContext sCxt)
    {
        FmtExpr v = new FmtExpr(iOut, sCxt) ;
        v.format(expr) ;
    }
   
    public static void fmtSPARQL(IndentedWriter iOut, Expr expr)
    {
        fmtSPARQL(iOut, expr, FmtUtils.sCxt()) ;
View Full Code Here

Examples of com.hp.hpl.jena.sparql.serializer.FmtExprSPARQL.format()

    }
   
    public static void fmtSPARQL(IndentedWriter iOut, Expr expr, SerializationContext sCxt)
    {
        FmtExprSPARQL v = new FmtExprSPARQL(iOut, sCxt) ;
        v.format(expr) ;
    }
   
    public static void fmtSPARQL(IndentedWriter iOut, Expr expr)
    {
        fmtSPARQL(iOut, expr, FmtUtils.sCxt()) ;
View Full Code Here

Examples of com.ibm.icu.impl.duration.PeriodFormatter.format()

  public void testOmitZeros() {
    // zeros are treated as omitted

    PeriodFormatter pf = pff.getFormatter();
    Period p = Period.at(1, MINUTE).and(0, SECOND).and(1, MILLISECOND);
    String s1 = pf.format(p);
    p.omit(SECOND);
    String s2 = pf.format(p);
    assertEquals(null, s1, s2);
  }
}
View Full Code Here

Examples of com.ibm.icu.text.ChineseDateFormat.format()

            Calendar xcal = new GregorianCalendar();
            xcal.set(Calendar.HOUR_OF_DAY, 0);
            DateFormat fmt = new SimpleDateFormat("k");
            StringBuffer xbuf = new StringBuffer();
            FieldPosition fpos = new FieldPosition(Calendar.HOUR_OF_DAY);
            fmt.format(xcal, xbuf, fpos);
            try {
                fmt.parse(xbuf.toString());
                logln("ok");
               
                xbuf.setLength(0);
View Full Code Here

Examples of com.ibm.icu.text.DateFormat.format()

        diffSet.clear();
        if (!toSet.matches(toCalendar, diffSet)) {
            String diffs = diffSet.diffFrom(toSet);
            errln((String)"FAIL: "+thisString+", Differences: "+ diffs);
            DateFormat fmt = new SimpleDateFormat(new String("EEE MMM dd yyyy G"));
            String fromString = fmt.format(fromTime);
            logln("Source Time: "+fromString+", Source Calendar: "
                    +fromCalendar.getType());
        } else {
            logln("PASS: "+thisString+" match.");
        }
View Full Code Here

Examples of com.ibm.icu.text.DateIntervalFormat.format()

                                                  date_2.getTime());
            String oneSkeleton = data[i++];
            DateIntervalFormat dtitvfmt = DateIntervalFormat.getInstance(
                                              oneSkeleton, loc);
            String expected = data[i++];
            String formatted = dtitvfmt.format(dtitv);
            if ( !formatted.equals(Utility.unescape(expected)) )  {
                errln("\"" + locName + "\\" + oneSkeleton + "\\" + datestr + "\\" + datestr_2 + "\"\t expected: " + expected +"\tgot: " + formatted + "\n");
            }
        }
    }
View Full Code Here

Examples of com.ibm.icu.text.DecimalFormat.format()

        String pat = ",##0.0000";
        DecimalFormat dec = new DecimalFormat(pat);
        dec.setRoundingMode(BigDecimal.ROUND_HALF_UP);
        double roundinginc = 0.0001;
        dec.setRoundingIncrement(roundinginc);
        String str = dec.format(number);
        if (!str.equals(expected)) {
            errln("Fail: " + number + " x \"" + pat + "\" = \"" +
                  str + "\", expected \"" + expected + "\"");
        }  
View Full Code Here
TOP
Copyright © 2015 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.