Package edu.hawaii.ics.csdl.jupiter.file.property

Examples of edu.hawaii.ics.csdl.jupiter.file.property.CreationDate


   * Gets the creation Date for the review.
   *
   * @return the creation Date instance.
   */
  public Date getCreationDate() {
    CreationDate creationDate = this.review.getCreationDate();
    String format = creationDate.getFormat();
    String date = creationDate.getValue();
    return createDate(date, format);
  }
View Full Code Here


   * Sets the review creation date.
   *
   * @param date the date.
   */
  private void setCreationDate(Date date) {
    CreationDate creationDate = this.review.getCreationDate();
    String format = creationDate.getFormat();
    String value = new SimpleDateFormat(format).format(date);
    creationDate.setValue(value);
  }
View Full Code Here

    writer.writeStartElement(PropertyConstraints.ELEMENT_AUTHOR);
    writer.writeCharacters(review.getAuthor());
    writer.writeEndElement(); // Author

    writer.writeStartElement(PropertyConstraints.ELEMENT_CREATION_DATE);
    CreationDate creationDate = review.getCreationDate();
    writer.writeAttribute(PropertyConstraints.ATTRIBUTE_FORMAT, creationDate.getFormat());
    writer.writeCharacters(creationDate.getValue());
    writer.writeEndElement(); // CreationDate

    writer.writeStartElement(PropertyConstraints.ELEMENT_DIRECTORY);
    writer.writeCharacters(review.getDirectory());
    writer.writeEndElement(); // Directory
View Full Code Here

            String author = reader.getText();
            review.setAuthor(author == null ? "" : author);
          }
        }
        else if (PropertyConstraints.ELEMENT_CREATION_DATE.equals(elementName)) {
          CreationDate creationDate = new CreationDate();

          String format = reader.getAttributeValue(null, PropertyConstraints.ATTRIBUTE_FORMAT);
          creationDate.setFormat(format);

          eventType = reader.next(); // we need the CHARACTERS event
          if (eventType == XMLStreamConstants.CHARACTERS) {
            String dateValue = reader.getText();
            creationDate.setValue(dateValue);
          }

          review.setCreationDate(creationDate);
        }
        else if (PropertyConstraints.ELEMENT_DIRECTORY.equals(elementName)) {
View Full Code Here

    copiedReview.setAuthor(review.getAuthor());
    copiedReview.setDescription(review.getDescription());
    copiedReview.setDirectory(review.getDirectory());
    copiedReview.setId(review.getId());

    CreationDate creationDate = review.getCreationDate();
    if (creationDate != null) {
      CreationDate copiedCreationDate = new CreationDate();
      copiedCreationDate.setFormat(creationDate.getFormat());
      copiedCreationDate.setValue(creationDate.getValue());
      copiedReview.setCreationDate(copiedCreationDate);
    }

    Reviewers reviewers = review.getReviewers();
    if (reviewers != null) {
View Full Code Here

TOP

Related Classes of edu.hawaii.ics.csdl.jupiter.file.property.CreationDate

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.