Project

General

Profile

« Previous | Next » 

Revision 743

Modifications that change the package handling behavior of metacat. Package
membership is now determined by an identifier being used as either the subject
or object in a triple. One can not request arbitrary returndocs -- only
those types that have package information embedded can be "returndoctype"
document types. Right now only one "returndoctype" field can be provided.
This needs to be changed to support multiple potential returndoctype fields.

Packages are now defined by triple elements in the eml-dataset-2.0 module,
and so changes reflect this.

Added a new column (packagetype) to xml_relation that defines the document type
of the package for that record.

In addition, I changed the behavior of metacat queries when "back tracing" is
requested. If a "returndoc" element is present in the pathquery, then the
documents are searched, and any hits are traced back to the package with
which the hit document is linked, if it is of type returndoc. Thus, any
hit returns all of the package documents with which the hit document is
associated. If a hit does not have an associated package, no record is
returned for that hit (this is different from previous metacat behavior).
If no returndoc parameter is provided, all docs are searched and all hits
returned.

A new query parameter was added to pathquery that allows us to filter which
document types are searched (independent of the back tracing feature). If
one or more "filterdoctype" element is included, only documents which are
in that list of types will be searched. If you search for doctype A, but
request that doctype B be returned, only documents of type B that have a
package member of type A and match the search criteria will be returned.

To implement this I had to modify many html files, and change substantial
code in DBQuery, QuerySepcification, and MetaCatServlet.

These changes break the URL handling code that was present previously --
now all identifiers are assumed to be from the metacat system, not in
URL format. This probably needs to be revisited.

View differences:

MetaCatServlet.java
481 481
    String qformat = ((String[])params.get("qformat"))[0];
482 482
    String resultdoc = null;
483 483
    String[] returndoc = null;
484
    if(params.contains("returndoc"))
484
    if(params.contains("returndoctype"))
485 485
    {
486
      returndoc = (String[])params.get("returndoc");
486
      returndoc = (String[])params.get("returndoctype");
487 487
    }
488 488
    
489 489
    Hashtable doclist = runQuery(xmlquery, user, group, returndoc);
......
515 515
  {
516 516
    //create the query and run it
517 517
    String[] returndoc = null;
518
    if(params.containsKey("returndoc"))
518
    if(params.containsKey("returndoctype"))
519 519
    {
520
      returndoc = (String[])params.get("returndoc");
520
      returndoc = (String[])params.get("returndoctype");
521
      if (((String)returndoc[0]).equals("any") ||
522
          ((String)returndoc[0]).equals("ANY") ||
523
          ((String)returndoc[0]).equals("")) {
524
        returndoc = null;
525
      }
521 526
    }
522 527
    String xmlquery = DBQuery.createSQuery(params);
523 528
    Hashtable doclist = runQuery(xmlquery, user, group, returndoc);

Also available in: Unified diff