Hi,
Since entry.getContent() can return content of various type, you first
need to cast it to TextContent (if you know that the content is of
text type). This is how you print out the text content of a calendar
event -
TextContent content = (TextContent) entry.getContent();
System.out.println(content.getContent().getPlainText());
Hope that helps,
Austin
On Sat, Apr 19, 2008 at 2:12 PM, jcgnu <[EMAIL PROTECTED]> wrote:
>
> Hi again.
>
> I'm trying to get an event's description from Google Calendar in Java,
> which is supposed to be very easy...
>
> Here's what I have...
>
> CalendarEventEntry entry = resultFeed.getEntries().get(i);
>
> Getting the title or dates work fine, but when I do this:
>
> System.out.println("\t" + entry.getContent().getText());
>
> It doesn't even compile. I think it is because getText() is an
> inherited function from a class google.gdata.Text. I downloaded the
> package from the official site and added it to my project. The package
> contains:
>
> gdata-appsforyourdomain-1.0.jar
> gdata-base-1.0.jar
> gdata-calendar-1.0.jar
> gdata-client-1.0.jar
> gdata-codesearch-1.0.jar
> gdata-docs-1.0.jar
> gdata-photos-1.0.jar
> gdata-spreadsheet-1.0.jar
>
> Actually, I only added "base", "client" and "calendar" to the project,
> plus activation.jar and mail.jar.
>
> The google.gdata.Text doesn't appear to be anywhere in those JARs.
>
> How can I print the description, then. Please, any help will be very
> much appreciated!
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Calendar Data API" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---