[
https://issues.apache.org/jira/browse/ABDERA-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586093#action_12586093
]
Joseph Pecoraro commented on ABDERA-143:
----------------------------------------
Sounds good. Thanks!
> isDraft(), isControl(), and getSimpleExtension() do not seem to work
> --------------------------------------------------------------------
>
> Key: ABDERA-143
> URL: https://issues.apache.org/jira/browse/ABDERA-143
> Project: Abdera
> Issue Type: Bug
> Affects Versions: 0.2.2
> Environment: Windows XP Abdera 0.2.2
> Reporter: Joseph Pecoraro
> Fix For: 0.2.2
>
>
> Given an Entry typed Object I cannot seem to access the <app:control> element
> at all to see if it contains <app:draft>.
> Note: This works perfectly in Abdera 0.3.
> Example Feed: [exactly like the feed I'm parsing]
> <?xml version="1.0" encoding="UTF-8"?><feed xml:lang="en-US"
> xmlns:xml="http://www.w3.org/XML/1998/namespace"
> xmlns="http://www.w3.org/2005/Atom"><title type="text">From Joe's
> Moleskin</title><id>http://blogs.tap.ibm.com/weblogs/services/atom/jjpecora/entries</id><link
> href="http://blogs.tap.ibm.com/weblogs/jjpecora" rel="alternate"
> type="text/html"></link><link
> href="http://blogs.tap.ibm.com/weblogs/services/atom/jjpecora/entries"
> rel="self"
> type="application/atom+xml"></link><updated>2008-04-03T13:37:23.000Z</updated><entry
> xml:lang="en-US" xmlns:xml="http://www.w3.org/XML/1998/namespace"
> xmlns:app="http://www.w3.org/2007/app"><id>http://blogs.tap.ibm.com/weblogs/jjpecora/entry/draft</id><link
> href="http://blogs.tap.ibm.com/weblogs/jjpecora/entry/draft" rel="alternate"
> type="text/html"></link><link
> href="http://blogs.tap.ibm.com/weblogs/services/atom/jjpecora/entries/1B1G092D7C365E5796A4987CE9FD5D001AA0"
> rel="edit" type="application/atom+xml"></link><title
> type="text">##DRAFT##</title><updated>2008-04-03T13:37:23.000Z</updated><app:edited
>
> xmlns:app="http://www.w3.org/2007/app">2008-04-03T13:37:23.000Z</app:edited><author><name>Joseph
> J. Pecoraro</name><email>[EMAIL PROTECTED]</email></author><category
> term="draft"></category><app:control xmlns:app="http://www.w3.org/2007/app"
> xmlns:snx="http://www.ibm.com/xmlns/prod/sn"><app:draft
> xmlns:app="http://www.w3.org/2007/app">yes</app:draft><snx:comments
> enabled="yes" days="0"
> xmlns:snx="http://www.ibm.com/xmlns/prod/sn"></snx:comments></app:control><content
> type="html">This is a draft.&nbsp; It should not be
> published.&nbsp;<br></content></entry></feed>
> Example Code: [assuming p_feed holds the above]
> // Linear walk through the entries
> Iterator l_iter = p_feed.getEntries().iterator();
> while (l_iter.hasNext()) {
> // isDraft()
> Entry l_entry = (Entry) l_iter.next();
> boolean b = l_entry.isDraft();
> System.out.println("Entry: " + l_entry.getTitle() + "
> is a draft? " + b); // ## ALWAYS FALSE ##
> // getControl
> Control c = l_entry.getControl();
> if ( c != null ) {
> // ## NEVER MAKES IT HERE ##
> QName l_qname = new
> QName("http://www.w3.org/2007/app", "draft", "app");
> String str = c.getSimpleExtension(l_qname);
> System.out.println(str);
> }
>
> // getSimpleExtension
> QName l_qname = new QName("http://www.w3.org/2007/app",
> "control", "app");
> String str = l_entry.getSimpleExtension(l_qname);
> // ## EMPTY STRING ##
> System.out.println(str);
> }
> More Information:
> Again this exact same code works in Abdera 0.3, where isDraft() is awesome!
> I have not tested any other QName / getSimpleExtensions for any other
> elements at the moment. It could be that getSimpleExtension does not work
> across the board. I have not found any information about a problem like this
> searching the bug reports and developer information.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.