Package com.evernote.edam.type

Examples of com.evernote.edam.type.NoteAttributes


                    if (freshlyRetrievedNote.isSetActive())
                        facet.active = freshlyRetrievedNote.isActive();

                    if (freshlyRetrievedNote.isSetAttributes()) {
                        final NoteAttributes attributes = freshlyRetrievedNote.getAttributes();
                        if (attributes.isSetAltitude())
                            facet.altitude = attributes.getAltitude();
                        if (attributes.isSetAuthor())
                            facet.author = attributes.getAuthor();
                        if (attributes.isSetContentClass())
                            facet.contentClass = attributes.getContentClass();
                        if (attributes.isSetCreatorId())
                            facet.creatorId = attributes.getCreatorId();
                        if (attributes.isSetLastEditedBy())
                            facet.lastEditedBy = attributes.getLastEditedBy();
                        if (attributes.isSetLastEditorId())
                            facet.lastEditorId = attributes.getLastEditorId();
                        if (attributes.isSetLatitude())
                            facet.latitude = attributes.getLatitude();
                        if (attributes.isSetLongitude())
                            facet.longitude = attributes.getLongitude();
                        if (attributes.isSetPlaceName())
                            facet.placeName = attributes.getPlaceName();
                        if (attributes.isSetReminderDoneTime())
                            facet.reminderDoneTime = attributes.getReminderDoneTime();
                        if (attributes.isSetReminderOrder())
                            facet.reminderOrder = attributes.getReminderOrder();
                        if (attributes.isSetReminderTime())
                            facet.reminderTime = attributes.getReminderTime();
                        if (attributes.isSetShareDate())
                            facet.shareDate = attributes.getShareDate();
                        if (attributes.isSetSource())
                            facet.source = attributes.getSource();
                        if (attributes.isSetSourceApplication())
                            facet.sourceApplication = attributes.getSourceApplication();
                        if (attributes.isSetSourceURL())
                            facet.sourceURL = attributes.getSourceURL();
                        if (attributes.isSetSubjectDate())
                            facet.subjectDate = attributes.getSubjectDate();
                        if (attributes.isSetLatitude()&&attributes.isSetLongitude()&&freshlyRetrievedNote.isSetCreated()){
                            addGuestLocation(updateInfo, facet.latitude, facet.longitude, facet.altitude, facet.created, facet.guid);
                        }
                    }

                    if (freshlyRetrievedNote.isSetDeleted()) {
View Full Code Here


        exportableTags.put(note.getTagGuids().get(i), "");
      }
      writer.writeEndElement();
    }
   
    NoteAttributes noteAttributes = note.getAttributes();
    if (noteAttributes != null) {
      writer.writeStartElement("NoteAttributes");
      createTextNode("Author", noteAttributes.getAuthor());
      createTextNode("Source", noteAttributes.getSource());
      createTextNode("SourceApplication", noteAttributes.getSourceApplication());
      createTextNode("SourceURL", noteAttributes.getSourceURL());
      createTextNode("Altitude", new Double(noteAttributes.getAltitude()).toString());
      createTextNode("Longitude", new Double(noteAttributes.getLongitude()).toString());
      createTextNode("Latitude", new Double(noteAttributes.getLatitude()).toString());
      createTextNode("SubjectDate", new Long(noteAttributes.getSubjectDate()).toString());
      writer.writeEndElement();
    }
   
//    writeResources(conn.getNoteTable().noteResourceTable.getNoteResources(note.getGuid(), true));
    writeResources(note.getResources());
