public class EntityInstance extends Object
The EntityInstance gives access to an EXPRESS entity instance generated i.e. by reading in a SPFF / p21 file.
Depending on the type of the EntityInstance that can be retrieved with the getEntityDefinition() function, the attributes can be retrieved as an ArrayList or by their name.
Member functions that have a "BN" in their name, e.g. "getAttributeValueBN" take a string argument to get a certain attribute value by its name according to the schema definition. (Roughly oriented at SDAI)
| Constructor and Description |
|---|
EntityInstance(ModelPopulation model,
int id) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(AttributeInstance attribute) |
void |
addReference(EntityInstance instance) |
ArrayList<AttributeInstance> |
getAttributes()
disscuraged to call this and operate on the attributes
directly
|
Object |
getAttributeValueBN(String attributeName)
get an attribute of this EntityInstance by its name an return its value
as an Object.
|
EntityInstance |
getAttributeValueBNasEntityInstance(String attributeName)
Try to get the attribute by its name and return it as an EntityInstance
|
ArrayList<EntityInstance> |
getAttributeValueBNasEntityInstanceList(String attributeName) |
String |
getAttributeValueBNasString(String attributeName)
get an attribute value by its name and return the value as a string
|
EntityDefinition |
getEntityDefinition() |
int |
getId() |
ModelPopulation |
getModel() |
int |
getNumAttribues()
get the number of attributes of this instance
|
ArrayList<EntityInstance> |
getReferneces() |
void |
setAttributes(ArrayList<AttributeInstance> attributes) |
void |
setEntityDefinition(EntityDefinition entDef) |
void |
setId(int id) |
void |
setModel(ModelPopulation model) |
void |
setReferneces(ArrayList<EntityInstance> referneces) |
public EntityInstance(ModelPopulation model, int id)
public ArrayList<AttributeInstance> getAttributes()
public void addAttribute(AttributeInstance attribute)
public void setAttributes(ArrayList<AttributeInstance> attributes)
public EntityDefinition getEntityDefinition()
public void setEntityDefinition(EntityDefinition entDef)
public int getId()
public void setId(int id)
public ArrayList<EntityInstance> getReferneces()
public void addReference(EntityInstance instance)
public void setReferneces(ArrayList<EntityInstance> referneces)
public Object getAttributeValueBN(String attributeName)
attributeName - public String getAttributeValueBNasString(String attributeName)
attributeName - public int getNumAttribues()
public EntityInstance getAttributeValueBNasEntityInstance(String attributeName)
attributeName - public ArrayList<EntityInstance> getAttributeValueBNasEntityInstanceList(String attributeName)
attributeName - the case-sensitive name of the AttributeInstance to retrievepublic ModelPopulation getModel()
public void setModel(ModelPopulation model)
Copyright © 2018 OpenSource BIM. All rights reserved.