diff --git a/GTaskStringUtils.java b/GTaskStringUtils.java new file mode 100644 index 0000000..807e47d --- /dev/null +++ b/GTaskStringUtils.java @@ -0,0 +1,161 @@ +/* + * Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package net.micode.notes.tool; // 包声明,表示该类位于 net.micode.notes.tool 包中 + +// 定义 GTaskStringUtils 类,用于管理 Google Tasks 或类似任务相关的常量字符串 +public class GTaskStringUtils { + + // 这些常量字符串用于表示任务数据的各个字段名 + + // Action ID + public final static String GTASK_JSON_ACTION_ID = "action_id"; // "action_id" 用于表示任务的操作标识符 + + // 操作列表 + public final static String GTASK_JSON_ACTION_LIST = "action_list"; // "action_list" 用于表示操作列表 + + // 操作类型 + public final static String GTASK_JSON_ACTION_TYPE = "action_type"; // "action_type" 用于表示操作的类型 + + // 创建操作类型 + public final static String GTASK_JSON_ACTION_TYPE_CREATE = "create"; // "create" 表示创建操作 + + // 获取所有操作类型 + public final static String GTASK_JSON_ACTION_TYPE_GETALL = "get_all"; // "get_all" 表示获取所有操作 + + // 移动操作类型 + public final static String GTASK_JSON_ACTION_TYPE_MOVE = "move"; // "move" 表示移动操作 + + // 更新操作类型 + public final static String GTASK_JSON_ACTION_TYPE_UPDATE = "update"; // "update" 表示更新操作 + + // 创建者ID + public final static String GTASK_JSON_CREATOR_ID = "creator_id"; // "creator_id" 表示任务创建者的ID + + // 子实体 + public final static String GTASK_JSON_CHILD_ENTITY = "child_entity"; // "child_entity" 用于表示子实体 + + // 客户端版本 + public final static String GTASK_JSON_CLIENT_VERSION = "client_version"; // "client_version" 表示客户端的版本 + + // 任务是否完成 + public final static String GTASK_JSON_COMPLETED = "completed"; // "completed" 表示任务是否完成 + + // 当前列表ID + public final static String GTASK_JSON_CURRENT_LIST_ID = "current_list_id"; // "current_list_id" 表示当前任务列表的ID + + // 默认列表ID + public final static String GTASK_JSON_DEFAULT_LIST_ID = "default_list_id"; // "default_list_id" 表示默认任务列表的ID + + // 是否删除 + public final static String GTASK_JSON_DELETED = "deleted"; // "deleted" 表示任务是否被删除 + + // 目标列表 + public final static String GTASK_JSON_DEST_LIST = "dest_list"; // "dest_list" 表示目标任务列表 + + // 目标父级任务 + public final static String GTASK_JSON_DEST_PARENT = "dest_parent"; // "dest_parent" 表示目标任务的父级任务 + + // 目标父级类型 + public final static String GTASK_JSON_DEST_PARENT_TYPE = "dest_parent_type"; // "dest_parent_type" 表示目标父级任务的类型 + + // 实体增量 + public final static String GTASK_JSON_ENTITY_DELTA = "entity"; // "entity" 表示实体数据的增量部分 + + // 实体类型 + public final static String GTASK_JSON_ENTITY_TYPE = "entity_type"; // "entity_type" 用于表示实体类型(任务、列表等) + + // 获取已删除任务 + public final static String GTASK_JSON_GET_DELETED = "get_deleted"; // "get_deleted" 表示获取已删除的任务 + + // 任务ID + public final static String GTASK_JSON_ID = "id"; // "id" 用于表示任务的唯一标识符 + + // 任务索引 + public final static String GTASK_JSON_INDEX = "index"; // "index" 用于表示任务的索引位置 + + // 最后修改时间 + public final static String GTASK_JSON_LAST_MODIFIED = "last_modified"; // "last_modified" 用于表示任务的最后修改时间 + + // 最新同步点 + public final static String GTASK_JSON_LATEST_SYNC_POINT = "latest_sync_point"; // "latest_sync_point" 表示任务的最新同步点 + + // 列表ID + public final static String GTASK_JSON_LIST_ID = "list_id"; // "list_id" 用于表示任务列表的ID + + // 列表字段 + public final static String GTASK_JSON_LISTS = "lists"; // "lists" 用于表示多个任务列表 + + // 任务名称 + public final static String GTASK_JSON_NAME = "name"; // "name" 表示任务或任务列表的名称 + + // 新的ID + public final static String GTASK_JSON_NEW_ID = "new_id"; // "new_id" 用于表示任务的新ID + + // 任务备注 + public final static String GTASK_JSON_NOTES = "notes"; // "notes" 表示任务的备注信息 + + // 父任务ID + public final static String GTASK_JSON_PARENT_ID = "parent_id"; // "parent_id" 表示父任务的ID + + // 之前的兄弟任务ID + public final static String GTASK_JSON_PRIOR_SIBLING_ID = "prior_sibling_id"; // "prior_sibling_id" 用于表示之前的兄弟任务ID + + // 任务结果 + public final static String GTASK_JSON_RESULTS = "results"; // "results" 用于表示任务操作的结果 + + // 源列表 + public final static String GTASK_JSON_SOURCE_LIST = "source_list"; // "source_list" 用于表示源任务列表 + + // 任务列表 + public final static String GTASK_JSON_TASKS = "tasks"; // "tasks" 用于表示任务数据 + + // 任务类型 + public final static String GTASK_JSON_TYPE = "type"; // "type" 表示任务的类型 + + // 任务组类型 + public final static String GTASK_JSON_TYPE_GROUP = "GROUP"; // "GROUP" 表示任务组类型 + + // 任务类型 + public final static String GTASK_JSON_TYPE_TASK = "TASK"; // "TASK" 表示单一任务类型 + + // 用户字段 + public final static String GTASK_JSON_USER = "user"; // "user" 用于表示任务所属用户的信息 + + // MIUI 文件夹前缀 + public final static String MIUI_FOLDER_PREFFIX = "[MIUI_Notes]"; // "[MIUI_Notes]" 用于表示 MIUI 系统中的笔记文件夹前缀 + + // 默认文件夹 + public final static String FOLDER_DEFAULT = "Default"; // "Default" 表示默认的文件夹名称 + + // 通话记录笔记文件夹 + public final static String FOLDER_CALL_NOTE = "Call_Note"; // "Call_Note" 用于表示通话记录的笔记文件夹 + + // 元数据文件夹 + public final static String FOLDER_META = "METADATA"; // "METADATA" 用于表示存储元数据的文件夹 + + // 元数据头部: GTASK ID + public final static String META_HEAD_GTASK_ID = "meta_gid"; // "meta_gid" 用于表示任务的 Google Task ID 的元数据字段 + + // 元数据头部: 笔记 + public final static String META_HEAD_NOTE = "meta_note"; // "meta_note" 用于表示与任务相关的元数据笔记字段 + + // 元数据头部: 数据 + public final static String META_HEAD_DATA = "meta_data"; // "meta_data" 用于表示与任务相关的其他元数据字段 + + // 元数据笔记名称 + public final static String META_NOTE_NAME = "[META INFO] DON'T UPDATE AND DELETE"; // "[META INFO] DON'T UPDATE AND DELETE" 是一条标记元数据的警告信息,表示不要更新或删除该元数据 +}