source: DCWoRMS/branches/coolemall/src/schedframe/resources/computing/description/ResourceDescription.java @ 1207

Revision 1207, 1.2 KB checked in by wojtekp, 11 years ago (diff)
  • Property svn:mime-type set to text/plain
Line 
1package schedframe.resources.computing.description;
2
3
4import java.util.ArrayList;
5import java.util.List;
6
7import schedframe.Parameters;
8import schedframe.resources.ResourceType;
9
10
11public abstract class ResourceDescription {
12
13        protected String id;
14        protected ResourceType type;
15        protected List<ResourceDescription> children;
16        protected Parameters parameters;
17       
18        public ResourceDescription(ResourceType type){
19                this.type = type;
20        }
21
22        public List<ResourceDescription> getChildren() {
23                return children;
24        }
25       
26        public void setChildren(List<ResourceDescription> children) {
27                this.children = children;
28        }
29       
30        public void addChildren(ResourceDescription child) {
31                //child.setParent(this);
32                if(children == null)
33                        children = new ArrayList<ResourceDescription> (1);
34                this.children.add(child);
35        }
36
37        public String getId(){
38                return this.id;
39        }
40
41        public ResourceType getType() {
42                return type;
43        }
44       
45        public Parameters getParameters() {
46                return parameters;
47        }
48       
49        /*protected AbstractResourceDescription parent;
50        /public AbstractResourceDescription getParent() {
51                return parent;
52        }
53
54        public void setParent(AbstractResourceDescription parent) {
55                this.parent = parent;
56        }*/
57       
58        /*public enum ResourceType {
59                COMPUTING_RESOURCE,
60                QUEUING_SYSTEM;
61        }
62        */
63       
64}
Note: See TracBrowser for help on using the repository browser.