public class SubModel extends Object implements Model
Constructor and Description |
---|
SubModel(Model p,
ElementBuilder b,
Collection<Node> ns)
Make a new sub-model with an empty scope for ready VMs.
|
SubModel(Model p,
ElementBuilder b,
Collection<Node> nodeScope,
Set<VM> vmReady)
Make a new sub-model.
|
Modifier and Type | Method and Description |
---|---|
boolean |
attach(ModelView v)
Unsupported.
|
void |
clearViews()
Unsupported.
|
Model |
clone()
Clone this model using a
DefaultModel . |
boolean |
contains(Node n)
Check if a given node has been defined for this model.
|
boolean |
contains(VM v)
Check if a given VM has been defined for this model.
|
boolean |
detach(ModelView v)
Unsupported.
|
boolean |
equals(Object o) |
Attributes |
getAttributes()
Get the attributes of the elements in the model.
|
SubMapping |
getMapping()
Get a mapping that is limited to the given scope.
|
Collection<Node> |
getScope()
Get the scope of the model.
|
ModelView |
getView(String id)
Get a view already attached to the model
|
Collection<ModelView> |
getViews()
Get all the view attached to the model.
|
int |
hashCode() |
Node |
newNode()
Generate a new Node for this model.
|
Node |
newNode(int id)
Generate a new node for this model.
|
VM |
newVM()
Generate a new VM.
|
VM |
newVM(int id)
Generate a new VM.
|
void |
setAttributes(Attributes attrs)
Unsupported.
|
String |
toString() |
public SubModel(Model p, ElementBuilder b, Collection<Node> ns)
p
- the parent modelb
- the element builder to rely onns
- the node to restrict the model on.public SubModel(Model p, ElementBuilder b, Collection<Node> nodeScope, Set<VM> vmReady)
p
- the parent modelb
- the element builder to rely onnodeScope
- the node to restrict the model on.vmReady
- the scope of VMs that are ready in the parent model.public Collection<Node> getScope()
public ModelView getView(String id)
Model
public Collection<ModelView> getViews()
Model
public boolean attach(ModelView v)
public boolean detach(ModelView v)
public void clearViews()
clearViews
in interface Model
public SubMapping getMapping()
getMapping
in interface Model
public Attributes getAttributes()
Model
getAttributes
in interface Model
public void setAttributes(Attributes attrs)
setAttributes
in interface Model
attrs
- the attributes to setpublic Model clone()
DefaultModel
.public VM newVM()
ElementBuilder
newVM
in interface ElementBuilder
null
if no identifiers are available for the VM.public VM newVM(int id)
ElementBuilder
newVM
in interface ElementBuilder
id
- the identifier to use for that VMnull
if the identifier is already usedpublic Node newNode()
ElementBuilder
newNode
in interface ElementBuilder
null
if no identifiers are available for the Node.public Node newNode(int id)
ElementBuilder
newNode
in interface ElementBuilder
id
- the identifier to use for that nodenull
if the identifier is already usedpublic boolean contains(VM v)
ElementBuilder
contains
in interface ElementBuilder
v
- the VM to checktrue
iff the VM is already definedpublic boolean contains(Node n)
ElementBuilder
contains
in interface ElementBuilder
n
- the node to checktrue
iff the VM is bookedCopyright © 2015 University of Nice-Sophia Antipolis. All Rights Reserved.