abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Moseley" <...@osafoundation.org>
Subject problems setting entry content
Date Sat, 31 Mar 2007 01:45:20 GMT
i'm having all sorts of problems setting the content on an entry.

i'll preface the problem statement by saying that i'm using the
0.2.0-incubating-SNAPSHOT build that's in the
<http://people.apache.org/repo/m2-snapshot-repository/> repository. i
tried to build from source (r524345) but got tons of build errors
about IRISyntaxException and package org.apache.abdera.i18n.iri not
existing.

the content i want to set is of type "application/eim+xml". i've tried
various permutations of Entry.setContent(). here's what happens.

setting content as String
==================

String content = "foo";
entry.setContent(content);

entry.getContent() returns "foo", but when i output the entry
document, the content's media type is "text/xml", which is obviously
not what i want.

setting content as String with type
=========================

String content = "foo";
entry.setContent(content, "application/eim+xml");

after doing this, entry.getContent() returns null instead of "foo",
and when i output the entry document, the content element is empty
(tho it has the correct type).

setting content as Content
===================

Content content = factory.newContent();
content.setValue("foo");
content.setMimeType("application/eim+xml");
entry.setContent(content);

after doing this, entry.getContent() returns "foo", but when i output
the entry document, there's a content element with type
"application/xml" wrapped around my content element with type
"application/eim+xml", and my content has been escaped.

setting content as Content with type
==========================

Content content = factory.newContent();
content.setValue("foo");
content.setMimeType("application/eim+xml");
entry.setContent(content, "application/eim+xml");

after doing this, entry.getContent() returns null, and when i ouput
the entry document, the content element is empty (but once again has
the correct type).

any ideas?

Mime
View raw message