Ignore:
Timestamp:
2017-08-10T14:19:33+12:00 (7 years ago)
Author:
kjdon
Message:

setting classifier style attribute - can't remember why! Also, need to set teh class loader for the macro resolver AFTER the class loader is constructedsvn diff util/GSXML.java

File:
1 edited

Legend:

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

    r29990 r31867  
    5151    public GS2Browse()
    5252    {
    53       this.macro_resolver = new GS2MacroResolver(this.coll_db, this.class_loader);
     53      this.macro_resolver = new GS2MacroResolver();
    5454    }
    5555
     
    118118        }
    119119        this.gs_doc = gs_doc_db;
     120       
     121        // we need to set the database for our GS2 macro resolver
     122        GS2MacroResolver gs2_macro_resolver = (GS2MacroResolver) this.macro_resolver;
     123        gs2_macro_resolver.setDB(this.coll_db);
     124        // set the class loader in case we have collection specific properties files
     125        gs2_macro_resolver.setClassLoader(this.class_loader);
    120126
    121127   
     
    139145    }
    140146
    141 
     147  /** the type of a node is the same as teh child type of its parent */
     148  protected String getThisType(String node_id) {
     149    String parent_id = OID.getParent(node_id);
     150    if (parent_id.equals(node_id)) {
     151      return null; // no parent so doesn't have a thistype
     152    }
     153    DBInfo info = this.coll_db.getInfo(parent_id);
     154    if (info == null)
     155      {
     156    return null;
     157      }
     158    return info.getInfo("childtype");
     159  }
    142160
    143161
Note: See TracChangeset for help on using the changeset viewer.