本文整理匯總了Java中com.google.gdata.client.DocumentQuery.setTitleQuery方法的典型用法代碼示例。如果您正苦於以下問題:Java DocumentQuery.setTitleQuery方法的具體用法?Java DocumentQuery.setTitleQuery怎麽用?Java DocumentQuery.setTitleQuery使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gdata.client.DocumentQuery
的用法示例。
在下文中一共展示了DocumentQuery.setTitleQuery方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getDocumentEntries
import com.google.gdata.client.DocumentQuery; //導入方法依賴的package包/類
/**
* Get a List of SpreadsheetEntry from one folder with exact title. (folder and title can be null).
* @param service
* @param title
* @param folder_id
* @return
* @throws MalformedURLException
* @throws IOException
* @throws ServiceException
*/
public List<DocumentListEntry> getDocumentEntries(DocsService service, String title, String folder_id) throws MalformedURLException, IOException, ServiceException
{
URL url = new URL("https://docs.google.com/feeds/default/private/full/" + (folder_id == null ? "" : "folder%3A" + folder_id + "/contents"));
DocumentQuery query = new DocumentQuery(url);
if(title != null)
{
query.setTitleQuery(title);
query.setTitleExact(true);
}
DocumentListFeed feed = service.getFeed(query, DocumentListFeed.class);
return feed.getEntries();
}
示例2: documentQuery
import com.google.gdata.client.DocumentQuery; //導入方法依賴的package包/類
DocumentQuery documentQuery(String title) throws MalformedURLException {
DocumentQuery query = new DocumentQuery(new URL(feedURI));
query.setTitleQuery(title);
query.setTitleExact(true);
query.setMaxResults(1);
return query;
}