Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

ProfileModule.java

00001 /*
00002  * OpenMobileIS - a free Java(TM) Framework for mobile applications Java(TM)
00003  * Copyright (C) 2004-2006 Philippe Delrieu
00004  * All rights reserved.
00005  * Contact: pdelrieu@openmobileis.org
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
00020  * USA
00021  *
00022  *  
00023  *  Modifications :
00024  *  2006 Creation P.Delrieu
00025  * 
00026  */
00027 package org.openmobileis.modules.profiles.embedded;
00028 
00029 import java.util.Enumeration;
00030 import java.util.Hashtable;
00031 
00032 import org.openmobileis.common.util.OpenMISSerializable;
00033 import org.openmobileis.common.util.collection.Array;
00034 import org.openmobileis.modules.profiles.embedded.core.DependProfileModule;
00035 import org.openmobileis.modules.profiles.embedded.core.DependProfileRubric;
00036 
00048 public class ProfileModule  implements OpenMISSerializable {
00049   static final long serialVersionUID = 5521257935120563452L;
00050         
00051         private String name;
00052         private String version;
00053         private Hashtable properties;
00054         private Array rubrics;
00055   private Array dependModuleList;
00056         
00057         public ProfileModule() {
00058                 this.properties = new Hashtable();
00059                 this.rubrics = new Array();
00060     dependModuleList = new Array();
00061         }
00062   
00063   public void addDependProfilModule(DependProfileModule moduleName) {
00064     dependModuleList.add(moduleName);
00065   }
00066   
00067   public Array getDependModuleList()  {
00068     return dependModuleList;
00069   }
00070   
00071         public void setName(String name) {
00072                 this.name = name;
00073         }
00074         
00075         public String getName() {
00076                 return this.name;
00077         }
00078         
00079         public void setVersion(String version) {
00080                 this.version = version;
00081         }
00082         
00083         public String getVersion() {
00084                 return this.version;
00085         }
00086         
00087         public void addProperty(String name, String value) {
00088                 properties.put(name, value);
00089         }
00090         
00091         public String getProperty(String name) {
00092                 return (String)this.properties.get(name);
00093         }
00094         
00095         public String[] getAllPropertiesNames() {
00096                 Enumeration enumkeys = this.properties.keys();
00097                 Array keys = new Array();
00098                 while (enumkeys.hasMoreElements()) {
00099                         keys.add((String)enumkeys.nextElement());
00100                 }
00101                 String[] result = new String[keys.size()];
00102                 keys.toArray(result);
00103                 return result;
00104         }
00105         
00106         public void addModuleRubric(DependProfileRubric rubric) {
00107                 this.rubrics.add(rubric);
00108         }
00109         
00110         public Array getModuleRubric() {
00111                 return this.rubrics;
00112         }
00113 
00114 }

Generated on Mon Jul 10 10:29:32 2006 for OpenMobileIS by  doxygen 1.4.4