Revision 1207,
1.2 KB
checked in by wojtekp, 11 years ago
(diff) |
|
-
Property svn:mime-type set to
text/plain
|
Rev | Line | |
---|
[477] | 1 | package schedframe.resources.computing.description; |
---|
| 2 | |
---|
| 3 | |
---|
| 4 | import java.util.ArrayList; |
---|
| 5 | import java.util.List; |
---|
| 6 | |
---|
[1207] | 7 | import schedframe.Parameters; |
---|
[477] | 8 | import schedframe.resources.ResourceType; |
---|
| 9 | |
---|
| 10 | |
---|
[1207] | 11 | public abstract class ResourceDescription { |
---|
[477] | 12 | |
---|
| 13 | protected String id; |
---|
| 14 | protected ResourceType type; |
---|
[1207] | 15 | protected List<ResourceDescription> children; |
---|
| 16 | protected Parameters parameters; |
---|
[477] | 17 | |
---|
[1207] | 18 | public ResourceDescription(ResourceType type){ |
---|
[477] | 19 | this.type = type; |
---|
| 20 | } |
---|
| 21 | |
---|
[1207] | 22 | public List<ResourceDescription> getChildren() { |
---|
[477] | 23 | return children; |
---|
| 24 | } |
---|
| 25 | |
---|
[1207] | 26 | public void setChildren(List<ResourceDescription> children) { |
---|
[477] | 27 | this.children = children; |
---|
| 28 | } |
---|
| 29 | |
---|
[1207] | 30 | public void addChildren(ResourceDescription child) { |
---|
[477] | 31 | //child.setParent(this); |
---|
| 32 | if(children == null) |
---|
[1207] | 33 | children = new ArrayList<ResourceDescription> (1); |
---|
[477] | 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 | |
---|
[1207] | 45 | public Parameters getParameters() { |
---|
| 46 | return parameters; |
---|
| 47 | } |
---|
| 48 | |
---|
[477] | 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.