Namespacing our Metadata keys?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Namespacing our Metadata keys?

Bertrand Delacretaz-2
Currently our metadata keys are simple strings, like in the DublinCore
interface:

  String FORMAT = "format";

I'd suggest prefixing those names to avoid collisions later on:

  String FORMAT = "org.dublincore.format";

WDYT?

If we agree, I volunteer to make the necessary changes (did I really
say this? ;-)

-Bertrand
Reply | Threaded
Open this post in threaded view
|

Re: Namespacing our Metadata keys?

Jukka Zitting
Hi,

On 10/10/07, Bertrand Delacretaz <[hidden email]> wrote:
> Currently our metadata keys are simple strings, like in the DublinCore
> interface:
>
>   String FORMAT = "format";
>
> I'd suggest prefixing those names to avoid collisions later on:
>
>   String FORMAT = "org.dublincore.format";

Good idea.

Alternatively, should we use separate namespace URIs to identify the
namespace of a metadata key? That would make it easier to integrate
with various XML processing tools.

BR,

Jukka Zitting
Reply | Threaded
Open this post in threaded view
|

Re: Namespacing our Metadata keys?

Bertrand Delacretaz-2
On 10/10/07, Jukka Zitting <[hidden email]> wrote:

> ...Alternatively, should we use separate namespace URIs to identify the
> namespace of a metadata key? That would make it easier to integrate
> with various XML processing tools....

Not sure what you mean by that, could you give an example?

-Bertrand
Reply | Threaded
Open this post in threaded view
|

Re: Namespacing our Metadata keys?

Jukka Zitting
Hi,

On 10/10/07, Bertrand Delacretaz <[hidden email]> wrote:
> On 10/10/07, Jukka Zitting <[hidden email]> wrote:
> > ...Alternatively, should we use separate namespace URIs to identify the
> > namespace of a metadata key? That would make it easier to integrate
> > with various XML processing tools....
>
> Not sure what you mean by that, could you give an example?

Something like this:

    // Set Dublin Core title
    metadata.set("http://purl.org/dc/elements/1.1/", "title", title);
    // Set OpenDocument keywords
    metadata.set(
        "urn:oasis:names:tc:opendocument:xmlns:meta:1.0",
        "keywords", keywords);

Of course with appropriate namespace constants in place.

BR,

Jukka Zitting
Reply | Threaded
Open this post in threaded view
|

Re: Namespacing our Metadata keys?

robert burrell donkin-2
On 10/10/07, Jukka Zitting <[hidden email]> wrote:

> Hi,
>
> On 10/10/07, Bertrand Delacretaz <[hidden email]> wrote:
> > On 10/10/07, Jukka Zitting <[hidden email]> wrote:
> > > ...Alternatively, should we use separate namespace URIs to identify the
> > > namespace of a metadata key? That would make it easier to integrate
> > > with various XML processing tools....
> >
> > Not sure what you mean by that, could you give an example?
>
> Something like this:
>
>     // Set Dublin Core title
>     metadata.set("http://purl.org/dc/elements/1.1/", "title", title);
>     // Set OpenDocument keywords
>     metadata.set(
>         "urn:oasis:names:tc:opendocument:xmlns:meta:1.0",
>         "keywords", keywords);
>
> Of course with appropriate namespace constants in place.

sounds good

- robert
Reply | Threaded
Open this post in threaded view
|

Re: Namespacing our Metadata keys?

Keith R. Bennett
In reply to this post by Jukka Zitting
So our Metadata object would have a map whose key was a composite of the namespace and the name?

- Keith


Jukka Zitting wrote
Hi,

On 10/10/07, Bertrand Delacretaz <bdelacretaz@apache.org> wrote:
> On 10/10/07, Jukka Zitting <jukka.zitting@gmail.com> wrote:
> > ...Alternatively, should we use separate namespace URIs to identify the
> > namespace of a metadata key? That would make it easier to integrate
> > with various XML processing tools....
>
> Not sure what you mean by that, could you give an example?

Something like this:

    // Set Dublin Core title
    metadata.set("http://purl.org/dc/elements/1.1/", "title", title);
    // Set OpenDocument keywords
    metadata.set(
        "urn:oasis:names:tc:opendocument:xmlns:meta:1.0",
        "keywords", keywords);

Of course with appropriate namespace constants in place.

BR,

Jukka Zitting
Reply | Threaded
Open this post in threaded view
|

Re: Namespacing our Metadata keys?

Rida Benjelloun
Hi,
We also can use namespace prefix for the element name (dc:title):
Example :
// Set Dublin Core title
 metadata.set("http://purl.org/dc/elements/1.1/", "dc:title", title);
 // Set OpenDocument keywords
 metadata.set(
      "urn:oasis:names:tc:opendocument:xmlns:meta:1.0",
         "dc:keywords", keywords);
Regards.

2007/10/10, Keith R. Bennett <[hidden email]>:

>
>
> So our Metadata object would have a map whose key was a composite of the
> namespace and the name?
>
> - Keith
>
>
>
> Jukka Zitting wrote:
> >
> > Hi,
> >
> > On 10/10/07, Bertrand Delacretaz <[hidden email]> wrote:
> >> On 10/10/07, Jukka Zitting <[hidden email]> wrote:
> >> > ...Alternatively, should we use separate namespace URIs to identify
> the
> >> > namespace of a metadata key? That would make it easier to integrate
> >> > with various XML processing tools....
> >>
> >> Not sure what you mean by that, could you give an example?
> >
> > Something like this:
> >
> >     // Set Dublin Core title
> >     metadata.set("http://purl.org/dc/elements/1.1/", "title", title);
> >     // Set OpenDocument keywords
> >     metadata.set(
> >         "urn:oasis:names:tc:opendocument:xmlns:meta:1.0",
> >         "keywords", keywords);
> >
> > Of course with appropriate namespace constants in place.
> >
> > BR,
> >
> > Jukka Zitting
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Namespacing-our-Metadata-keys--tf4599760.html#a13136603
> Sent from the Apache Tika - Development mailing list archive at Nabble.com
> .
>
>