Changeset 6505


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

Fixed use of startSeqNo in posting document text identifiers.

File:
1 edited

Legend:

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

    r6376 r6505  
    9898  /**
    9999   *  The output directory should be (collection)/building/text/ for
    100    *  normal Greenstone builds.
     100    *  normal Greenstone builds.
    101101   *
    102102   *  @param <code>String</code> the label to configure
     
    160160    }
    161161
    162     descriptive.addMetadata("gsdl3", "mgseqno", indexName + "." + Integer.toString(this.documentSeqNo));
     162    descriptive.addMetadata("gsdl3", "mgseqno", indexName + "." + Integer.toString(this.sectionSeqNo));
    163163    metsDoc.setModified(true);
    164     //  System.out.println("Assigning " + this.documentSeqNo + " to " + metsDoc.getID() + " " + division.getLabel());
     164    //  System.out.println("Assigning " + this.sectionSeqNo + " to " + metsDoc.getID() + " " + division.getLabel());
    165165      }
    166166     
    167167      // append an 'end of section' marker
    168168      textBuffer.append(END_OF_SECTION);
     169      this.sectionSeqNo ++;
    169170
    170171      // for document-level indexes, always append an 'end of document' tag at the
     
    174175      if (this.level == null ||
    175176      this.level.equals(IndexerInterface.DOCUMENT_LEVEL)) {
    176     // extraBuffer.append(END_OF_DOCUMENT);
     177    extraBuffer.append(END_OF_DOCUMENT);
    177178      }
    178179      else {
     
    180181    this.documentSeqNo ++;
    181182      }
    182       this.sectionSeqNo ++;
    183183
    184184      // produce the body here for metadata output of divisions - in the case of
     
    231231     
    232232      // recurse to child
    233       this.recurseDOM(metsDoc, node, child, textBuffer, extraBuffer, indexName, namespace, field);
     233      node = this.recurseDOM(metsDoc, node, child, textBuffer, extraBuffer, indexName, namespace, field);
    234234    }
    235235
     
    310310        if (valueIter.hasNext()) {
    311311          textBuffer.append(END_OF_SECTION);
    312           sectionSeqNo ++;
     312          //          sectionSeqNo ++;
    313313        }
    314314      }
     
    321321      sectionSeqNo ++;
    322322    }
     323
     324    /*    if (this.pass == 0) {
     325      System.err.println(docText);
     326    }
     327    */
    323328
    324329    byte [] bytes = docText.getBytes();
     
    366371    this.firstDocument = false;
    367372    if (this.pass == 0) {
    368       document.addDocumentMetadata("gsdl3", "mgseqno", "dtx."+Integer.toString(this.documentSeqNo));
    369       //      System.out.println("Assigning " + startSeqNo + " to " + document.getID());
     373      document.addDocumentMetadata("gsdl3", "mgseqno", "dtx."+Integer.toString(startSeqNo));
     374      // System.out.println("Assigning " + startSeqNo + " to " + document.getID());
    370375    }
    371376    this.documentSeqNo += 1;
     
    424429      else {
    425430    this.field = "text";
    426     this.level = "document";
     431    this.level = "section";
    427432    this.indexName = null;
    428433      }
Note: See TracChangeset for help on using the changeset viewer.