Changeset 4583 for trunk


Ignore:
Timestamp:
2003-06-11T16:38:56+12:00 (21 years ago)
Author:
kjdon
Message:

properly indented the comments

File:
1 edited

Legend:

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

    r4579 r4583  
    124124    }
    125125    /** A method to add a new subcollection, by specifying its name, metadata element if applicable and Perl expression to filter pages into or out of this collection.
    126       * @param name A <>>String</>> which is a unique identifier of a subcollection.
    127       * @param include A <i>boolean</i> indicating whether this is an inclusion filter (<i>true</i>) or an exclusion one (<i>false</i>).
    128       * @param element An <>>Element</>> which is either the metadata whose value should be matched against the given expression, or <i>null</i> if you wish to match against the file name.
    129       * @param exp A <>>String</>> containing a Perl expression which is used as the filter for this subcollection.
    130       * @param flags A <strong>String<strong> listing any special flags to be applied when matching the expression.
    131       * @return A <i>boolean</i> with a value of <i>true</i> if the addition was successful.
    132         * @see org.greenstone.gatherer.cdm.Subcollection
    133       */
     126     * @param name A <>>String</>> which is a unique identifier of a subcollection.
     127     * @param include A <i>boolean</i> indicating whether this is an inclusion filter (<i>true</i>) or an exclusion one (<i>false</i>).
     128     * @param element An <>>Element</>> which is either the metadata whose value should be matched against the given expression, or <i>null</i> if you wish to match against the file name.
     129     * @param exp A <>>String</>> containing a Perl expression which is used as the filter for this subcollection.
     130     * @param flags A <strong>String<strong> listing any special flags to be applied when matching the expression.
     131     * @return A <i>boolean</i> with a value of <i>true</i> if the addition was successful.
     132     * @see org.greenstone.gatherer.cdm.Subcollection
     133     */
    134134    public boolean addSubcollection(String name, boolean include, String element, String exp, String flags) {
    135135    Subcollection sub = null;
     
    143143    }
    144144    /** Refresh all derived components using this manager as a model.
    145     */
     145     */
    146146    public void changed() {
    147147    fireContentsChanged(this, 0, getSize() - 1);
    148148    }
    149149    /** Method to retrieve the controls for this manager.
    150       * @return A <Strong>Control</strong> object which contains the controls used to edit the subcollection data.
    151       */
     150     * @return A <Strong>Control</strong> object which contains the controls used to edit the subcollection data.
     151     */
    152152    public Control getControls() {
    153153    if(controls == null) {
     
    163163    }
    164164    /** Method to retrieve a certain subcollection by its name.
    165       * @param name A <strong>String</strong> which is used as the key for finding the matching subcollection.
    166       * @return The requested <strong>Subcollection</strong> or <i>null</i> if no such subcollection exists.
    167       */
     165     * @param name A <strong>String</strong> which is used as the key for finding the matching subcollection.
     166     * @return The requested <strong>Subcollection</strong> or <i>null</i> if no such subcollection exists.
     167     */
    168168    public Subcollection getSubcollection(String name) {
    169169    return (Subcollection) subcollections.get(name);
     
    185185
    186186    /** Method to get all of the subindexes set.
    187       * @return A <strong>SubIndexes</strong> object containing all the defined indexes.
    188       */
     187     * @return A <strong>SubIndexes</strong> object containing all the defined indexes.
     188     */
    189189    public SubIndexes getSubIndexes() {
    190190    return subindexes;
    191191    }
    192192    /** Method to get all of the subcollections defined.
    193       * @return A <strong>Vector</strong> of subcollections.
    194       */
     193     * @return A <strong>Vector</strong> of subcollections.
     194     */
    195195    public Vector getSubcollections() {
    196196    Vector subcollections = new Vector();
     
    201201    }
    202202    /** Mark the current controls, if any, as invalid and deallocate them. Any further use of the controls will requires them being rebuilt.
    203     * @see org.greenstone.gatherer.cdm.SubcollectionManager.Control
    204     */
     203     * @see org.greenstone.gatherer.cdm.SubcollectionManager.Control
     204     */
    205205    public void invalidateControls() {
    206206    if(controls != null) {
     
    210210    }
    211211    /** This method attempts to parse a subcollection related command from the given command string. If such a string is successfully parsed, it is immediately added to the data within this collection.
    212       * @param command The <strong>String</strong> to be parsed.
    213       * @param finished This <i>boolean</i> is usually <i>false</i> when called, unless this parse call is being made -after- the entire collection configuration file has been read in in which case it is <i>true</i>.
    214       * @return A <i>boolean</i> which is <i>true</i> if a command was parsed, <i>false</i> otherwise.
    215       * @see org.greenstone.gatherer.cdm.CommandTokenizer
    216       * @see org.greenstone.gatherer.cdm.DefaultSubIndex
    217       * @see org.greenstone.gatherer.cdm.Subcollection
    218       * @see org.greenstone.gatherer.cdm.SubIndex
    219       */
     212     * @param command The <strong>String</strong> to be parsed.
     213     * @param finished This <i>boolean</i> is usually <i>false</i> when called, unless this parse call is being made -after- the entire collection configuration file has been read in in which case it is <i>true</i>.
     214     * @return A <i>boolean</i> which is <i>true</i> if a command was parsed, <i>false</i> otherwise.
     215     * @see org.greenstone.gatherer.cdm.CommandTokenizer
     216     * @see org.greenstone.gatherer.cdm.DefaultSubIndex
     217     * @see org.greenstone.gatherer.cdm.Subcollection
     218     * @see org.greenstone.gatherer.cdm.SubIndex
     219     */
    220220    public boolean parse(String command, boolean finished) {
    221221    String temp = command.toLowerCase();
     
    683683
    684684    /** Method to unregister any listeners to avoid memory leaks.
    685             */
     685     */
    686686    public void destroy() {
    687687    }
     
    726726    private class AddListener
    727727        implements ActionListener {
    728                 /** Any implementation of ActionListener must include this method so we can be informed when an action has been performed on one of our target controls. In this case we wish to retrieve information from the various edit controls, and if we have sufficient data to build a new subcollection do so.
    729                 * @param event An <strong>ActionEvent</strong> containing information about the event.
    730                 * @see org.greenstone.gatherer.cdm.Subcollection
    731                 * @see org.greenstone.gatherer.msm.ElementWrapper
    732                 */
     728        /** Any implementation of ActionListener must include this method so we can be informed when an action has been performed on one of our target controls. In this case we wish to retrieve information from the various edit controls, and if we have sufficient data to build a new subcollection do so.
     729        * @param event An <strong>ActionEvent</strong> containing information about the event.
     730        * @see org.greenstone.gatherer.cdm.Subcollection
     731        * @see org.greenstone.gatherer.msm.ElementWrapper
     732        */
    733733        public void actionPerformed(ActionEvent event) {
    734734        String n = name.getText(); // not allowed spaces!
     
    778778        extends KeyAdapter
    779779        implements ActionListener {
    780                 /** Any implementation of ActionListener must include this method so we can be informed when an action has been performed on one of our target controls. In this case we want to record that somethings changed, then validate the controls.
    781                 * @param event An <strong>ActionEvent</strong> containing information about the event.
    782                 */
     780        /** Any implementation of ActionListener must include this method so we can be informed when an action has been performed on one of our target controls. In this case we want to record that somethings changed, then validate the controls.
     781        * @param event An <strong>ActionEvent</strong> containing information about the event.
     782        */
    783783        public void actionPerformed(ActionEvent event) {
    784784        changed = true;
    785785        validate();
    786786        }
    787                 /** Any inheritor of KeyAdapter can override this method so we can be informed when an key has been type in one of our target controls. In this case we want to record that somethings changed, then validate the controls.
    788                 * @param event An <strong>KeyEvent</strong> containing information about the event.
    789                 */
     787        /** Any inheritor of KeyAdapter can override this method so we can be informed when an key has been type in one of our target controls. In this case we want to record that somethings changed, then validate the controls.
     788        * @param event An <strong>KeyEvent</strong> containing information about the event.
     789        */
    790790        public void keyPressed(KeyEvent event) {
    791791        changed = true;
    792792        validate();
    793793        }
    794                 /** Method to validate the current editor values, and enable or disable controls based on said values. */
     794        /** Method to validate the current editor values, and enable or disable controls based on said values. */
    795795        private void validate() {
    796796        if(changed && name.getText().length() > 0 && match.getText().length() > 0) {
     
    805805    private class ClearDefaultListener
    806806        implements ActionListener {
    807                 /** Any implementation of ActionListener must include this method so we can be informed when an action has been performed on one of our target controls. In this case we want to clear the default subindex.
    808                 * @param event An <strong>ActionEvent</strong> containing information about the event.
    809                 */
     807        /** Any implementation of ActionListener must include this method so we can be informed when an action has been performed on one of our target controls. In this case we want to clear the default subindex.
     808        * @param event An <strong>ActionEvent</strong> containing information about the event.
     809        */
    810810        public void actionPerformed(ActionEvent event) {
    811811        setDefaultSubIndex(null);
     
    817817    private class ListListener
    818818        implements ListSelectionListener {
    819                 /** Any implementation of ListSelectionListener must include this method so we can be informed when the selection changes. In this case we want to execute any changes the users made to the entry, then update the controls with details of the new selection.
    820                 * @param event A <strong>ListSelectionEvent</strong> containing information related to this event.
    821                 * @see org.greenstone.gatherer.cdm.Subcollection
    822                 * @see org.greenstone.gatherer.msm.ElementWrapper
    823                 */
     819        /** Any implementation of ListSelectionListener must include this method so we can be informed when the selection changes. In this case we want to execute any changes the users made to the entry, then update the controls with details of the new selection.
     820        * @param event A <strong>ListSelectionEvent</strong> containing information related to this event.
     821        * @see org.greenstone.gatherer.cdm.Subcollection
     822        * @see org.greenstone.gatherer.msm.ElementWrapper
     823        */
    824824        public void valueChanged(ListSelectionEvent event) {
    825825        // If we have a previous collection and the users changed something, but not added, then update subcollection.
     
    896896    private class RemoveListener
    897897        implements ActionListener {
    898                 /** Any implementation of ActionListener must include this method so we can be informed when an action has been performed on one of our target controls. In this case we want to check if they have a subcolleciton selected, and if so remove both it and any subindexes based on it.
    899                 * @param event An <strong>ActionEvent</strong> containing information about the event.
    900                 * @see org.greenstone.gatherer.cdm.Subcollection
    901                 */
     898        /** Any implementation of ActionListener must include this method so we can be informed when an action has been performed on one of our target controls. In this case we want to check if they have a subcolleciton selected, and if so remove both it and any subindexes based on it.
     899        * @param event An <strong>ActionEvent</strong> containing information about the event.
     900        * @see org.greenstone.gatherer.cdm.Subcollection
     901        */
    902902        public void actionPerformed(ActionEvent event) {
    903903        if(!subcollection_list.isSelectionEmpty()) {
     
    911911    private class RemoveSubIndexListener
    912912        implements ActionListener {
    913                 /** Any implementation of ActionListener must include this method so we can be informed when an action has been performed on one of our target controls. In this case we want to check if they have a subindex selected, and if so remove it.
    914                 * @param event An <strong>ActionEvent</strong> containing information about the event.
    915                 * @see org.greenstone.gatherer.cdm.SubIndex
    916                 */
     913        /** Any implementation of ActionListener must include this method so we can be informed when an action has been performed on one of our target controls. In this case we want to check if they have a subindex selected, and if so remove it.
     914        * @param event An <strong>ActionEvent</strong> containing information about the event.
     915        * @see org.greenstone.gatherer.cdm.SubIndex
     916        */
    917917        public void actionPerformed(ActionEvent event) {
    918918        if(!subindexes_list.isSelectionEmpty()) {
     
    924924    private class SetDefaultListener
    925925        implements ActionListener {
    926                 /** Any implementation of ActionListener must include this method so we can be informed when an action has been performed on one of our target controls. In this case we want to check if they have a subindex selected, and if so set it as default.
    927                 * @param event An <strong>ActionEvent</strong> containing information about the event.
    928                 * @see org.greenstone.gatherer.cdm.DefaultSubIndex
    929                 * @see org.greenstone.gatherer.cdm.SubIndex
    930                 */
     926        /** Any implementation of ActionListener must include this method so we can be informed when an action has been performed on one of our target controls. In this case we want to check if they have a subindex selected, and if so set it as default.
     927        * @param event An <strong>ActionEvent</strong> containing information about the event.
     928        * @see org.greenstone.gatherer.cdm.DefaultSubIndex
     929        * @see org.greenstone.gatherer.cdm.SubIndex
     930        */
    931931        public void actionPerformed(ActionEvent event) {
    932932        if(!subindexes_list.isSelectionEmpty()) {
Note: See TracChangeset for help on using the changeset viewer.