Package com.ptc.core.meta.type.server

See:
          Description

Class Summary
TypeInstanceUtility

Supported API: true

Extendable: false
 

Package com.ptc.core.meta.type.server Description

Describes the interfaces for getting type hierarchy information about types. This functionality is similar to introspection, specifically the ClassInfo class.

 

TypeModel Overview

TypeModel is the only interface in these packages. It contains methods for getting type hierarchy information and getting a populated AttributeContainer. At the driver1 time frame functionality is available only for modeled attributes, i.e. ModeledTypeModel is the only concrete implementation of the TypeModel at driver1. IntegratedTypeModel is not implemented for driver1.

Clients should not deal directly with the TypeModel. Instead they will obtain a TypeInstance from a TypeInstanceFactory. TypeInstance will use TypeModel.

Figure1: TypeModel Object Model

 

 

Example, getting a TypeModel

The following code gets a TypeModel:

TypeModel typeModel = TypeModelFactory.getTypeModel( specifier );

Notes:

1. The "specifier" is a String value that specifies what type of TypeModel you want, currently the only value that is supported is specifier = "modeled".

2. The TypeModelFactory uses ApplicationContext to select a TypeModel so if you use specifier = "modeled" a ModeledTypeModel will be returned.

The following code gets an AttributeContainer:

AttributeContainer container = typeModel.getAttributeContainer(filter, type_id);

Notes:

1. The filter is an array of AttributeIdentifiers and type_id is a TypeIdentifier.

2. The getAttributeContainer method returns a BasicAttributeContainer populated with AttributeIdentifiers and a DescriptorContainer populated with AttributeTypeDescriptors.

3. Note that the AttributeIdentifiers can be either ModeledAttributeIdentifiers or ModeledAssociationIdentifiers.