source: DCWoRMS/trunk/src/schedframe/resources/computing/description/AbstractResourceDescription.java @ 477

Revision 477, 1.2 KB checked in by wojtekp, 13 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.resources.ResourceType;
8
9
10public abstract class AbstractResourceDescription {
11
12        protected String id;
13        protected ResourceType type;
14        protected List<AbstractResourceDescription> children;
15       
16        public AbstractResourceDescription(ResourceType type){
17                this.type = type;
18                this.children = null;
19        }
20
21        public List<AbstractResourceDescription> getChildren() {
22                return children;
23        }
24       
25        public void setChildren(List<AbstractResourceDescription> children) {
26                this.children = children;
27        }
28       
29        public void addChildren(AbstractResourceDescription child) {
30                //child.setParent(this);
31                if(children == null)
32                        children = new ArrayList<AbstractResourceDescription> (1);
33                this.children.add(child);
34        }
35
36        public String getId(){
37                return this.id;
38        }
39
40        public ResourceType getType() {
41                return type;
42        }
43       
44        /*protected AbstractResourceDescription parent;
45        /public AbstractResourceDescription getParent() {
46                return parent;
47        }
48
49        public void setParent(AbstractResourceDescription parent) {
50                this.parent = parent;
51        }*/
52       
53        /*public enum ResourceType {
54                COMPUTING_RESOURCE,
55                QUEUING_SYSTEM;
56        }
57        */
58       
59}
Note: See TracBrowser for help on using the repository browser.