o.meta["author"] = ...
o.meta.author = ...
would be thus accepted.
Cheers,
--
John Mettraux -///- http://jmettraux.openwfe.org
node.meta.author => nil
or
node.meta => exception
for now we could state that the Pikas grant an empty meta hash...
About Pikas and Connectors, I think that they are the same thing.
The BasePika could be inherited by all Pika and it would contain the
default [cascading] behaviours. The BasePika could be the HashPika.
Nodes could be whatever instance + meta.
楽しみ,
OK for the optional meta, makes sense.
> Completely agree on Pilkabase and Pikash.
>
> "Nodes could be whatever instance + meta". what do you mean ? an instance of
> node right ?
Do you think we need a Node class ? Maybe in some cases. An array of
byte could be a Node, a String, an Integer,... Could we use a Hash as
a Node "a la" JCR ? And a list for "directory nodes" ?
Maybe my vocabulary is dead wrong, I should say :
leaf = whatever
non-leaf node = node type / directory (an extension of array ?)
wdyt ?
John
Could we access the tree like Hapricot does ?
The thing is that I am not sure we know where the root is.
> Maybe my vocabulary is dead wrong, I should say :
> leaf = whatever
> non-leaf node = node type / directory (an extension of array ?)
there is no distinction between nodes and directory nodes (again, in
the rabbit).
A node is a leaf if list_children returns empty.
Maybe a good discussion would be to try to identify how a node is
defined in a flickr connector ?
How:
- access it
- copy,move,delete it (change the structure)
- change some of its metadata
- change its value
- query to find the node
A flickr node could be an image:
- with the different size resolutions
- with the comments and other metadata
or it could be something completely different.
Niko,
You're right.
node.meta
node.children
?
> Maybe a good discussion would be to try to identify how a node is
> defined in a flickr connector ?
> How:
> - access it
n = pica.lookup(path)
puts n.meta.type # => "FlickRsomething"
> - copy,move,delete it (change the structure)
pica.cp x, y
pica.mv ...
pica.rm ...
> - change some of its metadata
n = pica.lookup path
n.meta.author = "toto"
n.save # or
pica.write / update / save n
> - change its value
> - query to find the node
nodes = pica.find do |n|
n.meta.type == "whatever"
end
> A flickr node could be an image:
> - with the different size resolutions
> - with the comments and other metadata
> or it could be something completely different.
Sounds cool.
楽し