本文整理汇总了Java中com.evernote.edam.type.Note.getTitle方法的典型用法代码示例。如果您正苦于以下问题:Java Note.getTitle方法的具体用法?Java Note.getTitle怎么用?Java Note.getTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.evernote.edam.type.Note
的用法示例。
在下文中一共展示了Note.getTitle方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseTime
import com.evernote.edam.type.Note; //导入方法依赖的package包/类
private static void parseTime(Note note, GNote gNote) {
boolean setTime = false;
String title = note.getTitle();
String[] tmp = title.split(" ");
if (tmp.length == 2) {
String[] allInfo = tmp[1].split("\\.");
if (allInfo.length == 3) {
gNote.setTime(Util.parseTimeStamp(allInfo));
setTime = true;
}
}
if (!setTime) {
Calendar today = Calendar.getInstance();
gNote.setCalToTime(today);
}
}
示例2: getNearestRMC
import com.evernote.edam.type.Note; //导入方法依赖的package包/类
public int[] getNearestRMC() {
int user_site = 0;
int user_drive = 0;
//find the RMC of the newest image/note
for (Note note : notesArray) {
String title = note.getTitle();
if (!title.contains("RMC")) {
continue;
}
String rmcString = title.substring(title.length()-13);
String siteString = rmcString.substring(0,6);
String driveString = rmcString.substring(7,13);
user_site = Integer.parseInt(siteString);
user_drive = Integer.parseInt(driveString);
break;
}
//find the RMC in locations closest to the RMC of the newest image
List<int[]> locations = MARS_IMAGES.getLocations(MARS_IMAGES.getApplicationContext());
int[] lastLocation = locations.get(locations.size()-1);
int siteIndex = lastLocation[0];
int driveIndex = lastLocation[1];
if (user_site != 0 || user_drive != 0) {
for (int i = locations.size()-1; i >=0; i--) {
int[] location = locations.get(i);
int aSiteIndex = location[0];
int aDriveIndex = location[1];
if (aSiteIndex*100000+aDriveIndex < user_site*100000+user_drive)
break;
siteIndex = aSiteIndex;
driveIndex = aDriveIndex;
}
}
return new int[] { siteIndex, driveIndex };
}
示例3: getSol
import com.evernote.edam.type.Note; //导入方法依赖的package包/类
@Override
public int getSol(Note note) {
if (note == null) return 0;
String title = note.getTitle();
String tokens[] = title.split(" ");
if (tokens.length >= 2) {
return Integer.parseInt(tokens[1]);
}
return 0;
}
示例4: shareImage
import com.evernote.edam.type.Note; //导入方法依赖的package包/类
public void shareImage() {
Note thisNote = EVERNOTE.getNote(mPager.getCurrentItem());
final String imageSubject = MARS_IMAGES.getMissionName()+" "+thisNote.getTitle()+" "+getString(R.string.share_subject);
new AsyncTask<Object, Void, File>() {
@Override
protected File doInBackground(Object... params) {
if (!(params[0] instanceof Note) || !(params[1] instanceof Integer))
return null;
return saveImageToExternalStorage((Note) params[0], (Integer) params[1]);
}
@Override
protected void onPostExecute(File jpegFile) {
if (jpegFile == null) {
CharSequence text = "Error sharing Mars image, please try again.";
Toast.makeText(getActivity(), text, Toast.LENGTH_SHORT).show();
return;
}
final Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
shareIntent.setType("image/jpeg");
shareIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, imageSubject);
shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File(jpegFile.getAbsolutePath())));
startActivity(Intent.createChooser(shareIntent, "Share"));
}
}.execute(thisNote, mPager.getCurrentItem());
}
示例5: run
import com.evernote.edam.type.Note; //导入方法依赖的package包/类
public void run() throws Exception {
final EvernoteAuth evernoteAuth = new EvernoteAuth(EvernoteService.PRODUCTION, conf.getDevToken());
evernoteAuth.setNoteStoreUrl(conf.getNoteStore());
final ClientFactory clientFactory = new ClientFactory(evernoteAuth);
final NoteStoreClient noteStoreClient;
noteStoreClient = clientFactory.createNoteStoreClient();
final ICalendar ical = new ICalendar();
ical.setProductId("org.tario.enki");
final Pattern eventDatePattern = conf.getEventDatePattern();
final List<Notebook> notebooks = noteStoreClient.listNotebooks();
for (final Notebook notebook : notebooks) {
if (conf.getEventNotebook().equals(notebook.getName())) {
final NoteFilter filter = new NoteFilter();
filter.setNotebookGuid(notebook.getGuid());
final NoteList notes = noteStoreClient.findNotes(filter, 0, 9000);
for (final Note note : notes.getNotes()) {
final VEvent event = new VEvent();
final String title = note.getTitle();
final Matcher matcher = eventDatePattern.matcher(title);
if (matcher.matches()) {
final String day = matcher.group("day");
final String month = matcher.group("month");
final String year = matcher.group("year");
final String fromHour = matcher.group("fromHour");
final String fromMinute = matcher.group("fromMinute");
final String toHour = matcher.group("toHour");
final String toMinute = matcher.group("toMinute");
final LocalDate fromDate = new LocalDate(Integer.parseInt(year), Integer.parseInt(month),
Integer.parseInt(day));
if (fromHour != null && fromMinute != null) {
final LocalTime fromTime = new LocalTime(Integer.parseInt(fromHour),
Integer.parseInt(fromMinute));
final DateStart dateStart = new DateStart(fromDate.toLocalDateTime(fromTime).toDate());
dateStart.setTimezoneId(conf.getEventTimeZone());
event.setDateStart(dateStart);
if (toHour != null && toMinute != null) {
final LocalTime toTime = new LocalTime(Integer.parseInt(toHour),
Integer.parseInt(toMinute));
final DateEnd dateEnd = new DateEnd(fromDate.toLocalDateTime(toTime).toDate());
dateEnd.setTimezoneId(conf.getEventTimeZone());
event.setDateEnd(dateEnd);
} else {
event.setDuration(Duration.builder().hours(1).build());
}
} else {
event.setDateStart(new DateStart(fromDate.toDate(), false));
event.setDuration(Duration.builder().days(1).build());
}
event.setSummary(title);
ical.addEvent(event);
}
}
}
}
Biweekly.write(ical).go(conf.getEventFile());
}
示例6: includedInMosaic
import com.evernote.edam.type.Note; //导入方法依赖的package包/类
public static boolean includedInMosaic(Note note) {
String title = note.getTitle();
return title.contains("Navcam") ||
title.contains("Mastcam Left") ||
title.contains("Pancam");
}