Hi

I am attempting to create a Link between a Category Node and another Node
using the following code.
It all seems to execute OK but no link is being created.
I have stepped through it in debug to check that I am accessing the right
nodes and everything looks to be fine.

accessToken.begin();
ObjectNode categoryNode = structure.retrieve(slideToken, categoryPath);
ObjectNode itemNode = structure.retrieve(slideToken, itemPath);
LinkNode linkNode = new LinkNode(itemNode.getUri());
categoryNode.addLink(linkNode);
accessToken.commit();

I have also tried calling the structure.createLink() method but have got the
same result.

I am using TxXMLFileDescriptorsStore and expected to see a link element
added to the XML file for the Category node.

Am I missing something or is this a bug ?

regards

Andy

-----Original Message-----
From: Stefan L�tzkendorf [mailto:[EMAIL PROTECTED]
Sent: 06 October 2004 15:07
To: Slide Users Mailing List
Subject: Re: Difference between Links & Bindings ?


Andy Bowes wrote:

> Thanks Stefan that helps a lot.
> 
> We are not looking to use a WebDav client so we are free to choose
whichever
> mechanism makes our life simpler.
> 
> If I use LinkNodes rather than Bindings are these 'dangling' links removed
> if you perform the delete via the org.apache.slide.macro.Macro class ? 
I don't know, must have a look at it.
> 
> Can LinkNodes also be accessed via a URI ?  For example if I link a node
> '/guys/fred' as 'ford' below '/mechanics/byBrand' can it be accessed via
> '/mechanics/byBrand/ford' ?
Yes, that should work.
> 
> regards
> 
> Andy
>  
> 
> -----Original Message-----
> From: Stefan L�tzkendorf [mailto:[EMAIL PROTECTED]
> Sent: 06 October 2004 13:49
> To: Slide Users Mailing List
> Subject: Re: Difference between Links & Bindings ?
> 
> 
> Some differents are
> 
> - With bindings for each resource is an unique uri is created (some
>    thing like /19832093810928301) and this resource is than bound in to
>    arbitrary collections as a member.
>    e.g. the resource with the given uuri may be the member fred in the
>    collection /guys and thats why have one url /guys/fred. but the same
>    resource can have the name ford in the collection /mechanics/byBrand
>    and so have a second uri /mechanics/byBrand/ford.
>    if you remove any of these urls not the resource is deleted, but only
>    the binding. If the last binding is deleted than the resource is
deleted
>    to.
> 
> - With LinkNodes you have a 'primary' resource to which other nodes
>    are linked. May be you have a resource (node) with url /guys/fred and
>    you create a lnk node /mechanics/byBrand/ford. Than you have two
>    nodes of differend kind, if you delete the primary resource, the links
>    are dangling and must be deleted.
> 
> - Bindings can be created by clients via webdav Methods BIND, UNBIND,
REBIND
>    but LinkNodes can not be created by the client.
> 
> Hope this helps,
> Stefan
> 
> Andy Bowes wrote:
> 
> 
>>Hi Guys
>>
>>Is there anywhere that describes the differences between LinkNodes and
>>Bindings and also provides an overview on when each of these techniques
>>should be used ?
>>
>>regards
>>
>>Andy Bowes
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
> 
> 

-- 
Stefan L�tzkendorf  -- [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to