Ignore:
Timestamp:
2008-12-08T17:07:26+13:00 (15 years ago)
Author:
cc108
Message:

remove Java 1.5 method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/trunk/greenstone3-extension/mat/src/org/greenstone/gsdl3_extension/mat/MetadataStats.java

    r18093 r18146  
    6969   
    7070    private static boolean deleteDir(File dir) {
    71    
     71       
    7272    if (dir.isDirectory()) {
    7373            String[] children = dir.list();
     
    119119    public void getAvailableMetadataSets(String SetName,HashMap UsedMap, String SetAbbr){
    120120   
    121     String gsdl3Home = globalProperty.getGSDL3Home();
    122     String os = "linux";
    123    
    124     if(System.getProperty("os.name").toLowerCase().contains("windows")){
    125         gsdl3Home = gsdl3Home.replace("\\", "/");
    126         os = "windows";
    127     }
     121    String gsdl3Home = globalProperty.getGSDL3Home();
     122    String os = "linux";
     123   
     124    if(System.getProperty("os.name").toLowerCase().indexOf("windows")!=-1){
     125        gsdl3Home = gsdl3Home.replaceAll("\\", "/");
     126        os = "windows";
     127    }
    128128    String metadataSetHome = gspath.removeLastLink(gsdl3Home)+fileSeparator+"gli"+fileSeparator+"metadata";
    129129    if(os.equals("windows")){
    130         metadataSetHome = metadataSetHome.replace("/", "\\");
     130        metadataSetHome = metadataSetHome.replaceAll("/", "\\");
    131131    }
    132132    File metadata_directory = new File(metadataSetHome);
    133    
     133
    134134    if (metadata_directory.exists()) {
    135135       
     
    157157                Node temp = e.item(y);
    158158                NamedNodeMap mmp = temp.getAttributes();
    159                
     159                                               
    160160                if(!mmp.item(0).getNodeValue().equals("Description")){
    161161                    MetadataElement me = new MetadataElement();
     
    258258            String part = st.nextToken(";");
    259259
    260             if(part.contains("<contains>")){
    261             part = part.replace("<contains>", "");
    262             }
    263             else if(part.contains("<thistype>")){
     260            if(part.indexOf("<contains>")!=-1){
     261            part = part.replaceAll("<contains>", "");
     262            }
     263            else if(part.indexOf("<thistype>")!=-1){
    264264            int location = part.indexOf("<thistype>");
    265265            part = part.substring(0,location-1);
Note: See TracChangeset for help on using the changeset viewer.