jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Handling namespace mapppings
Date Thu, 29 Mar 2012 17:20:01 GMT
Hi,

I started drafting how namespace handling might look like in oak-jcr.
See [1] for my initial draft based on the Oak API as it currently
exists.

Basically my idea is to have the namespace registry stored in some
system location (like /:system/ns) and accessed over the standard Oak
API.

Some issues / ideas that came up:

* I'm assuming that the Connection is per-repository. If it isn't, we
need some other way to access repository-global data.

* Should we have a refresh() method on Connection that updates the
getCurrentRoot() value or should the return value always reflect the
latest state of the underlying repository? If the latter, we need some
place in oak-jcr that keeps track of the current state of the
repository as seen by a specific JCR Session.

* The NodeState interface in oak-mk explicitly doesn't understand
anything about paths. Perhaps we should have a separate interface in
the Oak API that does understand paths and can resolve them. Or
perhaps have a utility class for dealing with path resolution? That
would make the code in getRegistry() much simpler.

* The property.getScalar().getString() pattern quickly becomes
cumbersome. A property.getString() method would be more convenient,
especially if it also automatically deals with type conversion and has
some reasonable default interpretation for multivalued properties
(like returning just the first value or a concatenation of all
values).

* Do we want to deal with node types at this level, or should we
simply declare that any nodes without an explicit "jcr:primaryType"
property should be treated as if they were "nt:unstructured"? Not
having to explicitly store typing information in such cases would save
space and make things more convenient for many use cases (no need to
explicitly exclude type information).

[1] https://github.com/jukka/jackrabbit-oak/blob/7908756ec741a4ba331f174eb11e9c32be791324/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/OakNamespaceRegistry.java


BR,

Jukka Zitting

Mime
View raw message