Changeset 17014 for gli

Show
Ignore:
Timestamp:
26.08.2008 19:08:52 (11 years ago)
Author:
ak19
Message:

1. Made MetadataWrap? and MetadataItem? members final rather than static, now they are passed by subclasses to the superclass constructor (DocXMLFile). 2. Skip warning on gsdlsourcefilename etc/collect.cfg since this occurs when working with FLI and is not an error.

Location:
gli/trunk/src/org/greenstone/gatherer/metadata
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/metadata/DocGAFile.java

    r17011 r17014  
    4141    public DocGAFile(String doc_xml_file_path) 
    4242    { 
    43     super(doc_xml_file_path); 
    44     MetadataWrap = "Description"; 
    45     MetadataItem = "Metadata"; 
     43    super(doc_xml_file_path, "Description", "Metadata"); // metadataWrap and metadataItem 
    4644    } 
    4745} 
  • gli/trunk/src/org/greenstone/gatherer/metadata/DocMetsXMLFile.java

    r17011 r17014  
    4040    public DocMetsXMLFile(String doc_xml_file_path) 
    4141    { 
    42     super(doc_xml_file_path); 
    43     MetadataWrap = "mets:xmlData"; 
    44     MetadataItem = "ex:metadata"; 
    45  
     42    super(doc_xml_file_path, "mets:xmlData", "ex:metadata"); // metadataWrap, metadataItem 
    4643    } 
    4744} 
  • gli/trunk/src/org/greenstone/gatherer/metadata/DocXMLFile.java

    r17009 r17014  
    4141    protected HashMap source_file_name_to_description_elements_mapping = new HashMap(); 
    4242 
    43     protected static String MetadataWrap = null; 
    44     protected static String MetadataItem = null; 
    45  
    46     public DocXMLFile(String doc_xml_file_path) 
     43    protected final String MetadataWrap; 
     44    protected final String MetadataItem; 
     45 
     46    public DocXMLFile(String doc_xml_file_path, String metaWrap, String metaItem) 
    4747    { 
    4848    super(doc_xml_file_path); 
     49    this.MetadataWrap = metaWrap; 
     50    this.MetadataItem = metaItem; 
    4951    } 
    5052 
     
    260262 
    261263            // Warn about an odd gsdlsourcefilename, except if it is the Greenstone "tmp" directory 
     264            // or (as in the case of using FLI) if it is the etc/collect.cfg file 
    262265            // This is true when the source files come from a zip file processed by ZIPPlug, for example 
    263             else if (gsdlsourcefilename_value.indexOf("tmp") == -1) { 
     266            else if (gsdlsourcefilename_value.indexOf("tmp") == -1 && !gsdlsourcefilename_value.endsWith("collect.cfg")) { 
    264267            // We don't really know what is going on... 
    265268            System.err.println("Warning: Could not understand gsdlsourcefilename " + gsdlsourcefilename_value);