//File upload in google drive DocumentListEntry uploadFile = new DocumentListEntry(); uploadFile.setTitle(new PlainTextConstruct("FILE_NAME_DISPLAY_IN_DRIVE")); uploadFile.setFile(new File("FILE_PATH"), "MIME_TYPE_OF_FILE"); uploadFile = docsService.insert(GOOGLE_DRIVE_FEED_URL, uploadFile);
DocsService docsService = new DocsService("MySampleApplication-v3"); docsService.setUserCredentials(USERNAME, PASSWORD); URL GOOGLE_DRIVE_FEED_URL = new URL("https://docs.google.com/feeds/default/private/full/"); DocumentListEntry documentListEntry = new com.google.gdata.data.docs.SpreadsheetEntry(); documentListEntry.setTitle(new PlainTextConstruct("Spreadsheet_name")); documentListEntry = docsService.insert(GOOGLE_DRIVE_FEED_URL, documentListEntry);
@Override public void declareExtensions(ExtensionProfile extProfile) { // Declare the latitude and longitude extensions. extProfile.declare(W3CPoint.class, ExtensionDescription.getDefaultDescription(GeoLat.class)); extProfile.declare(W3CPoint.class, ExtensionDescription.getDefaultDescription(GeoLong.class)); super.declareExtensions(extProfile); }
@Override public void declareExtensions(ExtensionProfile extProfile) { // Add any feed-level extension declarations here. super.declareExtensions(extProfile); extProfile.declare( SitemapsFeed.class, ExtensionDescription.getDefaultDescription(SitemapMobile.class)); extProfile.declare( SitemapsFeed.class, ExtensionDescription.getDefaultDescription(SitemapNews.class)); extProfile.declareAdditionalNamespace(Namespaces.WT_NAMESPACE); }
private static ExtensionProfile getExtProfile(BaseEntry<?> entry, boolean isAdapting) { ExtensionProfile extProfile = null; extProfile = new ExtensionProfile(); ((BaseEntry<?>) entry).declareExtensions(extProfile); if (isAdapting) { extProfile.setAutoExtending(true); } return extProfile; }
@Override protected void putAttributes(AttributeGenerator generator) { super.putAttributes(generator); generator.put("name", state, new AttributeHelper.LowerCaseEnumToAttributeValue<State>()); generator.put("reasonCode", reasonCode); generator.put("helpUrl", helpUrl); generator.setContent(description); }
@Override protected void putAttributes(AttributeGenerator generator) { super.putAttributes(generator); if (date != null) { generator.setContent(date.toString()); } }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { super.consumeAttributes(helper); numLikes = helper.consumeInteger(NUM_LIKES, false); numDislikes = helper.consumeInteger(NUM_DISLIKES, false); value = helper.consume(VALUE, false); }
private static ExtensionProfile getExtProfile(BaseFeed<?, ?> feed, boolean isAdapting) { ExtensionProfile extProfile = null; extProfile = new ExtensionProfile(); feed.declareExtensions(extProfile); if (isAdapting) { extProfile.setAutoExtending(true); } return extProfile; } }
@Override protected void visitChildren(ExtensionVisitor ev) throws ExtensionVisitor.StoppedException { // Add nested entries and links to the visitor pattern for (BaseEntry<E> entry : entries) { this.visitChild(ev, entry); } for (Link link : getLinks()) { this.visitChild(ev, link); } super.visitChildren(ev); }
@Override protected void putAttributes(AttributeGenerator generator) { generator.setContent(CRAWLTYPE_ENUM_TO_ATTRIBUTE_VALUE.getAttributeValue( crawlType)); }
@Override protected void putAttributes(AttributeGenerator generator) { super.putAttributes(generator); generator.setContent(videoId); }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { super.consumeAttributes(helper); playlistId = helper.consumeContent(true); } }
@Override public void declareExtensions(ExtensionProfile extProfile) { // Declare arbitrary XML support for the feed instances, so any // extensions not explicitly declared in the profile will be captured. extProfile.declareArbitraryXmlExtension(BaseFeed.class); super.declareExtensions(extProfile); } }
@Override public void processEndElement() throws ParseException { super.processEndElement(); srcState.updated = getDateTime(); } }
@Override public void declareExtensions(ExtensionProfile extProfile) { // Declare the latitude and longitude extensions. extProfile.declare(W3CPoint.class, ExtensionDescription.getDefaultDescription(GeoLat.class)); extProfile.declare(W3CPoint.class, ExtensionDescription.getDefaultDescription(GeoLong.class)); super.declareExtensions(extProfile); }
private static ExtensionProfile getExtProfile(BaseEntry<?> entry, boolean isAdapting) { ExtensionProfile extProfile = null; extProfile = new ExtensionProfile(); ((BaseEntry<?>) entry).declareExtensions(extProfile); if (isAdapting) { extProfile.setAutoExtending(true); } return extProfile; }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { super.consumeAttributes(helper); videoId = helper.consumeContent(true); } }
@Override public void declareExtensions(ExtensionProfile extProfile) { // Declare the latitude and longitude extensions. extProfile.declare(W3CPoint.class, ExtensionDescription.getDefaultDescription(GeoLat.class)); extProfile.declare(W3CPoint.class, ExtensionDescription.getDefaultDescription(GeoLong.class)); super.declareExtensions(extProfile); }