• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java NoteList类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.evernote.edam.notestore.NoteList的典型用法代码示例。如果您正苦于以下问题:Java NoteList类的具体用法?Java NoteList怎么用?Java NoteList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NoteList类属于com.evernote.edam.notestore包,在下文中一共展示了NoteList类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: listNoteBooks

import com.evernote.edam.notestore.NoteList; //导入依赖的package包/类
public List<Notebook> listNoteBooks() throws Exception {
	List<Notebook> notebooks = noteStore.listNotebooks();

	for (Notebook notebook : notebooks) {
		NoteFilter filter = new NoteFilter();
		filter.setNotebookGuid(notebook.getGuid());
		filter.setOrder(NoteSortOrder.CREATED.getValue());
		filter.setAscending(true);

		NoteList noteList = noteStore.findNotes(filter, 0, 100);
		List<Note> notes = noteList.getNotes();
		for (Note note : notes) {
			System.out.println(" * " + note.getTitle());
		}
	}
	return notebooks;
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:18,代码来源:EverNoteHelp.java


示例2: listNotes

import com.evernote.edam.notestore.NoteList; //导入依赖的package包/类
/**
 * Retrieve and display a list of the user's notes.
 */
private void listNotes() throws Exception {
	// List the notes in the user's account
	System.out.println("Listing notes:");

	// First, get a list of all notebooks
	List<Notebook> notebooks = noteStore.listNotebooks();

	for (Notebook notebook : notebooks) {
		System.out.println("Notebook: " + notebook.getName());

		// Next, search for the first 100 notes in this notebook, ordering
		// by creation date
		NoteFilter filter = new NoteFilter();
		filter.setNotebookGuid(notebook.getGuid());
		filter.setOrder(NoteSortOrder.CREATED.getValue());
		filter.setAscending(true);

		NoteList noteList = noteStore.findNotes(filter, 0, 100);
		List<Note> notes = noteList.getNotes();
		for (Note note : notes) {
			System.out.println(" * " + note.getTitle());
		}
	}
	System.out.println();
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:29,代码来源:HelpEverNote.java


示例3: findNotesAsync

import com.evernote.edam.notestore.NoteList; //导入依赖的package包/类
public Future<NoteList> findNotesAsync(final NoteFilter filter, final int offset, final int maxNotes, EvernoteCallback<NoteList> callback) {
    return submitTask(new Callable<NoteList>() {
        @Override
        public NoteList call() throws Exception {
            return findNotes(filter, offset, maxNotes);
        }
    }, callback);
}
 
开发者ID:fivef,项目名称:add_to_evernote_note,代码行数:9,代码来源:EvernoteNoteStoreClient.java


示例4: findNoteBySource

import com.evernote.edam.notestore.NoteList; //导入依赖的package包/类
/**
 * Search for note using the note's source attribute
 * 
 * @param source The source attribute to search for 
 * @return
 * @throws Exception
 */
public NoteList findNoteBySource(String source) throws Exception {
	NoteFilter filter = new NoteFilter();
	String query = "source:\"" + source + "\"";
	filter.setWords(query);

	NoteList notes = noteStore.findNotes(filter, 0, 10);
	
	return notes;
}
 
开发者ID:windsource,项目名称:evernote-markdown-sync,代码行数:17,代码来源:MyEvernoteService.java


示例5: testFindNoteBySource

import com.evernote.edam.notestore.NoteList; //导入依赖的package包/类
@Test
public void testFindNoteBySource() throws Exception {
	String source = UUID.randomUUID().toString();
	
	// create a note
	MyEvernoteService service = new MyEvernoteService(token, true);
	Note note = service.createNote("My new note", noteContent, null, source);
	
	// now search for it
	NoteList noteList = service.findNoteBySource(source);
	assertEquals(noteList.getNotesSize(), 1);
	assertEquals(noteList.getNotes().get(0).getGuid(), note.getGuid());
}
 
开发者ID:windsource,项目名称:evernote-markdown-sync,代码行数:14,代码来源:MyEvernoteServiceTest.java


示例6: listNotes

import com.evernote.edam.notestore.NoteList; //导入依赖的package包/类
public List<Note> listNotes(Notebook notebook) throws Exception {
	NoteFilter filter = new NoteFilter();
	filter.setNotebookGuid(notebook.getGuid());
	filter.setOrder(NoteSortOrder.CREATED.getValue());
	filter.setAscending(true);

	NoteList noteList = noteStore.findNotes(filter, 0, 100);
	List<Note> notes = noteList.getNotes();
	
	return notes;
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:12,代码来源:EverNoteHelp.java


示例7: onResume

import com.evernote.edam.notestore.NoteList; //导入依赖的package包/类
@Override
public void onResume() {
    super.onResume();
    // ここで読みに行く
    ClientFactory factory = mProvider.getEvernoteSession()
            .getClientFactory();
    try {
        AsyncNoteStoreClient client = factory.createNoteStoreClient();

        NoteFilter filter = new NoteFilter();
        filter.setOrder(NoteSortOrder.UPDATED.getValue());
        filter.setWords("evernote_sample");
        client.findNotes(filter, 0, 20, new OnClientCallback<NoteList>() {
            public void onSuccess(NoteList data) {
                ArrayAdapter<String> adapter = (ArrayAdapter<String>) getListAdapter();
                adapter.clear();
                for (Note note : data.getNotes()) {
                    adapter.add(note.getTitle());
                }
                adapter.notifyDataSetChanged();
            };

            @Override
            public void onException(Exception exception) {
                exception.printStackTrace();
                Toast.makeText(getActivity(), "接続に失敗しました",
                        Toast.LENGTH_SHORT).show();
            }
        });
    } catch (Exception e) {
        e.printStackTrace();
        Toast.makeText(getActivity(), "接続に失敗しました", Toast.LENGTH_SHORT)
                .show();
    }
}
 
开发者ID:android-opensource-library-56,项目名称:android-opensource-library-56,代码行数:36,代码来源:MainFragment.java


示例8: findNotes

import com.evernote.edam.notestore.NoteList; //导入依赖的package包/类
public NoteList findNotes(NoteFilter filter, int offset, int maxNotes) throws EDAMUserException, EDAMSystemException, EDAMNotFoundException, TException {
    return mClient.findNotes(mAuthenticationToken, filter, offset, maxNotes);
}
 
开发者ID:fivef,项目名称:add_to_evernote_note,代码行数:4,代码来源:EvernoteNoteStoreClient.java


示例9: run

import com.evernote.edam.notestore.NoteList; //导入依赖的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());
}
 
开发者ID:tarioch,项目名称:enki,代码行数:68,代码来源:Enki.java


示例10: searchNotes

import com.evernote.edam.notestore.NoteList; //导入依赖的package包/类
/**
 * Search a user's notes and display the results.
 */
private void searchNotes() throws Exception {
	// Searches are formatted according to the Evernote search grammar.
	// Learn more at
	// http://dev.evernote.com/documentation/cloud/chapters/Searching_notes.php

	// In this example, we search for notes that have the term "EDAMDemo" in
	// the title.
	// This should return the sample note that we created in this demo app.
	String query = "intitle:EDAMDemo";

	// To search for notes with a specific tag, we could do something like
	// this:
	// String query = "tag:tagname";

	// To search for all notes with the word "elephant" anywhere in them:
	// String query = "elephant";

	NoteFilter filter = new NoteFilter();
	filter.setWords(query);
	filter.setOrder(NoteSortOrder.UPDATED.getValue());
	filter.setAscending(false);

	// Find the first 50 notes matching the search
	System.out.println("Searching for notes matching query: " + query);
	NoteList notes = noteStore.findNotes(filter, 0, 50);
	System.out
			.println("Found " + notes.getTotalNotes() + " matching notes");

	Iterator<Note> iter = notes.getNotesIterator();
	while (iter.hasNext()) {
		Note note = iter.next();
		System.out.println("Note: " + note.getTitle());

		// Note objects returned by findNotes() only contain note attributes
		// such as title, GUID, creation date, update date, etc. The note
		// content
		// and binary resource data are omitted, although resource metadata
		// is included.
		// To get the note content and/or binary resources, call getNote()
		// using the note's GUID.
		Note fullNote = noteStore.getNote(note.getGuid(), true, true,
				false, false);
		System.out.println("Note contains " + fullNote.getResourcesSize()
				+ " resources");
		System.out.println();
	}
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:51,代码来源:HelpEverNote.java



注:本文中的com.evernote.edam.notestore.NoteList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java JobEntryMsgBoxInfo类代码示例发布时间:2022-05-22
下一篇:
Java OpGraph类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap