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

Java Notebook类代码示例

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

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



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

示例1: onFindNotebooks

import com.evernote.edam.type.Notebook; //导入依赖的package包/类
@TaskResult(id = "personal")
public void onFindNotebooks(List<Notebook> notebooks) {
    mSwipeRefreshLayout.setRefreshing(false);

    if (notebooks == null || notebooks.isEmpty()) {
        getChildFragmentManager().beginTransaction()
                .replace(R.id.fragment_container, EmptyFragment.create("notebooks"))
                .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE)
                .commit();
    } else {
        getChildFragmentManager().beginTransaction()
                .replace(R.id.fragment_container, NotebookListFragment.create(notebooks))
                .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE)
                .commit();
    }
}
 
开发者ID:fivef,项目名称:add_to_evernote_note,代码行数:17,代码来源:NotebookContainerFragment.java


示例2: getView

import com.evernote.edam.type.Notebook; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    ViewHolder viewHolder;
    if (convertView == null) {
        convertView = LayoutInflater.from(getActivity()).inflate(android.R.layout.simple_list_item_1, parent, false);
        viewHolder = new ViewHolder(convertView);
        convertView.setTag(viewHolder);
    } else {
        viewHolder = (ViewHolder) convertView.getTag();
    }

    Notebook notebook = getItem(position);
    viewHolder.mTextView1.setText(notebook.getName());

    return convertView;
}
 
开发者ID:fivef,项目名称:add_to_evernote_note,代码行数:17,代码来源:NotebookListFragment.java


示例3: createBusinessNotebook

import com.evernote.edam.type.Notebook; //导入依赖的package包/类
/**
 * @param notebook The new business notebook.
 * @param defaultClient The note store client, which references the user's note store.
 * @return The new created {@link LinkedNotebook}, which has an business ID.
 */
public LinkedNotebook createBusinessNotebook(@NonNull Notebook notebook, @NonNull EvernoteNoteStoreClient defaultClient)
        throws TException, EDAMUserException, EDAMSystemException, EDAMNotFoundException {

    Notebook originalNotebook = mClient.createNotebook(notebook);

    List<SharedNotebook> sharedNotebooks = originalNotebook.getSharedNotebooks();
    SharedNotebook sharedNotebook = sharedNotebooks.get(0);

    LinkedNotebook linkedNotebook = new LinkedNotebook();
    linkedNotebook.setShareKey(sharedNotebook.getShareKey());
    linkedNotebook.setShareName(originalNotebook.getName());
    linkedNotebook.setUsername(mBusinessUserName);
    linkedNotebook.setShardId(mBusinessUserShardId);

    return defaultClient.createLinkedNotebook(linkedNotebook);
}
 
开发者ID:fivef,项目名称:add_to_evernote_note,代码行数:22,代码来源:EvernoteBusinessNotebookHelper.java


示例4: loadNotebook

import com.evernote.edam.type.Notebook; //导入依赖的package包/类
/**
 * If this note is linked, then it loads the corresponding notebook for the linked notebook. Use
 * {@link #loadLinkedNotebook()} to get the linked notebook.
 *
 * @return The note's notebook from server.
 * @see #isLinked()
 * @see EvernoteLinkedNotebookHelper#getCorrespondingNotebook()
 */
public Notebook loadNotebook() throws EDAMUserException, EDAMSystemException, TException, EDAMNotFoundException {
    if (mNotebookGuid == null) {
        return null;
    }

    if (mLinked) {
        LinkedNotebook linkedNotebook = NoteRefHelper.getLinkedNotebook(mNotebookGuid);
        return NoteRefHelper.getSession().getEvernoteClientFactory().getLinkedNotebookHelper(linkedNotebook).getCorrespondingNotebook();
    }

    EvernoteNoteStoreClient noteStore = NoteRefHelper.getNoteStore(this);
    if (noteStore == null) {
        return null;
    }

    return noteStore.getNotebook(mNotebookGuid);
}
 
开发者ID:fivef,项目名称:add_to_evernote_note,代码行数:26,代码来源:NoteRef.java


