Package com.uppaal.model.core2
Class Location
- java.lang.Object
-
- com.uppaal.model.core2.Element
-
- com.uppaal.model.core2.Node
-
- com.uppaal.model.core2.AbstractLocation
-
- com.uppaal.model.core2.Location
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class Location extends AbstractLocation
Location models the location part of the state of a timed automaton.A
Location
may have labels and attributes modeled asProperty
s:"init", "committed", "urgent", "name", "invariant", "exponentialrate", "comments", "color", "x", "y".
SeeDocument
on how to manipulate locations without editorCommand
s.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(Visitor visitor)
Accept a visitor.String
getName()
Constructs a human-friendly name of this location.Element
getPrototypeFromParent(Element parent)
Return the proper prototype for this element stored in the parent.String[]
getXMLLabelKinds()
Returns possible XML label kinds this element supports.Property
setProperty(String property, Object value)
When setting the init property to true, the init property of all other locations in the same template is removed.-
Methods inherited from class com.uppaal.model.core2.Node
clone, getFirst, getLast, getNext, getPrevious, getXPathTag, insert, move, remove, setPrototype
-
Methods inherited from class com.uppaal.model.core2.Element
acceptSafe, addListener, getColor, getCommandManager, getDocument, getLocalProperty, getParent, getProperties, getProperty, getPropertyValue, getPrototype, getTemplate, getX, getXPath, getY, hasFlag, importInto, isPropertyLocal, removeListener, setCommandManager, setProperties, setPropertyFromPath
-
-
-
-
Constructor Detail
-
Location
public Location(Element prototype)
Creates a location based on a given prototype. UseTemplate.createLocation
instead and then insert it into the Template.- Parameters:
prototype
- the prototype containing default properties.- See Also:
Template.createLocation()
-
-
Method Detail
-
accept
public void accept(Visitor visitor) throws Exception
Description copied from class:Element
Accept a visitor. This method is specialized in every subclass. Part of the visitor pattern.
-
setProperty
public Property setProperty(String property, Object value)
When setting the init property to true, the init property of all other locations in the same template is removed.- Overrides:
setProperty
in classElement
- Parameters:
property
- - The location property stringvalue
- - The property value- Returns:
- the property object.
-
getPrototypeFromParent
public Element getPrototypeFromParent(Element parent)
Description copied from class:Element
Return the proper prototype for this element stored in the parent. This is used by importInto().- Overrides:
getPrototypeFromParent
in classElement
- Parameters:
parent
- - The parent element- Returns:
- the #location property value of the parent argument.
-
getName
public String getName()
Description copied from class:AbstractLocation
Constructs a human-friendly name of this location. Basically it is the value of the "name" property, except that it will give a unicode symbol in case it is anonymous.- Specified by:
getName
in classAbstractLocation
- Returns:
- the "name" property
-
getXMLLabelKinds
public String[] getXMLLabelKinds()
Description copied from class:Element
Returns possible XML label kinds this element supports.- Overrides:
getXMLLabelKinds
in classElement
- Returns:
-
-