Changeset 30704

Show
Ignore:
Timestamp:
15.08.2016 14:30:41 (3 years ago)
Author:
kjdon
Message:

use the top OID for marking doc in database - only top level ids are in there, not sections

Location:
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/DocumentMaker.java

    r30617 r30704  
    4444import org.greenstone.gsdl3.util.GSPath; 
    4545import org.greenstone.gsdl3.util.GSXML; 
     46import org.greenstone.gsdl3.util.OID; 
    4647import org.greenstone.gsdl3.util.UserContext; 
    4748import org.greenstone.gsdl3.util.XMLConverter; 
     
    451452                    _GSDM.documentXMLSetText(oid, collection, newContent, userContext); 
    452453                     
    453                     markDocumentInFlatDatabase("R", collection, oid); 
     454                    // only top level doc ids are in database 
     455                    markDocumentInFlatDatabase("R", collection, OID.getTop(oid)); 
    454456 
    455457                } 
     
    465467    } 
    466468    protected void markDocumentInFlatDatabase(String mark, String collection, String oid) { 
    467      
     469       
    468470        Document msg_doc = XMLConverter.newDOM(); 
    469471        Element message = msg_doc.createElement(GSXML.MESSAGE_ELEM); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/GS2Construct.java

    r30617 r30704  
    3838import org.greenstone.gsdl3.util.GSStatus; 
    3939import org.greenstone.gsdl3.util.GSXML; 
     40import org.greenstone.gsdl3.util.OID; 
    4041import org.greenstone.gsdl3.util.SimpleCollectionDatabase; 
    4142import org.greenstone.gsdl3.util.UserContext; 
     
    739740            } 
    740741             
    741             markDocumentInFlatDatabase("R", coll_name, oid); 
     742            markDocumentInFlatDatabase("R", coll_name, OID.getTop(oid)); 
    742743             
    743744            constructor.setQueryString(querystring.toString());