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 as
Propertys:
"init", "committed", "urgent", "name", "invariant", "exponentialrate",
"comments", "color", "x", "y".
See Document on how to manipulate locations without editor
Commands.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description voidaccept(Visitor visitor)Accept a visitor.StringgetName()Constructs a human-friendly name of this location.ElementgetPrototypeFromParent(Element parent)Return the proper prototype for this element stored in the parent.String[]getXMLLabelKinds()Returns possible XML label kinds this element supports.PropertysetProperty(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, setPrototypeMethods 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 Details
-
Location
Creates a location based on a given prototype. UseTemplate.createLocationinstead and then insert it into the Template.- Parameters:
prototype- the prototype containing default properties.- See Also:
Template.createLocation()
-
-
Method Details
-
accept
Description copied from class:ElementAccept a visitor. This method is specialized in every subclass. Part of the visitor pattern. -
setProperty
When setting the init property to true, the init property of all other locations in the same template is removed.- Overrides:
setPropertyin classElement- Parameters:
property- - The location property stringvalue- - The property value- Returns:
- the property object.
-
getPrototypeFromParent
Description copied from class:ElementReturn the proper prototype for this element stored in the parent. This is used by importInto().- Overrides:
getPrototypeFromParentin classElement- Parameters:
parent- - The parent element- Returns:
- the #location property value of the parent argument.
-
getName
Description copied from class:AbstractLocationConstructs 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:
getNamein classAbstractLocation- Returns:
- the "name" property
-
getXMLLabelKinds
Description copied from class:ElementReturns possible XML label kinds this element supports.- Overrides:
getXMLLabelKindsin classElement- Returns:
-