Package java.text

Examples of java.text.DateFormat$DateFormatGetter


    FCAGraph graphR  = store.getGraphOverTime(Collections.singleton(source)).getGraph(dateFormat.parse("20060913"));
    JenaUtil.getModelFromGraph(graphR).write(System.out);
  }
 
  public void testPartialFGNodeRevoke2() throws Exception {
    DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
    ToyClock clock = new ToyClock();
    Store store = getStoreImpl(clock);
    Model model1 = modelWithStatements("_a dc:subject 'sub1'; _a dc:subject 'hello'; _a http://xmlns.com/foaf/0.1/mbox_sha1sum '49f9f8e38c3144e19e09c3e5fa10170242d1360f'");
    Model model1b = modelWithStatements("_a http://xmlns.com/foaf/0.1/mbox \"foo\"; _a http://xmlns.com/foaf/0.1/mbox_sha1sum '49f9f8e38c3144e19e09c3e5fa10170242d1360f'");
    Model model2 = modelWithStatements("_a dc:subject 'hello'; _a http://xmlns.com/foaf/0.1/mbox_sha1sum '49f9f8e38c3144e19e09c3e5fa10170242d1360f'");

    Date date1 = dateFormat.parse("20050607");
    Date date1b = dateFormat.parse("20050608");
    Date date2 = dateFormat.parse("20060912");
    FCAGraph graph1 = new FCAGraphImpl(model1);
    FCAGraph graph1b = new FCAGraphImpl(model1b);
    FCAGraph graph2 = new FCAGraphImpl(model2);
    Source source = new SourceImpl("http://example.org/graph-source");
    clock.setTime(date1);
    store.updateGraph(source, graph1);
    clock.setTime(date1b);
    store.assertGraph(source, graph1b);
    store = reGetStoreImpl();
    clock.setTime(date2);
    store.revokeGraph(source, graph2);
    FCAGraph graphR  = store.getGraphOverTime(Collections.singleton(source)).getGraph(dateFormat.parse("20060913"));
    //no exception retrieving graph containing fg-node that doesn't exist the same way as wehn stuff was added
    assertTrue(true);
    JenaUtil.getModelFromGraph(graphR).write(System.out);
  }
