[Yanel-dev] data and data-paths

Evaldas Taroza etaroza at optaros.com
Mon Jan 28 11:39:39 CET 2008


Michael Wechner wrote:
> Evaldas Taroza wrote:
> 
>> Hi,
>> I am creating a node inside the repository programatically. I would 
>> expect that when I do that, the node with a given name is created, 
>> however, what I get is:
>> 1. a 'node' inside data-paths is created
>> 2. inside .yanel-uid this path points to a node with a generated name
> 
> 
> yes, this is how the org.wyona.yarep.impl.repo.fs.FileSystemRepository 
> is working, but please be aware that this is only specific to this 
> implementation.
> 
> You might want to check out other implementations, e.g.
> 
> org.wyona.yarep.impl.repo.vfs.VirtualFileSystemRepository
> 
> whereas a sample configuration can be found at
> 
> https://svn.wyona.com/repos/public/yarep/trunk/src/test/repository/new-vfs-example 
> 
> 
> 
> Btw, you can migrate your data from one implementation to the other by 
> using
> 
> ./build.sh copy-repository -Dcopy.src.repo.id=foo -Dcopy.dest.repo.id=bar
> 
> whereas see
> 
> https://svn.wyona.com/repos/public/yarep/trunk/README.txt
> 

OK, I'll check these resources

>>
>> I understand that this is quite handy when you want to move nodes 
>> around (you only have to change the pointer), but when I need to 
>> navigate my data it is very difficult to find a specific node.
> 
> 
> you mean to debug within the persistent data?

Yes, mainly for debugging. But I guess it will also have a nice side 
effect that enables to edit the repository without UI.

> 
>>
>> I think that generating an id for a node should only be done only when 
>> one tries to insert a node with an existing name.
> 
> 
> I am not sure if I understand. You mean like connections of different 
> data paths with the same data?

No, I mean, when I say do
node.addNode("mynode", "collection")

I would say that <yanel>/data/mynode should be created, instead of 
<yanel>/data/XXXYYYZZZ + <yanel>/data-paths/mynode. Unless 
<yanel>/data/mynode already exists.

Evaldas

> 
> Cheers
> 
> Michi
> 
>>
>> Evaldas
>>
> 
> 


-- 
+41 79 616 53 76
Optaros - www.optaros.com


More information about the Yanel-development mailing list