001    /*
002     * Package.java
003     *
004     * This file is part of the STAR Scheduler.
005     * Copyright (c) 2003-2006 STAR Collaboration - Brookhaven National Laboratory
006     *
007     * STAR Scheduler is free software; you can redistribute it and/or modify
008     * it under the terms of the GNU General Public License as published by
009     * the Free Software Foundation; either version 2 of the License, or
010     * (at your option) any later version.
011     *
012     * STAR Scheduler is distributed in the hope that it will be useful,
013     * but WITHOUT ANY WARRANTY; without even the implied warranty of
014     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
015     * GNU General Public License for more details.
016     *
017     * You should have received a copy of the GNU General Public License
018     * along with STAR Scheduler; if not, write to the Free Software
019     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
020     */
021    
022    package gov.bnl.star.offline.scheduler.util.sandbox;
023    
024    import java.util.ArrayList;
025    import java.util.List;
026    import java.net.URL;
027    
028    
029    /**
030     * This class holds the description of the contents of the sandbox.
031     * @author  Levente Hajdu
032     */
033    public class SandboxPackage {
034        
035        /** Creates a new instance of Package */
036        public SandboxPackage() {
037        }
038        
039        
040        private String PackageName;
041        public void setPackageName(String PackageName){this.PackageName = PackageName.trim();}
042        public String getPackageName(){return PackageName;}
043        
044        private String repository = "." + System.getProperty("file.separator"); // so it works with windows and unix, dont know about others
045        public String getRepository(){return repository;}
046        public void setRepository(String repository){
047            if(! repository.endsWith(System.getProperty("file.separator"))) this.repository = repository + System.getProperty("file.separator");
048            else this.repository = repository;
049        };
050        
051        private List files = new ArrayList();
052        public void addFile(URL file){files.add(file);}
053        public List getFiles(){return files;}
054        public void setFiles(List files){this.files = files;}
055        
056        private List directorys = new ArrayList();
057        public void addDirectory(URL directory){directorys.add(directory);}
058        public List getDirectorys(){return directorys;}
059        public void setDirectorys(List directorys){this.directorys = directorys;}
060        
061        private String version;
062        public String getVersion(){return version; }
063        public void setVersion(String version){this.version = version.trim(); } 
064        
065        private String installdir; 
066        public String getInstalldir(){return installdir; }
067        public void setInstalldir(String installdir){this.installdir = installdir.trim(); }
068        
069        
070        /**
071         * @param args the command line arguments
072         */
073        public static void main(String[] args) {
074            // TODO code application logic here
075        }
076        
077    }