Changeset 12251


Ignore:
Timestamp:
2006-07-19T15:24:02+12:00 (18 years ago)
Author:
kjdon
Message:

added a getElement method, and removed the Custom methods - can no longer have custom args

File:
1 edited

Legend:

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

    r11344 r12251  
    191191    }
    192192
     193    public Element getElement() {
     194    return element;
     195    }
    193196    /** Retrieve the upper bound of a range based argument.
    194197     * @return the maximum as an int
     
    269272    }
    270273
    271     /** Determine if this is a custom argument ie one that has been parsed from the config file but doesn't have a matching entry in the argument library.
    272      * @return true if this argument is a custom, false otherwise
    273      * @see org.greenstone.gatherer.util.StaticStrings#CUSTOM_ATTRIBUTE
    274      * @see org.greenstone.gatherer.util.StaticStrings#TRUE_STR
    275      */
    276     public boolean isCustomArgument() {
    277     return (element != null && element.getAttribute(StaticStrings.CUSTOM_ATTRIBUTE).equals(StaticStrings.TRUE_STR));
    278     }
    279 
    280274    /** Determine if this argument is hidden in GLI
    281275     * @return true if the argument is hidden, false otherwise
     
    301295    if(element != null) {
    302296        element.setAttribute(StaticStrings.ASSIGNED_ATTRIBUTE, (assigned ? StaticStrings.TRUE_STR : StaticStrings.FALSE_STR));
    303     }
    304     }
    305 
    306     /** Set the custom argument flag.
    307      * @param custom true to make this argument custom, false otherwise
    308      * @see org.greenstone.gatherer.util.StaticStrings#CUSTOM_ATTRIBUTE
    309      * @see org.greenstone.gatherer.util.StaticStrings#FALSE_STR
    310      * @see org.greenstone.gatherer.util.StaticStrings#TRUE_STR
    311      */
    312     public void setCustomArgument(boolean custom) {
    313     if(element != null) {
    314         element.setAttribute(StaticStrings.CUSTOM_ATTRIBUTE, (custom ? StaticStrings.TRUE_STR : StaticStrings.FALSE_STR));
    315297    }
    316298    }
Note: See TracChangeset for help on using the changeset viewer.