00001 package org.openmobileis.modules.profils.embedded.data; 00002 00003 import java.util.Enumeration; 00004 import java.util.Hashtable; 00005 00006 import org.openmobileis.common.util.collection.Array; 00007 00008 public class ProfilModule { 00009 00010 private String name; 00011 private String version; 00012 private Hashtable properties; 00013 private Array rubrics; 00014 00015 public ProfilModule() { 00016 this.properties = new Hashtable(); 00017 this.rubrics = new Array(); 00018 } 00019 00020 public void setName(String name) { 00021 this.name = name; 00022 } 00023 00024 public String getName() { 00025 return this.name; 00026 } 00027 00028 public void setVersion(String version) { 00029 this.version = version; 00030 } 00031 00032 public String getVersion() { 00033 return this.version; 00034 } 00035 00036 public void addProperty(String name, String value) { 00037 properties.put(name, value); 00038 } 00039 00040 public String getProperty(String name) { 00041 return (String)this.properties.get(name); 00042 } 00043 00044 public String[] getAllPropertiesNames() { 00045 Enumeration enumkeys = this.properties.keys(); 00046 Array keys = new Array(); 00047 while (enumkeys.hasMoreElements()) { 00048 keys.add((String)enumkeys.nextElement()); 00049 } 00050 String[] result = new String[keys.size()]; 00051 keys.toArray(result); 00052 return result; 00053 } 00054 00055 public void addRubric(String rubric) { 00056 this.rubrics.add(rubric); 00057 } 00058 00059 public Array getRubrics() { 00060 return this.rubrics; 00061 } 00062 00063 }