Ignore:
Timestamp:
2012-06-21T17:42:41+12:00 (12 years ago)
Author:
ak19
Message:

Asking for a piece of metadata like dc.Creator returns all values for dc.Creator. So multiple=true is always the case by default. No multiple=false was defined. Moreover, there was no way of getting a single value, which was the default in GS2 and which returned the first value for the requested metadata. Now multiple is no longer used, as all values are (still) returned by default. Instead the pos attribute has been introduced, which can be the terms first or last, or else it can be a number representing which value for that metadata needs to be returned.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/Action.java

    r25635 r25805  
    106106            Element elem = (Element) metadata_nodes.item(i);
    107107            StringBuffer metadata = new StringBuffer();
    108             String all = elem.getAttribute("multiple");
     108            String pos = elem.getAttribute("pos");
    109109            String name = elem.getAttribute("name");
    110110            String select = elem.getAttribute("select");
    111111            String sep = elem.getAttribute("separator");
    112             if (all.equals("true"))
    113             {
    114                 metadata.append("all");
     112            if (!pos.equals(""))
     113            {
     114                metadata.append("pos"+pos); // first, last or indexing number
    115115                metadata.append(GSConstants.META_RELATION_SEP);
    116116            }
Note: See TracChangeset for help on using the changeset viewer.