Ignore:
Timestamp:
2014-04-10T14:38:22+12:00 (10 years ago)
Author:
kjdon
Message:

removing stored Document field - now get passed it as needed or work it out from Element owner documents

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/AbstractBasicDocument.java

    r26269 r28965  
    3434
    3535    /** XML element for describe requests - the container doc */
    36     protected Document doc = null; // typically a shared reference to the one in ServiceRack
     36    //protected Document doc = null; // typically a shared reference to the one in ServiceRack
    3737
    3838    static Logger logger = Logger.getLogger(org.greenstone.gsdl3.util.AbstractBasicDocument.class.getName());
    3939
    40     public AbstractBasicDocument(Document doc)
     40    public AbstractBasicDocument()
    4141    {
    42     this.doc = doc;
    4342    }
    4443
     
    4746     * <docNode nodeId='xxx' nodeType='leaf' docType='hierarchy'/>
    4847     */
    49   public Element createDocNode(String node_id) {
    50     return createDocNode(node_id, null);
     48  public Element createDocNode(Document doc, String node_id) {
     49    return createDocNode(doc, node_id, null);
    5150  }
    5251    /** create an element to go into a results list. A node element
     
    5453     * <docNode nodeId='xxx' nodeType='leaf' docType='hierarchy' [rank='0.23']/>
    5554     */
    56     public Element createDocNode(String node_id, String rank) {
    57     Element node = this.doc.createElement(GSXML.DOC_NODE_ELEM);
     55  public Element createDocNode(Document doc, String node_id, String rank) {
     56    Element node = doc.createElement(GSXML.DOC_NODE_ELEM);
    5857    node.setAttribute(GSXML.NODE_ID_ATT, node_id);
    5958    if (rank != null) {
Note: See TracChangeset for help on using the changeset viewer.