Ignore:
Timestamp:
11/26/13 11:56:07 (11 years ago)
Author:
wojtekp
Message:
 
Location:
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/description
Files:
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/description/ComputingResourceDescription.java

    r1113 r1207  
    11package schedframe.resources.computing.description; 
    22 
    3 import java.io.FileInputStream; 
    4 import java.io.FileNotFoundException; 
    5 import java.io.IOException; 
    63import java.util.ArrayList; 
     4import java.util.Collection; 
     5import java.util.HashMap; 
     6import java.util.Iterator; 
    77import java.util.List; 
    8 import java.util.PropertyResourceBundle; 
    9 import java.util.ResourceBundle; 
     8import java.util.Map; 
    109 
    11 import schedframe.Parameter; 
    1210import schedframe.Parameters; 
    13 import schedframe.Property; 
    1411import schedframe.resources.ResourceTypeFactory; 
    15 import schedframe.resources.computing.location.Location; 
    16 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputProfile; 
    17 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputState; 
    18 import schedframe.resources.computing.profiles.energy.airthroughput.plugin.AirThroughputEstimationPlugin; 
    19 import schedframe.resources.computing.profiles.energy.airthroughput.plugin.DefaultAirThroughputEstimationPlugin; 
    20 import schedframe.resources.computing.profiles.energy.power.PState; 
    21 import schedframe.resources.computing.profiles.energy.power.PowerProfile; 
    22 import schedframe.resources.computing.profiles.energy.power.PowerState; 
    23 import schedframe.resources.computing.profiles.energy.power.PowerStateNameFactory; 
    24 import schedframe.resources.computing.profiles.energy.power.Transition; 
    25 import schedframe.resources.computing.profiles.energy.power.plugin.EnergyEstimationPlugin; 
    26 import schedframe.resources.computing.profiles.energy.thermal.ThermalProfile; 
    27 import schedframe.resources.computing.profiles.energy.thermal.plugin.DefaultTemperatureEstimationPlugin; 
    28 import schedframe.resources.computing.profiles.energy.thermal.plugin.TemperatureEstimationPlugin; 
     12import schedframe.resources.devices.Device; 
     13import schedframe.resources.devices.description.DeviceDescription; 
     14import schedframe.resources.devices.description.PhysicalResourceDescription; 
    2915import schedframe.resources.units.ResourceUnit; 
    3016import schedframe.resources.units.ResourceUnitFactory; 
     17import schedframe.resources.units.ResourceUnitName; 
    3118import schedframe.resources.utils.ResourceIdGenerator; 
    3219import schemas.ComputingResource; 
    33 import schemas.PowerUsage; 
    34 import schemas.Profile; 
    35 import simulator.utils.InstanceFactory; 
    36 import example.energy.DefaultEnergyEstimationPlugin; 
    3720 
    38 public class ComputingResourceDescription extends ExecutingResourceDescription { 
    3921 
    40         //protected Map<ResourceUnitName, List<AbstractResourceUnit>> resUnits; 
    41         protected PowerProfile powerProfile; 
    42         protected AirThroughputProfile airThroughputProfile; 
    43         protected ThermalProfile thermalProfile; 
    44         protected Location location; 
    45         protected String category; 
    46         //protected Parameters parameters; 
     22public class ComputingResourceDescription extends PhysicalResourceDescription implements ExecutingResourceDescription { 
    4723 
     24        protected Map<ResourceUnitName, List<ResourceUnit>> resUnits; 
     25        protected List<Device> devices; 
     26         
    4827        public ComputingResourceDescription(ComputingResource computingResource) { 
    4928 
     
    5534                if (computingResource.getComputingResourceTypeChoiceSequence() != null) { 
    5635                        initResourceUnits(computingResource.getComputingResourceTypeChoiceSequence().getResourceUnit()); 
    57                         try { 
    58                                 if(System.getProperty("coolemall.resdesc") != null){ 
    59                                         schemas.EnergyEstimationPlugin eep = new schemas.EnergyEstimationPlugin(); 
    60                                         eep.setName(getEEP(createEEPQuery(computingResource), System.getProperty("coolemall.resdesc"))); 
    61                                         if(computingResource.getComputingResourceTypeChoiceSequence().getProfile() != null) { 
    62                                                 if(computingResource.getComputingResourceTypeChoiceSequence().getProfile().getPowerProfile() != null) { 
    63                                                         computingResource.getComputingResourceTypeChoiceSequence().getProfile().getPowerProfile().setEnergyEstimationPlugin(eep); 
    64                                                 } 
    65                                         } else { 
    66                                                 schemas.Profile p = new schemas.Profile(); 
    67                                                 computingResource.getComputingResourceTypeChoiceSequence().setProfile(p); 
    68                                                 schemas.PowerProfile pp = new schemas.PowerProfile(); 
    69                                                 computingResource.getComputingResourceTypeChoiceSequence().getProfile().setPowerProfile(pp); 
    70                                                 computingResource.getComputingResourceTypeChoiceSequence().getProfile().getPowerProfile().setEnergyEstimationPlugin(eep); 
    71                                         } 
    72                                 } 
    73                         } catch (FileNotFoundException e) { 
    74                         } catch (IOException e) { 
    75                         } 
     36 
    7637                        initProfiles(computingResource.getComputingResourceTypeChoiceSequence().getProfile()); 
    7738                        initLocation(computingResource.getComputingResourceTypeChoiceSequence().getLocation()); 
     39                        initDevices(computingResource.getComputingResourceTypeChoiceSequence().getDevice()); 
    7840                        this.parameters = extractParameters(computingResource.getComputingResourceTypeChoiceSequence().getParameter()); 
    7941                } 
     
    9759                } 
    9860        } 
    99  
    100         private void initProfiles(Profile profile) { 
    101                 if (profile != null) { 
    102                         initPowerProfile(profile.getPowerProfile()); 
    103                         initAirThroughputProfile(profile.getAirThroughputProfile()); 
    104                         initThermalProfile(profile.getThermalProfile()); 
    105                 } 
    106         } 
    10761         
    108         private void initPowerProfile(schemas.PowerProfile powerProfileCharacteristic) { 
    109                  
    110                 if (powerProfileCharacteristic != null) { 
    111                         EnergyEstimationPlugin energyEstimationPlugin = null; 
    112                         List<PowerState> powerStates = null; 
    113                         List<PState> pStates = null; 
    114                         if(powerProfileCharacteristic.getEnergyEstimationPlugin() != null){ 
    115                                 String energyEstimationPluginName = powerProfileCharacteristic.getEnergyEstimationPlugin().getName(); 
    116                                 if(energyEstimationPluginName != null) { 
    117                                         energyEstimationPlugin = (EnergyEstimationPlugin) InstanceFactory.createInstance( 
    118                                                         energyEstimationPluginName, EnergyEstimationPlugin.class);                       
    119                                 } else { 
    120                                         energyEstimationPlugin = new DefaultEnergyEstimationPlugin(); 
    121                                 } 
    122                                 Parameters params = extractParameters(powerProfileCharacteristic.getEnergyEstimationPlugin().getParameter()); 
    123                                 energyEstimationPlugin.init(params); 
     62        private void initDevices(schemas.Device[] dev) { 
     63                if (dev != null){ 
     64                        this.devices = new ArrayList<Device>(); 
     65                        for(int i = 0; i < dev.length; i++){ 
     66                                Device device = new Device(new DeviceDescription(dev[i])); 
     67                                this.devices.add(device); 
    12468                        } 
    125                          
    126                         if(powerProfileCharacteristic.getPowerStates() != null) { 
    127                                 powerStates = new ArrayList<PowerState>(); 
    128                                 int powerStateCount = powerProfileCharacteristic.getPowerStates().getPowerStateCount(); 
    129                                 for (int i = 0; i < powerStateCount ; i++) { 
    130                                         schemas.PowerState ps = powerProfileCharacteristic.getPowerStates().getPowerState(i); 
    131                                         List<Transition> transitions = new ArrayList<Transition>(); 
    132                                         int transitionCount = ps.getTransitionCount(); 
    133                                         for (int j = 0; j < transitionCount; j++) { 
    134                                                 schemas.Transition t = ps.getTransition(j); 
    135                                                 Transition transition = new Transition(PowerStateNameFactory.createPowerStateName(t.getTo()), t 
    136                                                                 .getPowerUsage().getContent(), t.getTime().getContent()); 
    137                                                 Parameters params = extractParameters(t.getParameter()); 
    138                                                 transition.init(params); 
    139                                                 transitions.add(transition); 
    140                                         } 
    141                                         //CoolEmAll DEBB description case 
    142                                         if(ps.getPowerUsage() == null){ 
    143                                                 ps.setPowerUsage(new PowerUsage("0")); 
    144                                         } 
    145                                         PowerState powerState = new PowerState(PowerStateNameFactory.createPowerStateName(ps.getName()), ps 
    146                                                         .getPowerUsage().getContent(), transitions); 
    147                                         Parameters params = extractParameters(ps.getParameter()); 
    148                                         powerState.init(params); 
    149                                         powerStates.add(powerState); 
    150                                 } 
    151                         } 
    152                          
    153                         if(powerProfileCharacteristic.getParameter() != null){ 
    154                                 pStates = new ArrayList<PState>(); 
    155                                 int parameterCount = powerProfileCharacteristic.getParameterCount(); 
    156                                 for(int i = 0; i < parameterCount; i++){ 
    157                                         schemas.Parameter parameter = powerProfileCharacteristic.getParameter(i); 
    158                                         if(parameter.getName().equals("pState")){ 
    159                                                 PState.Builder builder = new PState.Builder(); 
    160                                                 int propertyCount = parameter.getParameterTypeSequence().getPropertyCount(); 
    161                                                 for(int j = 0; j < propertyCount; j++){ 
    162                                                         schemas.Property property = parameter.getParameterTypeSequence().getProperty(j); 
    163                                                         if(property.getName().equals("name")){ 
    164                                                                  builder = builder.name(property.getStringValueWithUnit(0).getContent()); 
    165                                                         } else if (property.getName().equals("frequency")){ 
    166                                                                  builder = builder.frequency(Double.valueOf(property.getStringValueWithUnit(0).getContent())); 
    167                                                         } else if (property.getName().equals("voltage")){ 
    168                                                                 builder = builder.voltage(Double.valueOf(property.getStringValueWithUnit(0).getContent())); 
    169                                                         } else if (property.getName().equals("powerUsage")){ 
    170                                                                 if(property.getStringValueWithUnit(0).getContent() != null && property.getStringValueWithUnit(0).getContent().length() > 0){ 
    171                                                                         builder = builder.powerUsage(Double.valueOf(property.getStringValueWithUnit(0).getContent()));   
    172                                                                 } 
    173                                                         } else if (property.getName().equals("powerUsageMin")){ 
    174                                                                 if(property.getStringValueWithUnit(0).getContent() != null && property.getStringValueWithUnit(0).getContent().length() > 0){ 
    175                                                                         builder = builder.powerUsageMin(Double.valueOf(property.getStringValueWithUnit(0).getContent()));        
    176                                                                 } 
    177                                                         } else if (property.getName().equals("powerUsageMax")){ 
    178                                                                 if(property.getStringValueWithUnit(0).getContent() != null && property.getStringValueWithUnit(0).getContent().length() > 0){ 
    179                                                                         builder = builder.powerUsageMax(Double.valueOf(property.getStringValueWithUnit(0).getContent()));        
    180                                                                 } 
    181                                                         } 
    182                                                 } 
    183                                                 PState pState = builder.build(); 
    184                                                 pStates.add(pState); 
    185                                         } 
    186                                 }        
    187                         } 
    188                         this.powerProfile = new PowerProfile(energyEstimationPlugin, powerStates, pStates); 
    189                         Parameters params = extractParameters(powerProfileCharacteristic.getParameter()); 
    190                         this.powerProfile.init(params); 
    19169                } 
    19270        } 
    19371 
    194         private void initAirThroughputProfile(schemas.AirThroughputProfile airThroughputProfile) { 
    195                 if (airThroughputProfile != null) { 
    196                          
    197                         AirThroughputEstimationPlugin airThroughputEstimationPlugin = null; 
    198                         List<AirThroughputState> airThroughputStates = null; 
    199                         if(airThroughputProfile.getAirThroughputEstimationPlugin() != null){ 
    200                                 String airThroughputEstimationPluginName = airThroughputProfile.getAirThroughputEstimationPlugin().getName(); 
    201                                 if(airThroughputEstimationPluginName != null) { 
    202                                         airThroughputEstimationPlugin = (AirThroughputEstimationPlugin) InstanceFactory.createInstance( 
    203                                                         airThroughputEstimationPluginName, AirThroughputEstimationPlugin.class);                         
    204                                 } else { 
    205                                         airThroughputEstimationPlugin = new DefaultAirThroughputEstimationPlugin(); 
    206                                 } 
    207                                 Parameters params = extractParameters(airThroughputProfile.getAirThroughputEstimationPlugin().getParameter()); 
    208                                 airThroughputEstimationPlugin.init(params); 
    209                         } 
    210                         if(airThroughputProfile.getAirThroughputStates() != null){ 
    211                                 airThroughputStates = new ArrayList<AirThroughputState>(); 
    212                                 int airThrouhputStateCount = airThroughputProfile.getAirThroughputStates().getAirThroughputStateCount(); 
    213                                 for (int i = 0; i < airThrouhputStateCount; i++) { 
    214                                         schemas.AirThroughputState ats = airThroughputProfile.getAirThroughputStates().getAirThroughputState(i); 
    215                                         AirThroughputState airThroughputState = new AirThroughputState(ats.getName(), ats.getValue() 
    216                                                         .getContent(), ats.getPowerUsage().getContent()); 
    217                                         Parameters params = extractParameters(ats.getParameter()); 
    218                                         airThroughputState.init(params); 
    219                                         airThroughputStates.add(airThroughputState); 
    220                                 } 
    221                         } 
    222                         this.airThroughputProfile = new AirThroughputProfile(airThroughputEstimationPlugin, airThroughputStates); 
    223                         Parameters params = extractParameters(airThroughputProfile.getParameter()); 
    224                         this.airThroughputProfile.init(params); 
    225                 } 
     72        public String getCompResourceParameterValue(String name){ 
     73                return getParameters().get(name).get(0).getContent(); 
    22674        } 
    227          
    228         private void initThermalProfile(schemas.ThermalProfile thermalProfile) { 
    229                  
    230                 if (thermalProfile != null) { 
    231                          
    232                         TemperatureEstimationPlugin temperatureEstimationPlugin = null; 
    233  
    234                         if(thermalProfile.getTemperatureEstimationPlugin() != null){ 
    235                                 String temperatureEstimationPluginName = thermalProfile.getTemperatureEstimationPlugin().getName(); 
    236                                 if(temperatureEstimationPluginName != null) { 
    237                                         temperatureEstimationPlugin = (TemperatureEstimationPlugin) InstanceFactory.createInstance( 
    238                                                         temperatureEstimationPluginName, TemperatureEstimationPlugin.class);                     
    239                                 } else { 
    240                                         temperatureEstimationPlugin = new DefaultTemperatureEstimationPlugin(); 
    241                                 } 
    242                                 Parameters params = extractParameters(thermalProfile.getTemperatureEstimationPlugin().getParameter()); 
    243                                 temperatureEstimationPlugin.init(params); 
    244                         } 
    245                         this.thermalProfile = new ThermalProfile(); 
    246                         Parameters params = extractParameters(thermalProfile.getParameter()); 
    247                         this.thermalProfile.init(params); 
    248                 } 
    249         } 
    250          
    251         private void initLocation(schemas.Location l) { 
    252                 if (location != null) { 
    253                         this.location = new Location(l.getHorizontal(), l.getVertical(), l.getDepth()); 
    254                         Parameters params = extractParameters(l.getParameter()); 
    255                         this.location.init(params); 
    256                 } 
    257         } 
    258  
    25975 
    26076        /*private Properties initProperties(schemas.Parameter[] parameters){ 
     
    285101                return prop; 
    286102        }*/ 
    287          
    288         private Parameters extractParameters(schemas.Parameter[] parameters){ 
    289                  
    290                 Parameters params = null; 
    291                  
    292                 if(parameters.length != 0) 
    293                         params = new Parameters(); 
    294                  
    295                 for(int i = 0; i < parameters.length; i++){ 
    296                         schemas.Parameter parameter = parameters[i]; 
    297                         Parameter param = new Parameter(parameter.getName()); 
    298                         if(parameter.getParameterTypeSequence() != null && parameter.getParameterTypeSequence().getProperty() != null) 
    299                         {                                                        
    300                                 int propertyCount = parameter.getParameterTypeSequence().getPropertyCount(); 
    301                                 for(int j = 0; j < propertyCount; j++){ 
    302                                         schemas.Property property = parameter.getParameterTypeSequence().getProperty(j); 
    303                                         Property prop = new Property(property.getName()); 
    304                                         int stringValueWithUnitCount = property.getStringValueWithUnitCount(); 
    305                                         for(int k = 0; k < stringValueWithUnitCount; k++){ 
    306                                                 prop.add(property.getStringValueWithUnit(k)); 
    307                                         } 
    308                                         param.addProperty(prop); 
    309                                 } 
    310                         } else { 
    311                                 int stringValueWithUnitCount =  parameter.getStringValueWithUnitCount(); 
    312                                 for(int j = 0; j < stringValueWithUnitCount; j++){ 
    313                                         param.add(parameter.getStringValueWithUnit(j)); 
    314                                 } 
    315                         } 
    316                         params.put(parameter.getName(), param); 
    317                 } 
    318                 return params; 
    319         } 
    320103 
    321         public PowerProfile getPowerProfile() { 
    322                 return powerProfile; 
    323         } 
    324104 
    325         public AirThroughputProfile getAirThroughputProfile() { 
    326                 return airThroughputProfile; 
    327         } 
    328  
    329         public ThermalProfile getThermalProfile() { 
    330                 return thermalProfile; 
    331         } 
    332          
    333         public Location getLocation() { 
    334                 return location; 
    335         } 
    336  
    337         public String getCategory() { 
    338                 return category; 
     105        public List<Device> getDevices() { 
     106                return devices; 
    339107        } 
    340108 
    341109 
    342         /***COOLEMALL CASE RELATED***/ 
    343  
    344         private static ResourceBundle recsBundle; 
    345          
    346         private ResourceBundle getRecsBundle(String fileName) throws FileNotFoundException, IOException{ 
    347                 if(recsBundle == null){ 
    348                         recsBundle = new PropertyResourceBundle(new FileInputStream(fileName)); 
     110        public void addResourceUnit(ResourceUnit unit) { 
     111                if (this.resUnits == null) 
     112                        this.resUnits = new HashMap<ResourceUnitName, List<ResourceUnit>>(1); 
     113                List<ResourceUnit> list = null; 
     114                if (this.resUnits.containsKey(unit.getName())) { 
     115                        list = this.resUnits.get(unit.getName()); 
     116                } else { 
     117                        list = new ArrayList<ResourceUnit>(1); 
     118                        this.resUnits.put(unit.getName(), list); 
    349119                } 
    350                 return recsBundle; 
     120                list.add(unit); 
    351121        } 
    352122         
    353         protected String getEEP(String query, String fileName) throws FileNotFoundException, IOException{ 
    354                 ResourceBundle recsBundle = getRecsBundle(fileName); 
    355                 return recsBundle.getString(query); 
     123        public ResourceUnit getResourceUnit(ResourceUnitName unitName) throws NoSuchFieldException { 
     124                return getResourceUnitList(unitName).get(0); 
    356125        } 
    357          
    358         protected String createEEPQuery(ComputingResource compRes) { 
    359                 String query = compRes.getClazz() + "EEP"; 
    360                 return query; 
     126 
     127        public List<ResourceUnit> getResourceUnitList(ResourceUnitName unitName) throws NoSuchFieldException { 
     128                if (resUnits.containsKey(unitName)) 
     129                        return resUnits.get(unitName); 
     130                else 
     131                        throw new NoSuchFieldException("Resource unit " + unitName + " is not available in resource " + this.id); 
     132        } 
     133 
     134        public Collection<ResourceUnit> getResourceUnit() { 
     135                if (resUnits == null) 
     136                        return null; 
     137                List<ResourceUnit> values = new ArrayList<ResourceUnit>(); 
     138                Collection<List<ResourceUnit>> lists = resUnits.values(); 
     139                Iterator<List<ResourceUnit>> itr = lists.iterator(); 
     140 
     141                while (itr.hasNext()) { 
     142                        List<ResourceUnit> list = itr.next(); 
     143                        values.addAll(list); 
     144                } 
     145 
     146                return values; 
     147        } 
     148 
     149        public Map<ResourceUnitName, List<ResourceUnit>> getResourceUnits() { 
     150                return resUnits; 
    361151        } 
    362152} 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/description/ExecutingResourceDescription.java

    r477 r1207  
    11package schedframe.resources.computing.description; 
    22 
    3 import java.util.ArrayList; 
    43import java.util.Collection; 
    5 import java.util.HashMap; 
    6 import java.util.Iterator; 
    74import java.util.List; 
    85import java.util.Map; 
    96 
    10 import schedframe.Parameters; 
    11 import schedframe.resources.ResourceType; 
    127import schedframe.resources.units.ResourceUnit; 
    138import schedframe.resources.units.ResourceUnitName; 
    149 
    15 public class ExecutingResourceDescription extends AbstractResourceDescription { 
     10public interface ExecutingResourceDescription { 
     11         
     12        public void addResourceUnit(ResourceUnit unit); 
     13         
     14        public ResourceUnit getResourceUnit(ResourceUnitName unitName) throws NoSuchFieldException ; 
    1615 
    17         protected Map<ResourceUnitName, List<ResourceUnit>> resUnits; 
    18         protected Parameters parameters; 
     16        public List<ResourceUnit> getResourceUnitList(ResourceUnitName unitName) throws NoSuchFieldException; 
     17 
     18        public Collection<ResourceUnit> getResourceUnit(); 
    1919         
    20         public ExecutingResourceDescription(ResourceType type) { 
    21                 super(type); 
    22         } 
    23  
    24         public Parameters getParameters() { 
    25                 return parameters; 
    26         } 
    27          
    28         public String getCompResourceParameterValue(String name){ 
    29                 return getParameters().get(name).get(0).getContent(); 
    30         } 
    31          
    32         public void addResourceUnit(ResourceUnit unit) { 
    33                 if (this.resUnits == null) 
    34                         this.resUnits = new HashMap<ResourceUnitName, List<ResourceUnit>>(1); 
    35                 List<ResourceUnit> list = null; 
    36                 if (this.resUnits.containsKey(unit.getName())) { 
    37                         list = this.resUnits.get(unit.getName()); 
    38                 } else { 
    39                         list = new ArrayList<ResourceUnit>(1); 
    40                         this.resUnits.put(unit.getName(), list); 
    41                 } 
    42                 list.add(unit); 
    43         } 
    44          
    45         public ResourceUnit getResourceUnit(ResourceUnitName unitName) throws NoSuchFieldException { 
    46                 return getResourceUnitList(unitName).get(0); 
    47         } 
    48  
    49         public List<ResourceUnit> getResourceUnitList(ResourceUnitName unitName) throws NoSuchFieldException { 
    50                 if (resUnits.containsKey(unitName)) 
    51                         return resUnits.get(unitName); 
    52                 else 
    53                         throw new NoSuchFieldException("Resource unit " + unitName + " is not available in resource " + this.id); 
    54         } 
    55  
    56         public Collection<ResourceUnit> getResourceUnit() { 
    57                 if (resUnits == null) 
    58                         return null; 
    59                 List<ResourceUnit> values = new ArrayList<ResourceUnit>(); 
    60                 Collection<List<ResourceUnit>> lists = resUnits.values(); 
    61                 Iterator<List<ResourceUnit>> itr = lists.iterator(); 
    62  
    63                 while (itr.hasNext()) { 
    64                         List<ResourceUnit> list = itr.next(); 
    65                         values.addAll(list); 
    66                 } 
    67  
    68                 return values; 
    69         } 
    70  
    71         public Map<ResourceUnitName, List<ResourceUnit>> getResourceUnits() { 
    72                 return resUnits; 
    73         } 
     20        public Map<ResourceUnitName, List<ResourceUnit>> getResourceUnits(); 
    7421} 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/description/ResourceDescription.java

    r477 r1207  
    55import java.util.List; 
    66 
     7import schedframe.Parameters; 
    78import schedframe.resources.ResourceType; 
    89 
    910 
    10 public abstract class AbstractResourceDescription { 
     11public abstract class ResourceDescription { 
    1112 
    1213        protected String id; 
    1314        protected ResourceType type; 
    14         protected List<AbstractResourceDescription> children; 
     15        protected List<ResourceDescription> children; 
     16        protected Parameters parameters; 
    1517         
    16         public AbstractResourceDescription(ResourceType type){ 
     18        public ResourceDescription(ResourceType type){ 
    1719                this.type = type; 
    18                 this.children = null; 
    1920        } 
    2021 
    21         public List<AbstractResourceDescription> getChildren() { 
     22        public List<ResourceDescription> getChildren() { 
    2223                return children; 
    2324        } 
    2425         
    25         public void setChildren(List<AbstractResourceDescription> children) { 
     26        public void setChildren(List<ResourceDescription> children) { 
    2627                this.children = children; 
    2728        } 
    2829         
    29         public void addChildren(AbstractResourceDescription child) { 
     30        public void addChildren(ResourceDescription child) { 
    3031                //child.setParent(this); 
    3132                if(children == null) 
    32                         children = new ArrayList<AbstractResourceDescription> (1); 
     33                        children = new ArrayList<ResourceDescription> (1); 
    3334                this.children.add(child); 
    3435        } 
     
    4041        public ResourceType getType() { 
    4142                return type; 
     43        } 
     44         
     45        public Parameters getParameters() { 
     46                return parameters; 
    4247        } 
    4348         
Note: See TracChangeset for help on using the changeset viewer.