Changeset 4553


Ignore:
Timestamp:
2003-06-11T13:37:06+12:00 (21 years ago)
Author:
kjdon
Message:

have a new toStringConfig method that returns the config file format - metadata should have the ex. namespace

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/cdm/Classifier.java

    r4366 r4553  
    241241    this.super_classifier = super_classifier;
    242242    }
    243     /** Method to print out this classifier as it would appear as a command within the collection configuration file.
     243    /** Method to print out this classifier as it would appear to the user in the interface
    244244      * @return A <strong>String</strong> containing a single classifier command.
    245245      */
     
    261261    return text.toString();
    262262    }
     263    /** Method to print out this classifier as it would appear as a command within the collection configuration file.
     264      * @return A <strong>String</strong> containing a single classifier command.
     265      */
     266    public String toStringConfig() {
     267    StringBuffer text = new StringBuffer("classify ");
     268    text.append(name);
     269    text.append(" ");
     270    ArrayList arguments = getArguments();
     271    for(int i = 0; i < arguments.size(); i++) {
     272        Argument argument = (Argument)arguments.get(i);
     273        if(argument.isAssigned()) {
     274        text.append(argument.toStringConfig());
     275        text.append(" ");
     276        }
     277    }
     278    if(custom != null) {
     279        text.append(custom);
     280    }
     281    return text.toString();
     282    }
    263283}
    264284
Note: See TracChangeset for help on using the changeset viewer.