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
Locationmay have labels and attributes modeled asPropertys:"init", "committed", "urgent", "name", "invariant", "exponentialrate", "comments", "color", "x", "y".SeeDocumenton how to manipulate locations without editorCommands.
-
-
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, 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.createLocationinstead 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:ElementAccept 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:
setPropertyin classElement- Parameters:
property- - The location property stringvalue- - The property value- Returns:
- the property object.
-
getPrototypeFromParent
public Element getPrototypeFromParent(Element parent)
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
public String 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
public String[] getXMLLabelKinds()
Description copied from class:ElementReturns possible XML label kinds this element supports.- Overrides:
getXMLLabelKindsin classElement- Returns:
-
-