Changeset 19220

Show
Ignore:
Timestamp:
23.04.2009 13:06:41 (10 years ago)
Author:
kjdon
Message:

the shortname is now the group qualified name, eg documented-examples/dls-e, if its in a group

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/collection/BasicCollectionConfiguration.java

    r16267 r19220  
    4040import org.greenstone.gatherer.DebugStream; 
    4141import org.greenstone.gatherer.Dictionary; 
     42import org.greenstone.gatherer.Gatherer; 
    4243import org.greenstone.gatherer.cdm.CommandTokenizer; 
    4344import org.greenstone.gatherer.util.Codec; 
     
    5859    private String collectgroup = "false"; 
    5960     
     61  private String short_name = ""; 
     62   
    6063    private String site = null; // used for gs3 colls 
    6164     
     
    241244     */ 
    242245    public String getShortName() { 
    243     return file.getParentFile().getParentFile().getName(); 
     246      if (short_name.equals("")) { 
     247    String collectDir = Gatherer.getCollectDirectoryPath(); 
     248    String currentCollDir = file.getParentFile().getParentFile().getAbsolutePath();  
     249    if (currentCollDir.startsWith(collectDir)) { 
     250      short_name = currentCollDir.substring(collectDir.length()); 
     251      short_name.replace('\\', '/'); 
     252    } else { 
     253      short_name = file.getParentFile().getParentFile().getName(); 
     254    } 
     255      } 
     256      return short_name; 
     257     
    244258    } 
    245259