You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by Bertrand Delacretaz <bd...@apache.org> on 2007/10/10 11:56:11 UTC

Namespacing our Metadata keys?

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

Re: Namespacing our Metadata keys?

Posted by Rida Benjelloun <ri...@doculibre.com>.
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 <kb...@bbsinc.biz>:
>
>
> 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 <bd...@apache.org> wrote:
> >> On 10/10/07, Jukka Zitting <ju...@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
> >
> >
>
> --
> 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
> .
>
>

Re: Namespacing our Metadata keys?

Posted by "Keith R. Bennett" <kb...@bbsinc.biz>.
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 <bd...@apache.org> wrote:
>> On 10/10/07, Jukka Zitting <ju...@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
> 
> 

-- 
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.


Re: Namespacing our Metadata keys?

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On 10/10/07, Jukka Zitting <ju...@gmail.com> wrote:
> Hi,
>
> On 10/10/07, Bertrand Delacretaz <bd...@apache.org> wrote:
> > On 10/10/07, Jukka Zitting <ju...@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.

sounds good

- robert

Re: Namespacing our Metadata keys?

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 10/10/07, Bertrand Delacretaz <bd...@apache.org> wrote:
> On 10/10/07, Jukka Zitting <ju...@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

Re: Namespacing our Metadata keys?

Posted by Bertrand Delacretaz <bd...@apache.org>.
On 10/10/07, Jukka Zitting <ju...@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?

-Bertrand

Re: Namespacing our Metadata keys?

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 10/10/07, Bertrand Delacretaz <bd...@apache.org> 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