Changeset 8457


Ignore:
Timestamp:
2004-11-05T10:02:48+13:00 (19 years ago)
Author:
kjdon
Message:

now chooses between METSDocument and HTMLDocument when getting nodes - Chi's change

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/indexers/MGIndexer.java

    r8440 r8457  
    1919import org.greenstone.gsdl3.gs3build.doctypes.DocumentInterface;
    2020import org.greenstone.gsdl3.gs3build.doctypes.HTMLDocument;
     21import org.greenstone.gsdl3.gs3build.doctypes.METSDocument;
    2122import org.greenstone.gsdl3.gs3build.metadata.*;
    2223import org.greenstone.gsdl3.gs3build.xpointer.XPointer;
     
    230231       
    231232        descriptive.addMetadata("gsdl3", "mgseqno", this.overallName + "." + Integer.toString(this.sectionSeqNo));
     233       
    232234        metsDoc.setChanged(true);
     235        //metsDoc.setModified(true);
    233236        //  System.out.println("Assigning " + this.sectionSeqNo + " to " + metsDoc.getID() + " " + division.getLabel());
    234237    } // section level
     
    281284    // go through our children as required...
    282285    Iterator children = structure.getChildIterator();
     286    Node startNode;
    283287    while (children.hasNext()) {
    284288      AbstractStructure child = (AbstractStructure) children.next();
     
    286290      // get xpointer for child
    287291      // get start position node
    288       Node startNode = ((HTMLDocument) metsDoc).getSectionStartNode((METSDivision) child);
     292      if (metsDoc.getDocumentType() == "METS"){
     293      startNode = ((METSDocument) metsDoc).getSectionStartNode((METSDivision) child);     
     294      } else {
     295      startNode = ((HTMLDocument) metsDoc).getSectionStartNode((METSDivision) child);
     296      }
     297        //Node startNode = ((HTMLDocument) metsDoc).getSectionStartNode((METSDivision) child);
    289298     
    290299      // while this node isn't the child's start node, produce the HTML node text, if
     
    301310      // recurse to child
    302311      node = this.recurseDOM(metsDoc, node, child, textBuffer, extraBuffer, namespace); // name, namespace, field);
    303     }
     312    } // while next child
    304313
    305314    // close a document - the actual closing \B will be done by the main
Note: See TracChangeset for help on using the changeset viewer.