Package rabbit.data.internal.xml.schema.events

Examples of rabbit.data.internal.xml.schema.events.TaskIdType


    return list;
  }

  @Override
  protected TaskFileEventType createElement() {
    TaskIdType id = new TaskIdType();
    id.setCreationDate(DatatypeUtil.toXmlDate(new LocalDate()));
    id.setHandleId("ok");

    TaskFileEventType type = new TaskFileEventType();
    type.setDuration(10);
    type.setFilePath("/project/folder/file.txt");
    type.setTaskId(id);
View Full Code Here


   t2.setFilePath(t2.getFilePath() + "1");
   assertFalse(merger.isMergeable(t1, t2));
   t2.setFilePath(t1.getFilePath());
   assertTrue(merger.isMergeable(t1, t2));
  
   TaskIdType id2 = t2.getTaskId();
   id2.getCreationDate().setYear(id2.getCreationDate().getYear() + 1);
   assertFalse(merger.isMergeable(t1, t2));
   id2.getCreationDate().setYear(t1.getTaskId().getCreationDate().getYear());
   assertTrue(merger.isMergeable(t1, t2));
  
   id2.setHandleId(id2.getHandleId() + "1");
   assertFalse(merger.isMergeable(t1, t2));
  }
View Full Code Here

    long duration2 = 2398;
    String fileId = "124";
    String handleId = "abc";
    LocalDate date = new LocalDate(1999, 1, 1);
   
    TaskIdType id1 = new TaskIdType();
    id1.setHandleId(handleId);
    id1.setCreationDate(DatatypeUtil.toXmlDate(date));
   
    TaskIdType id2 = new TaskIdType();
    id2.setHandleId(handleId);
    id2.setCreationDate(DatatypeUtil.toXmlDate(date));
   
    TaskFileEventType t1 = new TaskFileEventType();
    t1.setFilePath(fileId);
    t1.setDuration(duration1);
    t1.setTaskId(id1);
View Full Code Here

    long duration2 = 2398;
    String fileId = "124";
    String handleId = "abc";
    LocalDate date = new LocalDate(1999, 1, 1);
   
    TaskIdType id1 = new TaskIdType();
    id1.setHandleId(handleId);
    id1.setCreationDate(DatatypeUtil.toXmlDate(date));
   
    TaskIdType id2 = new TaskIdType();
    id2.setHandleId(handleId);
    id2.setCreationDate(DatatypeUtil.toXmlDate(date));
   
    TaskFileEventType t1 = new TaskFileEventType();
    t1.setFilePath(fileId);
    t1.setDuration(duration1);
    t1.setTaskId(id1);
View Full Code Here

    return new TaskFileEventTypeMerger();
  }

  @Override
  protected TaskFileEventType createTargetType() {
    TaskIdType id = new TaskIdType();
    id.setCreationDate(DatatypeUtil.toXmlDate(new LocalDate()));
    id.setHandleId("aTaskId");
   
    TaskFileEventType type = new TaskFileEventType();
    type.setDuration(129);
    type.setFilePath("helloWorld");
    type.setTaskId(id);
View Full Code Here

    return type;
  }

  @Override
  protected TaskFileEventType createTargetTypeDiff() {
    TaskIdType id = new TaskIdType();
    id.setCreationDate(DatatypeUtil.toXmlDate(new LocalDate(1999, 1, 1)));
    id.setHandleId("1.2.3.4.5.6.7");
   
    TaskFileEventType type = new TaskFileEventType();
    type.setDuration(12119);
    type.setFilePath("0.9.8.7.6.");
    type.setTaskId(id);
View Full Code Here

  @Override
  protected boolean doIsMergeable(TaskFileEventType t1, TaskFileEventType t2) {
    boolean result = false;
   
    TaskIdType id1 = t1.getTaskId();
    TaskIdType id2 = t2.getTaskId();
    if (id1 != null && id2 != null) {
     
      // Check the handle identifiers of the IDs:
      result = (id1.getHandleId() != null)
            && (id2.getHandleId() != null)
            && (id1.getHandleId().equals(id2.getHandleId()))
           
            // Check the creation dates of the IDs:
            && (id1.getCreationDate() != null)
            && (id2.getCreationDate() != null)
            && (id1.getCreationDate().equals(id2.getCreationDate()))
           
            // Check the file IDs:
            && (t1.getFilePath() != null)
            && (t2.getFilePath() != null)
            && (t1.getFilePath().equals(t2.getFilePath()));
View Full Code Here

    return result;
  }

  @Override
  protected TaskFileEventType doMerge(TaskFileEventType t1, TaskFileEventType t2) {
    TaskIdType id = new TaskIdType();
    id.setHandleId(t1.getTaskId().getHandleId());
    id.setCreationDate((XMLGregorianCalendar) t1.getTaskId().getCreationDate().clone());

    TaskFileEventType result = new TaskFileEventType();
    result.setDuration(t1.getDuration() + t2.getDuration());
    result.setFilePath(t1.getFilePath());
    result.setTaskId(id);
View Full Code Here

    final Date date = TasksContract.getCreationDate(event.getTask());

    final GregorianCalendar creationDate = new GregorianCalendar();
    creationDate.setTime(date);

    final TaskIdType id = new TaskIdType();
    id.setCreationDate(DatatypeUtil.toXmlDateTime(creationDate));
    id.setHandleId(event.getTask().getHandleIdentifier());

    final TaskFileEventType type = new TaskFileEventType();
    type.setDuration(event.getInterval().toDurationMillis());
    type.setFilePath(event.getFilePath().toString());
    type.setTaskId(id);
View Full Code Here

TOP

Related Classes of rabbit.data.internal.xml.schema.events.TaskIdType

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.