Examples of format()


Examples of org.apache.wss4j.dom.util.XmlSchemaDateFormat.format()

        }
       
        // Test for replay attacks
        Date created = timeStamp.getCreated();
        DateFormat zulu = new XmlSchemaDateFormat();
        String identifier = zulu.format(created) + "" + Arrays.hashCode(signatureValue);

        if (replayCache.contains(identifier)) {
            throw new WSSecurityException(
                WSSecurityException.ErrorCode.INVALID_SECURITY,
                "invalidTimestamp",
View Full Code Here

Examples of org.archive.wayback.util.StringFormatter.format()

    // if there's no activeYear, something is quite wrong...
    // TODO: check anyways:
    if (activeYear == null) {
      activeYear = years.get(years.size() - 1);
    }
    String yearStr = fmt.format("{0,date,yyyy}",activeYear.getStart());
    yearNum = Integer.parseInt(yearStr);

    // now unroll the months in the active year into day-sized partitions:
    List<Partition<CaptureSearchResult>> days =
      capturePartitioner.getRange(daySize,
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.format()

    newOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_ARRAY_INITIALIZER, JavaCore.INSERT);
    newOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_BRACE_IN_ARRAY_INITIALIZER, JavaCore.INSERT);
    newOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_BRACE_IN_ARRAY_INITIALIZER, JavaCore.INSERT);
   
    DefaultCodeFormatter defaultCodeFormatter = new DefaultCodeFormatter(newOptions);
    TextEdit textEdit = defaultCodeFormatter.format(org.aspectj.org.eclipse.jdt.core.formatter.CodeFormatter.K_UNKNOWN, string, 0, string.length(), indentLevel, lineSeparator);
    if (positions != null && textEdit != null) {
      // update positions
      TextEdit[] edits = textEdit.getChildren();
      int textEditSize = edits.length;
      int editsIndex = 0;
View Full Code Here

Examples of org.auraframework.util.json.JsonSerializationContext.format()

        ClientSideEventException e = (ClientSideEventException) value;
        JsonSerializationContext jsonCxt = Aura.getContextService().getCurrentContext().getJsonSerializationContext();
        Map<String, Object> serialized = Maps.newHashMap();
        serialized.put("exceptionEvent", Boolean.TRUE);
        serialized.put("event", e.getEvent());
        if (jsonCxt != null && jsonCxt.format()) {
            serialized.put("defaultHandler", e.getDefaultHandler());
        } else {
            serialized.put("defaultHandler", e.getDefaultHandler() == null ? null : e.getDefaultHandler().toString());
        }
        Json.serialize(serialized, out, jsonCxt);
View Full Code Here

Examples of org.broadinstitute.gatk.utils.sam.GATKSAMRecord.format()

        GATKSAMRecord clippedRead = clipper.clipRead(clippingRepresentation);
        if (outputBam != null) {
            outputBam.addAlignment(clippedRead);
        } else {
            out.println(clippedRead.format());
        }

        data.nTotalReads++;
        data.nTotalBases += clipper.getRead().getReadLength();
        if (clipper.wasClipped()) {
View Full Code Here

Examples of org.cafesip.sipunit.PresenceSubscriber.format()

        assertEquals(0, getAlicePhone().getRetiredBuddies().size());
        assertEquals(getBobUri(), s.getTargetUri());
        assertNotNull(getAlicePhone().getBuddyInfo(getBobUri())); // call anytime to get
        // Subscription           
        assertEquals(SipResponse.OK, s.getReturnCode());
        assertTrue(s.format(), s.processResponse(1000));

        // check the response processing results
        assertTrue(s.isSubscriptionActive());
       
        assertTrue(s.getTimeLeft() <= 60);
View Full Code Here

Examples of org.cafesip.sipunit.SipCall.format()

    // to follow what a test is doing since the Sip operations are not
    // buried as parameters in assert statements:

    b.sendIncomingCallResponse(Response.OK, "Answer - Hello world", 0);
    assertLastOperationSuccess("Sending answer response failed - "
        + b.format(), b);

    // note with the single step method, you cannot include operation
    // error details for when the test fails: ' + a.format()' wouldn't
    // work in the first parameter here:
View Full Code Here

Examples of org.cfeclipse.cfml.editors.formatters.CFMLFormattingStrategy.format()

      private void format(final SourceViewer sourceViewer, final IPreferenceStore store) {
        String contents= loadPreviewContentFromFile("FormatPreviewCode.txt");
        FormattingPreferences prefs= new FormattingPreferences();
        prefs.setPreferenceStore(store);
        CFMLFormattingStrategy formatter = new CFMLFormattingStrategy();
        contents = formatter.format(contents, prefs, "", false);
        viewer.getDocument().set(contents);
      }
    };
    viewer.getTextWidget().addDisposeListener(new DisposeListener() {
      /*
 
View Full Code Here

Examples of org.clapper.util.text.Duration.format()

    private void formatOne(long ms, String expected) throws Exception
    {
        Duration d = new Duration(ms);
        assertEquals("Format of " + expected + " did not produce expected " +
                     "result.", expected, d.format());
    }
}
View Full Code Here

Examples of org.criticalfailure.torchlight.core.domain.formatter.IObjectPropertyFormatter.format()

        if(formatterType != null) {
            IObjectPropertyFormatter formatter = objectPropertyFormatterListener.getFormatter(formatterType);
            logger.trace("formatter: " + formatter);

            if(formatter != null) {
                formattedString = formatter.format(property, datum);
                logger.trace("formattedString: " + formattedString);
            }
        }

        return formattedString;
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.