Ignore:
Timestamp:
2003-12-17T13:08:02+13:00 (20 years ago)
Author:
cs025
Message:

Added HTMLDocumentTools, also modifications to the abstract interfaces
and the HTMLDocument doctype to support indexing by section.

File:
1 edited

Legend:

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

    r6101 r6284  
    1313
    1414import org.greenstone.gsdl3.gs3build.metadata.NamespaceFactory;
     15import org.greenstone.gsdl3.gs3build.metadata.StructureIdentifierFactory;
    1516import org.greenstone.gsdl3.gs3build.metadata.GSDL3Namespace;
    1617import org.greenstone.gsdl3.gs3build.metadata.METSDescriptiveSet;
     
    2223import org.greenstone.gsdl3.gs3build.metadata.METSDivision;
    2324import org.greenstone.gsdl3.gs3build.metadata.METSNamespace;
     25import org.greenstone.gsdl3.gs3build.metadata.MetadataLabel;
    2426
    2527import org.greenstone.gsdl3.gs3build.util.MultiMap;
     
    3941  DocumentID       id;
    4042  boolean          isModified;
     43  StructureIdentifierFactory structureIdFactory;
    4144
    4245  /**
     
    5356    this.structureSet = new METSStructureSet();
    5457    this.id           = id;
     58    this.structureIdFactory = new StructureIdentifierFactory();
    5559  }
    5660 
     
    152156   *   @see DocumentInterface:addDocumentMetadata
    153157   */
    154   public void addDocumentMetadata(String name, String value)
    155   { int colonAt = name.indexOf(":");
    156     String namespace;
    157        
    158     if (colonAt > 0) {
    159       namespace = name.substring(0, colonAt);
    160       name = name.substring(colonAt+1);
    161     }
    162     else {
    163       namespace = GSDL3Namespace.GSDL3_NAMESPACE_ID;
    164     }
    165 
    166     // no need to set isModified, as the following call will do it anyway!
    167     this.addDocumentMetadata(namespace, name, value);
     158  public void addDocumentMetadata(MetadataLabel label, String value)
     159  { // no need to set isModified, as the following call will do it anyway!
     160    this.addDocumentMetadata(label.getNamespace(), label.getLabel(), value);
    168161  }
    169162
     
    286279  { this.fileSet = fileSet;
    287280  }
     281
     282  /**
     283   *  This is just a dummy function that does nothing at this level...
     284   */
     285  public org.w3c.dom.Document getDOMDocument()
     286  { return null;
     287  }
    288288 
    289289  /**
Note: See TracChangeset for help on using the changeset viewer.