Changeset 6502


Ignore:
Timestamp:
2004-01-15T11:31:04+13:00 (20 years ago)
Author:
cs025
Message:

Added setDocumentMetadata to DocumentInterface

Location:
trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/doctypes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/doctypes/AbstractDocument.java

    r6284 r6502  
    164164   *   @see DocumentInterface:addDocumentMetadata
    165165   */
     166  public void setDocumentMetadata(MetadataLabel label, String value)
     167  { // no need to set isModified, as the following call will do it anyway!
     168    this.setDocumentMetadata(label.getNamespace(), label.getLabel(), value);
     169  }
     170
     171  /**
     172   *   @see DocumentInterface:addDocumentMetadata
     173   */
    166174  public void addDocumentMetadata(String namespace, String label, String value)
    167175  { this.metadata.addMetadata("default", namespace, label, value);
     176    this.isModified = true;
     177  }
     178
     179  /**
     180   *   @see DocumentInterface:addDocumentMetadata
     181   */
     182  public void setDocumentMetadata(String namespace, String label, String value)
     183  { this.metadata.setMetadata("default", namespace, label, value);
    168184    this.isModified = true;
    169185  }
     
    195211
    196212  /**
    197    *  @see DocumentInterface:setDocumentMetadata
    198    */
    199   public void setDocumentMetadata(String namespace, String label, String value)
    200   { this.metadata.setMetadata("default", namespace, label, value);
    201     this.isModified = true;
    202   }
    203 
    204   /**
    205213   *  Get the metadata structure of the document
    206214   *
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/doctypes/DocumentInterface.java

    r6284 r6502  
    128128  /**
    129129   *  Facilitate the decoration of a document with external or extracted
     130   *  metadata.  This is a "cheap" form which doesn't have a separate
     131   *  namespace element.  Either the data is to be stored in the "open"
     132   *  Greenstone metadata namespace, or the namespace is encoded within
     133   *  the label.
     134   *
     135   *  @param <code>MetadataLabel</code> label of the metadata, with a '.' to deliminate
     136   *                             sub-component structures.  The label may commence
     137   *                             with a namespace followed by a colon.
     138   *                             <p>e.g. "dc:title" for Dublin Core Title.</p>
     139   *  @param <code>String</code> value of the metadata
     140   */
     141  public void setDocumentMetadata(MetadataLabel label, String value);
     142 
     143  /**
     144   *  Facilitate the decoration of a document with external or extracted
    130145   *  metadata.
    131146   *
     
    136151   */
    137152  public void addDocumentMetadata(String namespace, String label, String value);
     153
     154  /**
     155   *  Facilitate the decoration of a document with external or extracted
     156   *  metadata.
     157   *
     158   *  @param <code>String</code> namespace of the metadata
     159   *  @param <code>String</code> label of the metadata, with a '.' to deliminate
     160   *                             sub-component structures
     161   *  @param <code>String</code> value of the metadata
     162   */
     163  public void setDocumentMetadata(String namespace, String label, String value);
    138164
    139165  /**
Note: See TracChangeset for help on using the changeset viewer.