示例5: makeSureNotebookExists

import com.evernote.edam.type.Notebook; //导入依赖的package包/类
private void makeSureNotebookExists(String NotebookName) throws Exception {
    try {
        if (mSharedPreferences.contains(EVERNOTE_NOTEBOOK_GUID)) {
            if (!isNotebookExsist(mSharedPreferences.getString(EVERNOTE_NOTEBOOK_GUID, ""),
                    NOTEBOOK_NAME)) {
                createNotebook(NOTEBOOK_NAME);
            }
        } else {
            List<Notebook> books = mEvernoteSession.getClientFactory().createNoteStore()
                    .listNotebooks(mEvernoteSession.getAuthToken());
            int count = books.size();
            for (int i = 0; i < count; i++) {
                Notebook book = books.get(i);
                if (book.getName().equals(NotebookName)) {
                    mSharedPreferences.edit().putString(EVERNOTE_NOTEBOOK_GUID, book.getGuid()).apply();
                    return;
                }
            }
            createNotebook(NOTEBOOK_NAME);
        }

    } catch (Exception e) {
        LogUtil.e(TAG, "检查笔记本是否存和创建笔记本的时候出现异常");
        throw e;
    }
}
 
开发者ID:duanze,项目名称:PureNote,代码行数:27,代码来源:Evernote.java


示例6: listNotebooks

import com.evernote.edam.type.Notebook; //导入依赖的package包/类
/**
 * return a user's all notebooks(including linked notebooks).
 *
 * @return The user's notebooks.
 */
@Override
public Map<String, ENObject> listNotebooks() throws EDAMUserException, EDAMSystemException, TException, EDAMNotFoundException {
    List<Notebook> notebooks = factory.getNoteStoreClient().listNotebooks();
    List<LinkedNotebook> linkedNotebooks = factory.getNoteStoreClient().listLinkedNotebooks();

    Map<String, ENObject> map = MapUtil.map();
    for (Notebook n : notebooks) {
        map.put(n.getName(), ENObjectImpl.forNameAndGuid(n.getName(), n.getGuid()));
    }

    for (LinkedNotebook linkedNotebook : linkedNotebooks) { // LinkedNotebook must be serializable
        NoteStoreClient linkedNoteStore = factory.getLinkedNoteStoreClient(linkedNotebook);
        SharedNotebook sharedNotebook = linkedNoteStore.getSharedNotebookByAuth();

        if (map.containsKey(linkedNotebook.getShareName())) {
            map.put(linkedNotebook.getShareName() + ConstantsUtil.LEFT_PARENTHESIS + linkedNotebook.getUsername() + ConstantsUtil.COLON + sharedNotebook.getNotebookGuid() + ConstantsUtil.RIGHT_PARENTHESIS, ENObjectImpl.forValues(linkedNotebook.getShareName(), sharedNotebook.getNotebookGuid(), ENObjectType.LINKED, linkedNotebook));
        } else {
            map.put(linkedNotebook.getShareName(), ENObjectImpl.forValues(linkedNotebook.getShareName(), sharedNotebook.getNotebookGuid(), ENObjectType.LINKED, linkedNotebook));
        }
    }

    return map;
}
 
开发者ID:LTTPP,项目名称:Eemory,代码行数:29,代码来源:EeClipperImpl.java


示例7: listNoteBooks

import com.evernote.edam.type.Notebook; //导入依赖的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


示例8: listNotes

import com.evernote.edam.type.Notebook; //导入依赖的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


示例9: getNotebookLabel

import com.evernote.edam.type.Notebook; //导入依赖的package包/类
private SSLabel getNotebookLabel(
  final Notebook notebook) throws SSErr{
  
  try{
    final SSLabel tmpLabel = SSLabel.get(notebook.getName());
    
    if(tmpLabel == null){
      return getDefaultLabel();
    }else{
      return tmpLabel;
    }
  }catch(Exception error){
    SSLogU.warn(error);
    
    return getDefaultLabel();
  }
}
 
