Changeset 5949


Ignore:
Timestamp:
2003-11-24T14:28:55+13:00 (20 years ago)
Author:
cs025
Message:

Improved metadata handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/collection/CollectionMetadata.java

    r5798 r5949  
    1717{ METSDescriptive metadata;
    1818   
    19     public CollectionMetadata()
    20     { this.metadata = new METSDescriptive("CM0", "collection");
    21     }
     19  public CollectionMetadata()
     20  { this.metadata = new METSDescriptive("CM0", "collection");
     21  }
    2222
    23     /**
    24     *  Accrue the metadata assigned to a particular document
    25     *
    26     *  @param <code>DocumentID</code> the document identifier
    27     *  @param <code>String</code> the namespace of the metadata
    28     *  @param <code>String</code> the field of metadata
    29     *  @param <code>String</code> the actual value assigned
    30     */
    31     public void addDocumentMetadata(DocumentID documentID, String namespace, String field, String value)
    32     { // we don't presently use the document ID in this member function
    33         this.metadata.addMetadata(namespace, field, value);
    34     }
     23  /**
     24  *  Accrue the metadata assigned to a particular document
     25  *
     26  *  @param <code>DocumentID</code> the document identifier
     27  *  @param <code>String</code> the namespace of the metadata
     28  *  @param <code>String</code> the field of metadata
     29  *  @param <code>String</code> the actual value assigned
     30  */
     31  public void addDocumentMetadata(DocumentID documentID, String namespace, String field, String value)
     32  { // we don't presently use the document ID in this member function
     33    this.metadata.addMetadata(namespace, field, value);
     34  }
    3535
    36     /**
    37     *  Set the metadata stored on a given metadata item - any other values are
    38     *  destroyed.
    39     *
    40     *  @param <code>String</code> the namespace
    41     *  @param <code>String</code> the label of the metadata
    42     *  @param <code>String</code> the actual value assigned
    43     */
    44     public void setCollectionMetadata(String namespace, String label, String value)
    45     {   this.metadata.setMetadata(namespace, label, value);
    46     }
     36  /**
     37  *  Set the metadata stored on a given metadata item - any other values are
     38  *  destroyed.
     39  *
     40  *  @param <code>String</code> the namespace
     41  *  @param <code>String</code> the label of the metadata
     42  *  @param <code>String</code> the actual value assigned
     43  */
     44  public void setCollectionMetadata(String namespace, String label, String value)
     45  { this.metadata.setMetadata(namespace, label, value);
     46  }
    4747
    48     /**
    49     *  Get the metadata stored on a given metadata item
    50     *
    51     *  @param <code>String</code> the namespace
    52     *  @param <code>String</code> the label of the metadata
    53     */
    54     public List getCollectionMetadata(String namespace, String label)
    55     { return this.metadata.getMetadata(namespace, label);
    56     }
     48  /**
     49  *  Get the metadata stored on a given metadata item
     50  *
     51  *  @param <code>String</code> the namespace
     52  *  @param <code>String</code> the label of the metadata
     53  */
     54  public List getCollectionMetadata(String namespace, String label)
     55  { return this.metadata.getMetadata(namespace, label);
     56  }
    5757
    58     /**
    59     *  Write the collection metadata
    60     *
    61     *  TODO: dummy function - complete
    62     */
    63     public boolean write(PrintWriter writer)
    64     {   return false;
    65     }
     58  /**
     59  *  Write the collection metadata
     60  *
     61  *  TODO: dummy function - complete
     62  */
     63  public boolean write(PrintWriter writer)
     64  { return false;
     65  }
    6666}
Note: See TracChangeset for help on using the changeset viewer.