Metadata Namespaces

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Metadata Namespaces

Grant Ingersoll-2
What do people think of adding some type of namespace to the Metadata  
attributes (Dublin, CC, etc.).   I think this would allow us to  
discern where the metadata came from.  For instance, in Solr, see 

I can see doing this a few different ways:

1. Allow the user to pass in a String that gets prefixed to all  
metadata names, with a constructor like:
  public Metadata(String namespace){
     metadata = new HashMap<String, String[]>();
     this.namespace = namespace;

and then anytime a key is needed, the namespace string is potentially  

2. Prefix the "core" attributes with "tika."

3. Prefix each sub-attribute appropriately, such as "dc.format" for  
the DublinCore Format attribute.

4. Combine 2 and 3.  We could try something a bit more involved to  
have a way to formally define it like tika.dc.format, such that I  
could know that this attribute is core to Tika, from Dublin Core and  
is named Format.  Thus, say Solr adds in it's own parser that for  
whatever reason isn't contrib'ed back to Tika (just an example, I  
don't have anything in mind) I could create it's metadata attribs as or however I want to do it.

The default, I believe, should still be to have no namespace, i.e. the  
empty string namespace.