Nils Weinander wrote:
> What am I doing wrong when api-m addDatastream always
> fails with
>
> fedora.server.errors.GeneralException: Error with null
To try and answer my own question, the code in
DefaultManagement.java indicates that I cannot
add an empty data stream.
if (controlGroup.equals("X")) {
ds = new DatastreamXMLMetadata();
ds.DSInfoType = ""; // field is now deprecated
try {
InputStream in;
MIMETypedStream mimeTypedStream = null;
if
(dsLocation.startsWith(DatastreamManagedContent.UPLOADED_SCHEME)) {
in = getTempStream(dsLocation);
} else {
mimeTypedStream =
m_contentManager.getExternalContent(dsLocation,
context);
in = mimeTypedStream.getStream();
}
((DatastreamXMLMetadata) ds).xmlContent =
getEmbeddableXML(in);
that is, dsLocation should be used even though
this is an X data stream, not M or R. Is that correct?
If so, is there an API to create a resource with
DatastreamManagedContent.UPLOADED_SCHEME which I can refer
to?
If not that, how are you supposed to go about to add a
new datastream to an existing object?
--
Nils Weinander | Systems Designer
Phone +46 (0)8 410 064 56
Mobile +46 (0)70 978 28 37
--
Curalia AB | www.curalia.se
Västmannagatan 15, 111 24 Stockholm, Sweden
--
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users