开发者ID:learning-layers,项目名称:SocialSemanticServer,代码行数:18,代码来源:SSDataImportBNPEvernoteImporter.java


示例10: evernoteNotebookGet

import com.evernote.edam.type.Notebook; //导入依赖的package包/类
@Override
public Notebook evernoteNotebookGet(final SSEvernoteNotebookGetPar par) throws SSErr {
  
  try{
    return par.noteStore.getNotebook(par.notebookGUID);
  }catch(EDAMSystemException edamError){
    
    if(gotToSleep(edamError, SSStrU.empty)){
      return evernoteNotebookGet (par);
    }else{
      SSServErrReg.regErrThrow(edamError);
      return null;
    }
    
  }catch(Exception error){
    SSServErrReg.regErrThrow(error);
    return null;
  }
}
 
开发者ID:learning-layers,项目名称:SocialSemanticServer,代码行数:20,代码来源:SSEvernoteImpl.java


示例11: create

import com.evernote.edam.type.Notebook; //导入依赖的package包/类
public static NoteContainerFragment create(@Nullable Notebook notebook, @Nullable LinkedNotebook linkedNotebook, @Nullable String mReceivedString) {
    Bundle args = new Bundle();
    args.putSerializable(KEY_NOTEBOOK, notebook);
    args.putSerializable(KEY_LINKED_NOTEBOOK, linkedNotebook);
    args.putSerializable(KEY_RECEIVED_STRING, mReceivedString);

    NoteContainerFragment fragment = new NoteContainerFragment();
    fragment.setArguments(args);
    return fragment;
}
 
开发者ID:fivef,项目名称:add_to_evernote_note,代码行数:11,代码来源:NoteContainerFragment.java


示例12: onCreate

import com.evernote.edam.type.Notebook; //导入依赖的package包/类
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setHasOptionsMenu(true);

    mNotebook = (Notebook) getArguments().getSerializable(KEY_NOTEBOOK);
    mLinkedNotebook = (LinkedNotebook) getArguments().getSerializable(KEY_LINKED_NOTEBOOK);
    mReceivedString = (String) getArguments().getSerializable(KEY_RECEIVED_STRING);
}
 
开发者ID:fivef,项目名称:add_to_evernote_note,代码行数:10,代码来源:NoteContainerFragment.java


示例13: onCreateNewNotebook

import com.evernote.edam.type.Notebook; //导入依赖的package包/类
@TaskResult
public void onCreateNewNotebook(Notebook notebook) {
    // called from CreateNoteDialogFragment
    if (notebook != null) {
        refresh();
    } else {
        ViewUtil.showSnackbar(mSwipeRefreshLayout, "Create notebook failed");
    }
}
 
开发者ID:fivef,项目名称:add_to_evernote_note,代码行数:10,代码来源:NotebookContainerFragment.java


示例14: create

import com.evernote.edam.type.Notebook; //导入依赖的package包/类
public static NotebookListFragment create(List<Notebook> notebooks) {
    Bundle args = new Bundle();
    ParcelableUtil.putSerializableList(args, new ArrayList<Serializable>(notebooks), KEY_NOTEBOOK_LIST);

    NotebookListFragment fragment = new NotebookListFragment();
    fragment.setArguments(args);
    return fragment;
}
 
开发者ID:fivef,项目名称:add_to_evernote_note,代码行数:9,代码来源:NotebookListFragment.java


示例15: checkedExecute

import com.evernote.edam.type.Notebook; //导入依赖的package包/类
@Override
protected Notebook checkedExecute() throws Exception {
    EvernoteNoteStoreClient noteStoreClient = EvernoteSession.getInstance().getEvernoteClientFactory().getNoteStoreClient();

    Notebook notebook = new Notebook();
    notebook.setName(mName);

    return noteStoreClient.createNotebook(notebook);
}
 
开发者ID:fivef,项目名称:add_to_evernote_note,代码行数:10,代码来源:CreateNewNotebookTask.java


示例16: CreateNewNoteTask