View Full Code Here

  }



  private NoteAttributes processNoteAttributes() {
  NoteAttributes attributes = new NoteAttributes();
 
  boolean atEnd = false;
  while(!atEnd) {
    if (reader.isStartElement()) {
      if (reader.name().equalsIgnoreCase("Author"))
        attributes.setAuthor(textValue());
      if (reader.name().equalsIgnoreCase("SourceURL"))
        attributes.setSourceURL(textValue());
      if (reader.name().equalsIgnoreCase("Source"))
        attributes.setSource(textValue());
      if (reader.name().equalsIgnoreCase("SourceApplication"))
        attributes.setSourceApplication(textValue());
      if (reader.name().equalsIgnoreCase("Altitude"))
        attributes.setAltitude(doubleValue());
      if (reader.name().equalsIgnoreCase("Longitude"))
        attributes.setLongitude(doubleValue());
      if (reader.name().equalsIgnoreCase("Latitude"))
        attributes.setLatitude(doubleValue());
      if (reader.name().equalsIgnoreCase("SubjectDate"))
        attributes.setSubjectDate(longValue());
    }
    reader.readNext();
    if (reader.name().equalsIgnoreCase("noteattributes") && reader.isEndElement())
      atEnd = true;
  }
View Full Code Here

    return data;
  }

 
  private NoteAttributes processNoteAttributes() {
    NoteAttributes attributes = new NoteAttributes();
 
    boolean atEnd = false;
    while(!atEnd) {
      if (reader.isStartElement()) {
        if (reader.name().equalsIgnoreCase("source-url"))
          attributes.setSourceURL(textValue());
        if (reader.name().equalsIgnoreCase("source"))
          attributes.setSource(textValue());
        if (reader.name().equalsIgnoreCase("longitude"))
          attributes.setLongitude(doubleValue());
        if (reader.name().equalsIgnoreCase("latitude"))
          attributes.setLatitude(doubleValue());
        if (reader.name().equalsIgnoreCase("altitude"))
          attributes.setAltitude(doubleValue());
        if (reader.name().equalsIgnoreCase("author"))
          attributes.setAuthor(textValue());
        if (reader.name().equalsIgnoreCase("subject-date"))
          attributes.setSubjectDate(datetimeValue());
      }
      reader.readNext();
      if (reader.name().equalsIgnoreCase("note-attributes") && reader.isEndElement())
      atEnd = true;
    }
View Full Code Here

        "<!DOCTYPE en-note SYSTEM \"http://xml.evernote.com/pub/enml2.dtd\">\n" +
        "<en-note>\n<br clear=\"none\" />"+fileData+"</en-note>");

    noteString = fileData;
    buildEmptyNote();
      newNote.setAttributes(new NoteAttributes());
         
      return true;
  }
View Full Code Here

      logger.log(logger.LOW, "Unable to save externally edited file - zero size.  Saving for later.");
      return false;
    }
     
    buildEmptyNote();
      newNote.setAttributes(new NoteAttributes());
   
      // Start building the resource itself
      StringBuffer buffer = new StringBuffer();
      buffer.append("<html><head></head><body>\n");
     
View Full Code Here

      int cdate = fileInfo.created().toTime_t();
      int mdate = fileInfo.lastModified().toTime_t();
      newNote.setCreated((long)cdate*1000);
      newNote.setUpdated((long)mdate*1000);
      newNote.setActive(true);
      NoteAttributes na = new NoteAttributes();
      na.setLatitude(0.0);
      na.setLongitude(0.0);
      na.setAltitude(0.0);
  }
View Full Code Here

      newNote.setContent(noteString.toString());
      newNote.setDeleted(0);
      newNote.setCreated(System.currentTimeMillis());
      newNote.setUpdated(System.currentTimeMillis());
      newNote.setActive(true);
      NoteAttributes na = new NoteAttributes();
      na.setLatitude(0.0);
      na.setLongitude(0.0);
      na.setAltitude(0.0);
      newNote.setAttributes(new NoteAttributes());
    newNote.setTagGuids(new ArrayList<String>());
    newNote.setTagNames(new ArrayList<String>());
     
      // If new notes are to be created based upon the selected tags, then we need to assign the tags
      if (Global.newNoteWithSelectedTags()) { 
View Full Code Here

  public Note mapNoteFromQuery(NSqlQuery query, boolean loadContent, boolean loadResources, boolean loadRecognition, boolean loadBinary, boolean loadTags) {
    DateFormat indfm = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S");
//    indfm = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy");

    Note n = new Note();
    NoteAttributes na = new NoteAttributes();
    n.setAttributes(na);
   
    n.setGuid(query.valueString(0));
    n.setUpdateSequenceNum(new Integer(query.valueString(1)));
    n.setTitle(query.valueString(2));

    try {
      n.setCreated(indfm.parse(query.valueString(3)).getTime());
      n.setUpdated(indfm.parse(query.valueString(4)).getTime());
      n.setDeleted(indfm.parse(query.valueString(5)).getTime());
    } catch (ParseException e) {
      e.printStackTrace();
    }

    n.setActive(query.valueBoolean(6,true));
    n.setNotebookGuid(query.valueString(7));
   
    try {
      String attributeSubjectDate = query.valueString(8);
      if (!attributeSubjectDate.equals(""))
        na.setSubjectDate(indfm.parse(attributeSubjectDate).getTime());
    } catch (ParseException e) {
      e.printStackTrace();
    }
    na.setLatitude(new Float(query.valueString(9)));
    na.setLongitude(new Float(query.valueString(10)));
    na.setAltitude(new Float(query.valueString(11)));
    na.setAuthor(query.valueString(12));
    na.setSource(query.valueString(13));
    na.setSourceURL(query.valueString(14));
    na.setSourceApplication(query.valueString(15));
    na.setContentClass(query.valueString(16));
   
    if (loadTags) {
      List<String> tagGuids = noteTagsTable.getNoteTags(n.getGuid());
      List<String> tagNames = new ArrayList<String>();
      TagTable tagTable = db.getTagTable();
View Full Code Here

TOP

Related Classes of com.evernote.edam.type.NoteAttributes

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.