jsdai.lang
Class EntityExtent

java.lang.Object
  extended byjsdai.lang.SdaiCommon
      extended byjsdai.lang.EntityExtent

public class EntityExtent
extends jsdai.lang.SdaiCommon

The EntityExtent class groups all entity instances of an SdaiModel into folders. There is one instance of EntityExtent for each entity data type defined or declared in the EXPRESS schema whose definition is underlying for the SdaiModel of interest. A folder corresponding to an entity data type, specified by its definition, contains all instances of this entity data type from the model being an owner of this folder and also all instances of all its subtypes from the same model.
For details please look at "ISO 10303-22::8.4.3 sdai_model_contents" and "ISO 10303-22::8.4.4 entity_extent".


Method Summary
 jsdai.dictionary.EEntity_definition getDefinition()
          Returns the instance of EEntity_definition in "SDAI_dictionary_schema", which represents the type of entity instances contained in this folder.
 java.lang.String getDefinitionString()
          Returns the name of EEntity_definition that represents the type of entity instances contained in this folder.
 AEntity getInstances()
          Returns a read-only aggregate containing all instances from this folder.
 SdaiModel getOwnedBy()
          Returns SdaiModel this EntityExtent belongs to.
 java.lang.String toString()
          Returns a String representing this EntityExtent.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getDefinition

public jsdai.dictionary.EEntity_definition getDefinition()
                                                  throws SdaiException
Returns the instance of EEntity_definition in "SDAI_dictionary_schema", which represents the type of entity instances contained in this folder.

Example:

    EntityExtent folder = ...;
    EEntity_definition def = folder.getDefinition();

Returns:
definition of entity whose instances are contained in this folder.
Throws:
SdaiException - ED_NVLD, entity definition invalid.
See Also:
getDefinitionString()

getDefinitionString

public java.lang.String getDefinitionString()
                                     throws SdaiException
Returns the name of EEntity_definition that represents the type of entity instances contained in this folder.

Example:

    EntityExtent folder = ...;
    String def_name = folder.getDefinitionString();

Returns:
the name of entity whose instances are contained in this folder.
Throws:
SdaiException - ED_NVLD, entity definition invalid.
See Also:
getDefinition()

getInstances

public AEntity getInstances()
                     throws SdaiException
Returns a read-only aggregate containing all instances from this folder. The aggregate consists of all instances of the entity data type represented by this EntityExtent and of all instances of all its subtypes. The aggregate can be cast to the aggregate specific for the given entity type.

Example:

    EntityExtent folder = ...;  // for "cartesian point"
    ACartesian_point aggr = (ACartesian_point)folder.getInstances();

Returns:
aggregate containing all instances of this EntityExtent.
Throws:
SdaiException - MX_NDEF, SdaiModel access not defined.
SdaiException - ED_NVLD, entity definition invalid.
SdaiException - SY_ERR, underlying system error.
See Also:
SdaiModel.getInstances(EEntity_definition type)

getOwnedBy

public SdaiModel getOwnedBy()
                     throws SdaiException
Returns SdaiModel this EntityExtent belongs to. The entity instances in an EntityExtent are only available when model being an owner of this EntityExtent is either in read-only or read-write access mode.

Example:

    EntityExtent folder = ...;
    SdaiModel owner = folder.getOwnedBy();

Returns:
SdaiModel that contains this EntityExtent.
Throws:
SdaiException - ED_NVLD, entity definition invalid.

toString

public java.lang.String toString()
Returns a String representing this EntityExtent. This string consists of the name of entity definition represented by this EntityExtent and a list of persistent labels of all instances contained in the folder (as returned by getInstances method).

Example:

    SdaiModel m = ...;
    AEntityExtent pop_folders = m.getPopulatedFolders();
    EntityExtent folder = (EntityExtent)pop_folders.getByIndexObject(1);
    System.out.println(folder);
    The string printed will be like this:
    vector: #55,#97,#125,#378

Returns:
the String representing this EntityExtent.
See Also:
getInstances(), EEntity.getPersistentLabel()

Copyright © LKSoftWare GmbH, 1999-2008