| Package | net.systemeD.halcyon.connection |
| Class | public class Entity |
| Inheritance | Entity flash.events.EventDispatcher |
| Subclasses | Changeset, EntityCollection, Marker, Node, Relation, Way |
| Property | Defined by | ||
|---|---|---|---|
| connection : Connection
[read-only] Connection to which this entity belongs.
| Entity | ||
| deleted : Boolean = false | Entity | ||
| entities : Array [read-only] List of entities.
| Entity | ||
| hasParents : Boolean [read-only] Whether this entity has any parents.
| Entity | ||
| hasParentWays : Boolean [read-only] Whether this entity has any parents that are Ways.
| Entity | ||
| id : Number [read-only] OSM ID.
| Entity | ||
| isDirty : Boolean [read-only] Check if entity is modified since last markClean().
| Entity | ||
| loaded : Boolean [read-only] Is entity fully loaded, or is it just a placeholder reference (as a relation member)?
| Entity | ||
| locked : Boolean = false Lock against purging when off-screen
| Entity | ||
| memberships : Array [read-only] Returns all relations that this Entity is part of, as array of {relation, position, role}, sorted by position.
| Entity | ||
| numParentWays : uint [read-only] How many parents are Ways?
| Entity | ||
| parentObjects : Array [read-only] All parents of this entity.
| Entity | ||
| parentRelations : Array [read-only] All parents that are Relations
| Entity | ||
| parentsLoaded : Boolean = true Have all its parents (ie, relations that contain this object as a member, ways that contain this node) been loaded into memory
| Entity | ||
| parentWays : Array [read-only] Get array of all Ways of which this object (presumably a node) is a child.
| Entity | ||
| status : String | Entity | ||
| timestamp : String [read-only] Most recent modification of the entity (from OSM API).
| Entity | ||
| uid : Number [read-only] User ID who last edited this entity (from OSM API).
| Entity | ||
| version : uint [read-only] Current version number.
| Entity | ||
| Method | Defined by | ||
|---|---|---|---|
|
Entity(connection:Connection, id:Number, version:uint, tags:Object, loaded:Boolean, uid:Number, timestamp:String)
| Entity | ||
|
Create parent link from this entity to another.
| Entity | ||
|
countParentObjects(within:Object):uint
How many parents does this entity have that satisfy the "within" constraint?
| Entity | ||
|
findParentRelationsOfType(type:String, role:String = null):Array
Returns parents that are relations, and of the specified type, and of which this entity is the correct role (if provided).
| Entity | ||
|
getDescription():String
Basic description of Entity - should be overriden by subclass.
| Entity | ||
|
getRelationMemberships():Array
| Entity | ||
|
getTag(key:String):String
Retrieve a tag by key.
| Entity | ||
|
getTagArray():Array
Returns an array that duplicates the tags on this entity.
| Entity | ||
| Entity | |||
|
getTagsCopy():Object
Returns an object that duplicates the tags on this entity.
| Entity | ||
|
getTagsHash():Object
| Entity | ||
|
getType():String
The type of Entity (node, way etc).
| Entity | ||
|
hasInterestingTags():Boolean
Whether the entity has any tags other than meta-tags (attribution, created_by, source, tiger:...)
| Entity | ||
|
Whether 'entity' is a parent of this Entity.
| Entity | ||
|
hasTags():Boolean
Whether the entity has > 0 tags.
| Entity | ||
|
isDeleted():Boolean
Whether entity is marked deleted.
| Entity | ||
|
isEmpty():Boolean
Whether entity is "empty" - to be overridden by subclass.
| Entity | ||
|
isType(str:String):Boolean
Compare type against supplied string
| Entity | ||
|
isUneditedTiger():Boolean
Rough function to detect entities untouched since TIGER import.
| Entity | ||
|
markClean():void
Reset modified flag.
| Entity | ||
|
markDirty():void
Set entity as modified.
| Entity | ||
|
Copy tags from another entity into this one, creating "key=value1; value2" pairs if necessary.
| Entity | ||
|
nullify():void
Free up memory by converting entity to a dummy entity, for entities that we no longer need
but which are part of a still-in-memory relation
| Entity | ||
|
remove(performAction:Function):void
Delete entity - must be overridden.
| Entity | ||
|
removeFromParents(performAction:Function):void
| Entity | ||
|
removeParent(parent:Entity):void
Remove parent link.
| Entity | ||
|
renameTag(oldKey:String, newKey:String, performAction:Function):void
Change oldKey=[value] to newKey=[value], with optional undoability.
| Entity | ||
|
renumber(newID:Number, newVersion:uint):void
Assign a new ID and version.
| Entity | ||
|
resume():void
Resume redrawing of the object
| Entity | ||
|
Compare tags between two entities.
| Entity | ||
|
setDeletedState(isDeleted:Boolean):void
Mark entity as deleted.
| Entity | ||
|
setStatus(s:String):void
Change entity status.
| Entity | ||
|
setTag(key:String, value:String, performAction:Function):void
Set key=value, with optional undoability.
| Entity | ||
|
suspend():void
Temporarily prevent redrawing of the object.
| Entity | ||
|
tagIs(key:String, value:String):Boolean
| Entity | ||
|
updateEntityProperties(version:uint, tags:Object, loaded:Boolean, parentsLoaded:Boolean, uid:Number, timestamp:String):void
Set a bunch of properties in one hit.
| Entity | ||
|
within(left:Number, right:Number, top:Number, bottom:Number):Boolean
| Entity | ||
| Method | Defined by | ||
|---|---|---|---|
|
nullifyEntity():void
Implement nullifybehaviour: delete tags, etc.
| Entity | ||
| connection | property |
connection:Connection [read-only]Connection to which this entity belongs.
Implementation public function get connection():Connection
| deleted | property |
public var deleted:Boolean = false
| entities | property |
entities:Array [read-only]List of entities. Overridden by EntityCollection.
Implementation public function get entities():Array
| hasParents | property |
hasParents:Boolean [read-only]Whether this entity has any parents.
Implementation public function get hasParents():Boolean
| hasParentWays | property |
hasParentWays:Boolean [read-only]Whether this entity has any parents that are Ways.
Implementation public function get hasParentWays():Boolean
| id | property |
id:Number [read-only]OSM ID.
Implementation public function get id():Number
| isDirty | property |
isDirty:Boolean [read-only]Check if entity is modified since last markClean().
Implementation public function get isDirty():Boolean
| loaded | property |
loaded:Boolean [read-only]Is entity fully loaded, or is it just a placeholder reference (as a relation member)?
Implementation public function get loaded():Boolean
| locked | property |
public var locked:Boolean = falseLock against purging when off-screen
| memberships | property |
memberships:Array [read-only]Returns all relations that this Entity is part of, as array of {relation, position, role}, sorted by position.
Implementation public function get memberships():Array
| numParentWays | property |
numParentWays:uint [read-only]How many parents are Ways?
Implementation public function get numParentWays():uint
| parentObjects | property |
parentObjects:Array [read-only]All parents of this entity.
Implementation public function get parentObjects():Array
| parentRelations | property |
parentRelations:Array [read-only]All parents that are Relations
Implementation public function get parentRelations():Array
| parentsLoaded | property |
public var parentsLoaded:Boolean = trueHave all its parents (ie, relations that contain this object as a member, ways that contain this node) been loaded into memory
| parentWays | property |
parentWays:Array [read-only]Get array of all Ways of which this object (presumably a node) is a child.
Implementation public function get parentWays():Array
| status | property |
public var status:String
| timestamp | property |
timestamp:String [read-only]Most recent modification of the entity (from OSM API).
Implementation public function get timestamp():String
| uid | property |
uid:Number [read-only]User ID who last edited this entity (from OSM API).
Implementation public function get uid():Number
| version | property |
version:uint [read-only]Current version number.
Implementation public function get version():uint
| Entity | () | constructor |
public function Entity(connection:Connection, id:Number, version:uint, tags:Object, loaded:Boolean, uid:Number, timestamp:String)Parameters
connection:Connection |
|
id:Number |
|
version:uint |
|
tags:Object |
|
loaded:Boolean |
|
uid:Number |
|
timestamp:String |
| addParent | () | method |
public function addParent(parent:Entity):voidCreate parent link from this entity to another.
Parametersparent:Entity |
| countParentObjects | () | method |
public function countParentObjects(within:Object):uintHow many parents does this entity have that satisfy the "within" constraint?
Parameterswithin:Object |
uint |
| findParentRelationsOfType | () | method |
public function findParentRelationsOfType(type:String, role:String = null):ArrayReturns parents that are relations, and of the specified type, and of which this entity is the correct role (if provided).
Parameterstype:String |
|
role:String (default = null) |
Array |
| getDescription | () | method |
public function getDescription():StringBasic description of Entity - should be overriden by subclass.
ReturnsString |
| getRelationMemberships | () | method |
public function getRelationMemberships():Array
Returns
Array |
| getTag | () | method |
public function getTag(key:String):StringRetrieve a tag by key.
Parameterskey:String |
String |
| getTagArray | () | method |
public function getTagArray():ArrayReturns an array that duplicates the tags on this entity.
ReturnsArray |
| getTagList | () | method |
| getTagsCopy | () | method |
public function getTagsCopy():ObjectReturns an object that duplicates the tags on this entity.
ReturnsObject |
| getTagsHash | () | method |
public function getTagsHash():Object
Returns
Object |
| getType | () | method |
public function getType():StringThe type of Entity (node, way etc). By default, returns ''.
ReturnsString |
| hasInterestingTags | () | method |
public function hasInterestingTags():BooleanWhether the entity has any tags other than meta-tags (attribution, created_by, source, tiger:...)
ReturnsBoolean |
| hasParent | () | method |
public function hasParent(entity:Entity):BooleanWhether 'entity' is a parent of this Entity.
Parametersentity:Entity |
Boolean |
| hasTags | () | method |
public function hasTags():BooleanWhether the entity has > 0 tags.
ReturnsBoolean |
| isDeleted | () | method |
public function isDeleted():BooleanWhether entity is marked deleted.
ReturnsBoolean |
| isEmpty | () | method |
public function isEmpty():BooleanWhether entity is "empty" - to be overridden by subclass.
ReturnsBoolean |
| isType | () | method |
public function isType(str:String):BooleanCompare type against supplied string
Parametersstr:String |
Boolean |
| isUneditedTiger | () | method |
public function isUneditedTiger():BooleanRough function to detect entities untouched since TIGER import.
ReturnsBoolean |
| markClean | () | method |
public function markClean():voidReset modified flag. You should not be calling this directly, instead you should be calling markClean from your UndoableEntityAction
| markDirty | () | method |
public function markDirty():voidSet entity as modified. You should not be calling this directly, instead you should be calling markDirty from your UndoableEntityAction
| mergeTags | () | method |
public function mergeTags(source:Entity, performAction:Function):BooleanCopy tags from another entity into this one, creating "key=value1; value2" pairs if necessary.
Parameterssource:Entity |
|
performAction:Function |
Boolean — Array of keys that require manual merging, in order to warn the user. |
| nullify | () | method |
public function nullify():voidFree up memory by converting entity to a dummy entity, for entities that we no longer need but which are part of a still-in-memory relation
| nullifyEntity | () | method |
protected function nullifyEntity():voidImplement nullifybehaviour: delete tags, etc.
| remove | () | method |
public function remove(performAction:Function):voidDelete entity - must be overridden.
ParametersperformAction:Function |
| removeFromParents | () | method |
public function removeFromParents(performAction:Function):voidParameters
performAction:Function |
| removeParent | () | method |
| renameTag | () | method |
public function renameTag(oldKey:String, newKey:String, performAction:Function):voidChange oldKey=[value] to newKey=[value], with optional undoability.
ParametersoldKey:String — Name of key to rename
|
|
newKey:String — Single-argument function to pass a SetTagKeyAction to.
|
|
performAction:Function |
| renumber | () | method |
public function renumber(newID:Number, newVersion:uint):voidAssign a new ID and version.
ParametersnewID:Number |
|
newVersion:uint |
| resume | () | method |
public function resume():voidResume redrawing of the object
| sameTags | () | method |
public function sameTags(entity:Entity):BooleanCompare tags between two entities.
Parametersentity:Entity |
Boolean |
| setDeletedState | () | method |
public function setDeletedState(isDeleted:Boolean):voidMark entity as deleted.
ParametersisDeleted:Boolean |
| setStatus | () | method |
public function setStatus(s:String):voidChange entity status.
Parameterss:String |
| setTag | () | method |
public function setTag(key:String, value:String, performAction:Function):voidSet key=value, with optional undoability.
Parameterskey:String — Name of key to set
|
|
value:String — Value to set tag to
|
|
performAction:Function — Single-argument function to pass a SetTagAction to.
|
| suspend | () | method |
public function suspend():voidTemporarily prevent redrawing of the object.
| tagIs | () | method |
public function tagIs(key:String, value:String):BooleanParameters
key:String |
|
value:String |
Boolean — true if there exists key=value |
| updateEntityProperties | () | method |
public function updateEntityProperties(version:uint, tags:Object, loaded:Boolean, parentsLoaded:Boolean, uid:Number, timestamp:String):voidSet a bunch of properties in one hit. Implicitly makes entity not deleted.
Parametersversion:uint |
|
tags:Object |
|
loaded:Boolean |
|
parentsLoaded:Boolean |
|
uid:Number |
|
timestamp:String |
| within | () | method |
public function within(left:Number, right:Number, top:Number, bottom:Number):BooleanParameters
left:Number |
|
right:Number |
|
top:Number |
|
bottom:Number |
Boolean |