Opened 14 years ago

Closed 14 years ago

#1 closed task (fixed)

MDRepository provide collections list

Reported by: vronk Owned by: ljo
Priority: major Milestone:
Component: MDRepository Version:
Keywords: collections Cc:

Description

MDRepository has to list the hierarchy of available collections.

Collections are defined as MD-records linking to other MD-records (think 'folder'), thus the hierarchy is constituted by linking in: ResourceProxy[ResourceType='Metadata']:

<ResourceProxy id="d71803e14">
  <ResourceType>Metadata</ResourceType> 
  <ResourceRef>../dobes_data/Corpusstructure/dobes.imdi.cmdi</ResourceRef>         
</ResourceProxy>

The link (ResourceRef) being a path to appropriate MD-records in the data. In the current test-data set the collection-MD-records are in the respective Corpusstructure folders.

So MDRepository needs to build up an index (tree) of this structure (as it seems way to expensive and unnecessary to traverse the hierarchy on every request) and provide this on the agreed upon interface:

 ?operation=getCollections&collection={collection-path}[&maxdepth={number}]

Here is a proposal of the XML-structure:
source:MDService2/trunk/MDService2/testdata/collections_extract_lv3.xml
There is unfortunately no schema for that yet, but it is also subject for discussions. However this proposal is newer (=?better) than what MDRepository currently offers on that interface. In any case we need the hierarchical structure reflected in the xml and the counts.

MDService currently serves it's own static snapshot of the collection-tree, derived directly from the folder-structure! This is just a temporary workaround. Although the collection-hierarchy is to large extent parallel to the folder-structure in the test-dataset, the correct way is clearly defined and there we need to go.

It should be yet discussed how to arrange the top level. One sensible option seems to put every provider as a separate top-level-node.

(This probably should find way into the documentation as well.)

Change History (5)

comment:1 Changed 14 years ago by ljo

Owner: changed from Leif-Jöran to ljo
Status: newassigned

comment:2 Changed 14 years ago by ljo

Status: assignedaccepted

Checking clarin-svn/MDService2/trunk/MDService2/src/xsl/collection2view.xsl to see what is counted in the example.

So if ResourceProxy?[ResourceType?='Metadata']/ResourceRef? is the collection, what can we assume about the collection name?

How is the relation to CorpusLink??

comment:3 Changed 14 years ago by ljo

Currently only four collections are on top level. Is it only those that should be present in the listing then?

comment:4 in reply to:  3 Changed 14 years ago by ljo

Replying to ljo:

Currently only four collections are on top level. Is it only those that should be present in the listing then?

There are actually 6 collections on top level.

comment:5 Changed 14 years ago by ljo

Resolution: fixed
Status: acceptedclosed

There are a lot of UNKNOWNs with maxdepth > 2 when using CorpusName as collection name, so this needs to be resolved. But it basically works according to sketch now.

Note: See TracTickets for help on using tickets.