import com.evernote.edam.type.Notebook; //导入依赖的package包/类
public CreateNewNoteTask(String title, String content, ImageData imageData, Notebook notebook, LinkedNotebook linkedNotebook) {
    super(Note.class);

    mTitle = title;
    mContent = content;
    mImageData = imageData;
    mNotebook = notebook;
    mLinkedNotebook = linkedNotebook;
}
 
开发者ID:fivef,项目名称:add_to_evernote_note,代码行数:10,代码来源:CreateNewNoteTask.java


示例17: FindNotesTask

import com.evernote.edam.type.Notebook; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public FindNotesTask(int offset, int maxNotes, @Nullable Notebook notebook, @Nullable LinkedNotebook linkedNotebook, @Nullable String query) {
    super((Class) List.class);

    NoteFilter noteFilter = new NoteFilter();
    noteFilter.setOrder(NoteSortOrder.UPDATED.getValue());

    if (!TextUtils.isEmpty(query)) {
        noteFilter.setWords(query);
    }else{
        //TODO: let the user choose a tag he wants here we just use favorit as tag to filter by
        List<String> list = new ArrayList();
        list.add("03750a45-c107-4e8b-afbf-29fa22777244");
        noteFilter.setTagGuids(list);
    }

    if (notebook != null) {
        noteFilter.setNotebookGuid(notebook.getGuid());
    }

    mSearch = new EvernoteSearchHelper.Search()
            .setOffset(offset)
            .setMaxNotes(maxNotes)
            .setNoteFilter(noteFilter);

    if (linkedNotebook != null) {
        mSearch.addLinkedNotebook(linkedNotebook);
    } else {
        mSearch.addScope(EvernoteSearchHelper.Scope.PERSONAL_NOTES);
    }

}
 
开发者ID:fivef,项目名称:add_to_evernote_note,代码行数:33,代码来源:FindNotesTask.java


示例18: getCorrespondingNotebookAsync

import com.evernote.edam.type.Notebook; //导入依赖的package包/类
/**
 * @see #getCorrespondingNotebook()
 */
public Future<Notebook> getCorrespondingNotebookAsync(@Nullable EvernoteCallback<Notebook> callback) {
    return submitTask(new Callable<Notebook>() {
        @Override
        public Notebook call() throws Exception {
            return getCorrespondingNotebook();
        }
    }, callback);
}
 
开发者ID:fivef,项目名称:add_to_evernote_note,代码行数:12,代码来源:EvernoteLinkedNotebookHelper.java


示例19: createBusinessNotebookAsync

import com.evernote.edam.type.Notebook; //导入依赖的package包/类
/**
 * @see #createBusinessNotebook(Notebook, EvernoteNoteStoreClient)
 */
public Future<LinkedNotebook> createBusinessNotebookAsync(@NonNull final Notebook notebook, @NonNull final EvernoteNoteStoreClient defaultClient,
                                                          @Nullable EvernoteCallback<LinkedNotebook> callback) {

    return submitTask(new Callable<LinkedNotebook>() {
        @Override
        public LinkedNotebook call() throws Exception {
            return createBusinessNotebook(notebook, defaultClient);
        }
    }, callback);
}
 
开发者ID:fivef,项目名称:add_to_evernote_note,代码行数:14,代码来源:EvernoteBusinessNotebookHelper.java


示例20: listNotebooksAsync

import com.evernote.edam.type.Notebook; //导入依赖的package包/类
public Future<List<Notebook>> listNotebooksAsync(EvernoteCallback<List<Notebook>> callback) {
    return submitTask(new Callable<List<Notebook>>() {
        @Override
        public List<Notebook> call() throws Exception {
            return listNotebooks();
        }
    }, callback);
}
 
开发者ID:fivef,项目名称:add_to_evernote_note,代码行数:9,代码来源:EvernoteNoteStoreClient.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java GetDatanodeReportResponseProto类代码示例发布时间:2022-05-22
下一篇:
Java MaxDirectoryItemsExceededException类代码示例发布时间: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