Thanks for your answer,

I try to use the Repository for storing Files, and especially XML- Files. Unfortunately when importing these XML-Files with WebDav some files are not imported as nt:file/nt:unstructured but in binary from. So I need to convert the files from binary representation to unstructured repo-imported content.
Thats basically what I am trying to do.
Normally I would not have to bother as the xml-mime -type should trigger the web-dav client to import my content as xml content, not binary. But this does not work for all the files I have.

thanks
Eric


Am 02.07.2006 um 07:35 schrieb Jukka Zitting:

Hi,

On 7/1/06, Eric Peukert <[EMAIL PROTECTED]> wrote:
I try to convert a node and its node-type after it was already created.

Does anyone have an idea how that can be achieved?

You can add or remove the mixin types of a node, but you can not
change its primary type. The best way to achieve the what you are
trying to do, is make an in-memory copy of the node content, remove
the node from the workspace, and create a new node with the copied
content but a different primary type.

What is your use case for trying to do this? The primary type is a
fundamental property of a node, even more than its name that can be
changed with Session.move(). You can think of the primary type of a
node as the class of a Java object, i.e. there is no way to change
that short of making a manual copy of the instance.

If this is common use case for you, you might want to consider having
a more generic primary type and using mixin types for dynamic node
typing.

BR,

Jukka Zitting

--
Yukatan - http://yukatan.fi/ - [EMAIL PROTECTED]
Software craftsmanship, JCR consulting, and Java development

Reply via email to