Constructor and Description |
---|
DefaultModel()
Make a new instance that rely on a
DefaultElementBuilder . |
DefaultModel(ElementBuilder eb)
Make a new instance relying on a given element builders.
|
Modifier and Type | Method and Description |
---|---|
boolean |
attach(ModelView v)
Attach a view to the model.
|
void |
clearViews()
Detach all the views from this model.
|
Model |
clone()
Clone a model.
|
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)
Detach a view from this model.
|
boolean |
equals(Object o) |
Attributes |
getAttributes()
Get the attributes of the elements in the model.
|
Mapping |
getMapping()
Get the mapping associated to this 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 a)
Set the attributes for the elements in the model.
|
String |
toString() |
public DefaultModel()
DefaultElementBuilder
.public DefaultModel(ElementBuilder eb)
eb
- the builder to usepublic ModelView getView(String id)
Model
public boolean attach(ModelView v)
Model
public Collection<ModelView> getViews()
Model
public Mapping getMapping()
Model
getMapping
in interface Model
public boolean detach(ModelView v)
Model
public void clearViews()
Model
clearViews
in interface Model
public Attributes getAttributes()
Model
getAttributes
in interface Model
public void setAttributes(Attributes a)
Model
setAttributes
in interface Model
a
- the attributes to setpublic 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.