You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by Murray Altheim <mu...@altheim.com> on 2007/12/14 00:13:35 UTC

Metadata Property Values in JCR

Hi,

I'm investigating the metadata capabilities of JCR and I feel I must
be missing something. We currently have a name-value pair for properties,
where both are Strings. With JCR it seems we've expanded the list of
available types to include boolean, Calendar, double, long, InputStream,
String, and int.

While that's an improvement it seems horribly impoverished when dealing
with real live metadata, which even for the simplest stuff is typically
richer than a single property value, e.g., even Dublin Core (one of the
simplest metadata schemas available) often has qualifiers on its values:

    <meta name="DC.subject" xml:lang="en-GB" content="seafood" />

such that storing that (given the 'en-GB' qualifier, just one of many
possibles) would require more than what JCR seems to offer. In my own
work I'm going to for some metadata property values need something akin
to (abstractly):

   (wrapper)
     (URI)
     (URI)
     (URI)
     (URI)
     (double)
   (/wrapper)

and that's still pretty simple by comparison to more typical metadata
schemas (METS, MARC-XML, etc.) where we're really looking at something
as rich as a full hierarchical (e.g., DOM) tree. Without serializing
and storing XML as a String I'm really curious how to go about storing
and accessing real-world metadata using JSR-170.

Janne, you seem to have looked into this enough to work on Priha, so
I'm curious as to what you're thinking on this. I don't think a simple
name-value pair is going to do it, and we'll need (apparently) more
than what JSR-170/java.jcr seem to provide to do any typically-complex
metadata at a content repository level. All I can gather is that there
must be some way of storing an XML object as a metadata container and
I'm missing that. Alternately I suppose a DOM tree or some such thing
but I'd think an XNI API would be more generic. Dunno...

I guess I'm just as surprised as anything, feel like I've not seen
some essential information.

Cheers,

Murray

PS. I also notice there's no build.xml with priha -- are you always
building it within Eclipse? If so, could you share the necessary
Eclipse files? I'm going to start looking into this in earnest in the
new year.

----
References:

   Introducing the Java Content Repository API  [they build a wiki!]
   Learn how JSR-170 makes building CMAs a snap, IBM DeveloperWorks
   http://www.ibm.com/developerworks/java/library/j-jcr/

   JSR-170 Specification
   http://www.jcp.org/en/jsr/detail?id=170

   Apache Jackrabbit
   http://jackrabbit.apache.org/

   JCR 1.0 Java API
   http://www.day.com/maven/jsr170/javadocs/jcr-1.0/

...........................................................................
Murray Altheim <murray07 at altheim.com>                           ===  = =
http://www.altheim.com/murray/                                     = =  ===
SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               = =  = =

       Boundless wind and moon - the eye within eyes,
       Inexhaustible heaven and earth - the light beyond light,
       The willow dark, the flower bright - ten thousand houses,
       Knock at any door - there's one who will respond.
                                       -- The Blue Cliff Record

Re: Metadata Property Values in JCR

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
JSR-170 supports multi-property values.

In addition, JSR-170 supports *only* metadata.  There is no *data* in  
JSR-170.  It's all hierarchical, and you're just looking at the  
ultimate end leaves, since that's ultimately what you will put into  
the tree.

Also, I am... hesitant to agree to the implicit suggestion in your  
email that your requirements would be JSPWiki requirements.

Eclipse builds it all automatically; no scripts, I'm afraid.

/Janne

On 14 Dec 2007, at 01:13, Murray Altheim wrote:

> Hi,
>
> I'm investigating the metadata capabilities of JCR and I feel I must
> be missing something. We currently have a name-value pair for  
> properties,
> where both are Strings. With JCR it seems we've expanded the list of
> available types to include boolean, Calendar, double, long,  
> InputStream,
> String, and int.
>
> While that's an improvement it seems horribly impoverished when  
> dealing
> with real live metadata, which even for the simplest stuff is  
> typically
> richer than a single property value, e.g., even Dublin Core (one of  
> the
> simplest metadata schemas available) often has qualifiers on its  
> values:
>
>    <meta name="DC.subject" xml:lang="en-GB" content="seafood" />
>
> such that storing that (given the 'en-GB' qualifier, just one of many
> possibles) would require more than what JCR seems to offer. In my own
> work I'm going to for some metadata property values need something  
> akin
> to (abstractly):
>
>   (wrapper)
>     (URI)
>     (URI)
>     (URI)
>     (URI)
>     (double)
>   (/wrapper)
>
> and that's still pretty simple by comparison to more typical metadata
> schemas (METS, MARC-XML, etc.) where we're really looking at something
> as rich as a full hierarchical (e.g., DOM) tree. Without serializing
> and storing XML as a String I'm really curious how to go about storing
> and accessing real-world metadata using JSR-170.
>
> Janne, you seem to have looked into this enough to work on Priha, so
> I'm curious as to what you're thinking on this. I don't think a simple
> name-value pair is going to do it, and we'll need (apparently) more
> than what JSR-170/java.jcr seem to provide to do any typically-complex
> metadata at a content repository level. All I can gather is that there
> must be some way of storing an XML object as a metadata container and
> I'm missing that. Alternately I suppose a DOM tree or some such thing
> but I'd think an XNI API would be more generic. Dunno...
>
> I guess I'm just as surprised as anything, feel like I've not seen
> some essential information.
>
> Cheers,
>
> Murray
>
> PS. I also notice there's no build.xml with priha -- are you always
> building it within Eclipse? If so, could you share the necessary
> Eclipse files? I'm going to start looking into this in earnest in the
> new year.
>
> ----
> References:
>
>   Introducing the Java Content Repository API  [they build a wiki!]
>   Learn how JSR-170 makes building CMAs a snap, IBM DeveloperWorks
>   http://www.ibm.com/developerworks/java/library/j-jcr/
>
>   JSR-170 Specification
>   http://www.jcp.org/en/jsr/detail?id=170
>
>   Apache Jackrabbit
>   http://jackrabbit.apache.org/
>
>   JCR 1.0 Java API
>   http://www.day.com/maven/jsr170/javadocs/jcr-1.0/
>
> ...................................................................... 
> .....
> Murray Altheim <murray07 at altheim.com>                            
> ===  = =
> http://www.altheim.com/murray/                                      
> = =  ===
> SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk                
> = =  = =
>
>       Boundless wind and moon - the eye within eyes,
>       Inexhaustible heaven and earth - the light beyond light,
>       The willow dark, the flower bright - ten thousand houses,
>       Knock at any door - there's one who will respond.
>                                       -- The Blue Cliff Record