Changeset 6676


Ignore:
Timestamp:
2004-02-02T11:24:52+13:00 (20 years ago)
Author:
nzdl
Message:

moved the separator string constants to GSConstants

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2Retrieve.java

    r6275 r6676  
    763763    }
    764764
    765     protected final char RELATION_SEP_CHAR = '_';
    766     protected final String  SEPARATOR_SEP_STRING = "'";
    767    
    768765    protected String getMetadata(String node_id, DBInfo info,
    769766                 String metadata) {
     
    771768    String relation = "";
    772769    String separator = ", ";
    773     int pos = metadata.indexOf(RELATION_SEP_CHAR);
     770    int pos = metadata.indexOf(GSConstants.META_RELATION_SEP);
    774771    if (pos ==-1) {
    775772        // just a plain meta entry eg dc.Title
     
    782779    if (temp.equals("all")) {
    783780        multiple=true;     
    784         pos = metadata.indexOf(RELATION_SEP_CHAR);
     781        pos = metadata.indexOf(GSConstants.META_RELATION_SEP);
    785782        if (pos ==-1) {
    786783        temp = "";
     
    794791    if (temp.equals("parent") || temp.equals("root") || temp.equals( "ancestors")) { // "current" "siblings" "children" "descendents"
    795792        relation = temp;
    796         pos = metadata.indexOf(RELATION_SEP_CHAR);
     793        pos = metadata.indexOf(GSConstants.META_RELATION_SEP);
    797794        if (pos == -1) {
    798795        temp = "";
     
    804801   
    805802    // now look for separator info
    806     if (temp.startsWith(SEPARATOR_SEP_STRING) && temp.endsWith(SEPARATOR_SEP_STRING)) {
     803    if (temp.startsWith(GSConstants.META_SEPARATOR_SEP) && temp.endsWith(GSConstants.META_SEPARATOR_SEP)) {
    807804        separator = temp.substring(1, temp.length()-1);
    808805       
     
    877874        relation_id = OID.getParent(current_id);
    878875    }
    879    
    880876    return result.toString();
    881877    }
Note: See TracChangeset for help on using the changeset viewer.