View Full Code Here


    assertTrue(true);
    JenaUtil.getModelFromGraph(graphR).write(System.out);
  }
 
  public void testTransactions1() throws Exception {
    DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
    ToyClock clock = new ToyClock();
    Store store = getStoreImpl(clock);
    Model model = modelWithStatements("_a dc:subject 'sub1'; _a dc:subject 'hello'; _a http://xmlns.com/foaf/0.1/knows http://example.org/");
    Source source = new SourceImpl("http://example.org/graph-source");
    Date date1 = dateFormat.parse("20050607");
    Date date2 = dateFormat.parse("20050608");
    Date date3 = dateFormat.parse("20060912");
    clock.setTime(date1);
    store.assertGraph(source, new FCAGraphImpl(model));
    clock.setTime(date2);
    store.perform(source, new StoreTransaction() {
View Full Code Here

    Graph retrieved = store.getGraphOverTime(Collections.singleton(source)).getGraph(date3);
    assertEquals(0, retrieved.size());
  }
 
  public void testTransactions2() throws Exception {
    DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
    ToyClock clock = new ToyClock();
    Store store = getStoreImpl(clock);
    Model model1 = modelWithStatements("_a dc:subject 'sub1'; _a dc:subject 'hello'; _a http://xmlns.com/foaf/0.1/knows http://example.org/");
    Model model2 = modelWithStatements("_b dc:subject 'sub2'; _b dc:subject 'hello'; _b http://xmlns.com/foaf/0.1/knows http://example.org/");
    final FCAGraph graph2 = new FCAGraphImpl(model2);
    Source source = new SourceImpl("http://example.org/graph-source");
    Date date1 = dateFormat.parse("20050607");
    Date date2 = dateFormat.parse("20050608");
    Date date3 = dateFormat.parse("20060912");
    clock.setTime(date1);
    store.assertGraph(source, new FCAGraphImpl(model1));
    store.assertGraph(source, graph2);
    clock.setTime(date2);
    store.perform(source, new StoreTransaction() {
View Full Code Here

    Graph retrieved = store.getGraphOverTime(Collections.singleton(source)).getGraph(date3);
    assertEquals(graph2, retrieved);
  }
 
  public void testTransactions3() throws Exception {
    DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
    ToyClock clock = new ToyClock();
    Store store = getStoreImpl(clock);
    Model model1 = modelWithStatements("_a dc:subject 'sub1'; _a dc:subject 'hello'; _a http://xmlns.com/foaf/0.1/knows http://example.org/; _c dc:subject 'foo'");
    final FCAGraph graph1 = new FCAGraphImpl(model1);
    Model model2 = modelWithStatements("_b dc:subject 'sub2'; _b dc:subject 'hello'; _b http://xmlns.com/foaf/0.1/knows http://example.org/");
    final FCAGraph graph2 = new FCAGraphImpl(model2);
    Source source = new SourceImpl("http://example.org/graph-source");
    Date date1 = dateFormat.parse("20050607");
    Date date2 = dateFormat.parse("20050608");
    Date date3 = dateFormat.parse("20060912");
    clock.setTime(date1);
    store.assertGraph(source, graph1);
    store.assertGraph(source, graph1);
    store.assertGraph(source, graph2);
    clock.setTime(date2);
View Full Code Here

    if (tStartTime != null) {
      Calendar calendarStart = Calendar.getInstance();
      calendarStart.setTime(tStartTime);
      startHrs = calendarStart.get(Calendar.HOUR_OF_DAY);
      startMins = calendarStart.get(Calendar.MINUTE);
      DateFormat df= new SimpleDateFormat("h:mm a");
      form.set("detailStartTime",(df.format(tStartTime)).toString());
    }
   
    if (tEndTime != null) {
      Calendar calendarEnd = Calendar.getInstance();
      calendarEnd.setTime(tEndTime);
      endHrs = calendarEnd.get(Calendar.HOUR_OF_DAY);
      endMins = calendarEnd.get(Calendar.MINUTE);
      DateFormat df= new SimpleDateFormat("h:mm a");
      form.set("detailEndTime",( df.format(tEndTime)).toString());
    }
    return form;
  }
View Full Code Here

            CvFileVO flvo = new CvFileVO();
            flvo.setTitle(strf); //file name

            Calendar c = Calendar.getInstance();
            java.util.Date dt = c.getTime();
            DateFormat df = new SimpleDateFormat("MM_dd_yyyy_hh_mm_ss");
            String dateStamp = df.format(dt);

            strf = "attachment_" + dateStamp +"_"+ strf;
            flvo.setName(strf);
            flvo.setCreatedBy(userid);
            flvo.setOwner(userid);
View Full Code Here

        CvFileVO flvo = new CvFileVO();
        flvo.setTitle(strf); //file name

    Calendar c = Calendar.getInstance();
    java.util.Date dt = c.getTime();
    DateFormat df = new SimpleDateFormat("MM_dd_yyyy_hh_mm_ss");
    String dateStamp = df.format(dt);

    strf = "attachment_" + dateStamp +"_"+ strf;
        flvo.setName(strf);
        flvo.setCreatedBy(userid);
        flvo.setOwner(userid);
View Full Code Here

      {
        setCreated(ivo.getFirstName()+" " + ivo.getLastName());
        String createdbyname = ivo.getFirstName()+" " + ivo.getLastName();
        arg1.setAttribute("createdbyname", createdbyname);

        DateFormat df = new SimpleDateFormat("dd/MM/yyyy - h:mm a") ;
        String createdon= df.format(oldTaskVO.getCreatedOn());
        arg1.setAttribute("createdon" , createdon);
        arg1.setAttribute("createdby" ,""+oldTaskVO.getCreatedBy());
      }




      ivo = oldTaskVO.getModifiedByVO();
      if (ivo != null)
      {
        setModified(ivo.getFirstName()+" " + ivo.getLastName());
        String modifiedbyname = ivo.getFirstName()+" " + ivo.getLastName();
        arg1.setAttribute("modifiedbyname", modifiedbyname);

        DateFormat df = new SimpleDateFormat("dd/MM/yyyy - h:mm a") ;
        String modified= "";
        if(oldTaskVO.getModifiedOn() != null)
         modified= df.format(oldTaskVO.getModifiedOn());

        arg1.setAttribute("modifiedon" , modified);
        arg1.setAttribute("modifiedby" , ""+oldTaskVO.getModifiedBy());
      }
View Full Code Here

        if (workIndividual != null) {
          taskForm.setModified(workIndividual.getFirstName() + " " + workIndividual.getLastName());
        }

        // TODO l10n date.
        DateFormat df = new SimpleDateFormat("dd/MM/yyyy - h:mm a");
        if (taskVO.getModifiedOn() != null) {
          String createdon = df.format(taskVO.getCreatedOn());
          taskForm.setCreatedOn(createdon);
        }
        if (taskVO.getModifiedOn() != null) {
          taskForm.setModifiedOn(df.format(taskVO.getModifiedOn()));
        }

        if (taskVO.getModifiedBy() != 0) {
          taskForm.setModifiedbyid(String.valueOf(taskVO.getModifiedBy()));
        }
View Full Code Here

        calendarStart.setTime(tStartTime);

        startHrs = calendarStart.get(Calendar.HOUR_OF_DAY);
        startMins = calendarStart.get(Calendar.MINUTE);

        DateFormat df = new SimpleDateFormat("h:mm a");

        dynaForm.setStartTime((df.format(timeSlipVO.getStart())).toString());
      }

      if (timeSlipVO.getEnd() != null)
      {
        tEndTime = (Time) timeSlipVO.getEnd();

        Calendar calendarEnd = Calendar.getInstance();
        calendarEnd.setTime(tEndTime);

        endHrs = calendarEnd.get(Calendar.HOUR_OF_DAY);
        endMins = calendarEnd.get(Calendar.MINUTE);

        DateFormat df = new SimpleDateFormat("h:mm a");

        dynaForm.setEndTime((df.format(timeSlipVO.getEnd())).toString());
      }

      if (timeSlipVO.getBreakTime() != -1)
      {
        Float BreakTime = new Float(timeSlipVO.getBreakTime());
View Full Code Here

TOP

Related Classes of java.text.DateFormat$DateFormatGetter

Copyright © 2018 www.massapicom. 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.