com.ptc.core.meta.common
Interface IdentifierFactory

All Known Implementing Classes:
DefaultIdentifierFactory, LogicalIdentifierFactory

public interface IdentifierFactory

This factory defines the pattern for constructing Identifiers. It will process arbitrary lists of Identifiers -- doesn't matter if it's a TypeIdentifier, AttributeIdentifier, etc. A default implementation of the IdentifierFactory interface provides a simple method for clients to construct Definition, Element, and Instance Identifiers from external form. Methods with and without context (context is for Attributes) are available, and both single and bulk mode transformations are supported.

Supported API: true

Extendable: false


Method Summary
 Identifier get(String identifier_external_form)
          From the identifier_external_form, we will construct an Identifier.
 Identifier[] get(String[] identifier_external_forms)
          Bulk mode of the get(String) method.
 Identifier[] get(String[] identifier_external_forms, Identifier identifier_context)
          Bulk mode of the get(String, TypeIdentifier) method.
 Identifier[] get(String[] identifier_external_forms, String identifier_context_external_form)
          Bulk mode of the get(String, String) method.
 Identifier get(String identifier_external_form, Identifier identifier_context)
          Construct a DefinitionIdentifier based on the external form and the context(TypeIdentifier).
 Identifier get(String identifier_external_form, String identifier_context_external_form)
          Construct an Identifier based on the combined string from the external form and the context external form.
 InstanceIdentifier newNamedInstanceIdentifier(String the_name, TypeInstanceIdentifier container)
          

Supported API: true
 InstanceIdentifier newPathInstanceIdentifier(String the_path, TypeInstanceIdentifier container)
          

Supported API: true
 InstanceIdentifier newUninitializedInstanceIdentifier(TypeInstanceIdentifier container)
          

Supported API: true
 TypeIdentifier newWCTypeIdentifier(String type_name)
          

Supported API: true
 TypeInstanceIdentifier newWCTypeInstanceIdentifier(String type_name, int update_count, long object_id)
          

Supported API: true
 TypeInstanceIdentifier newWCTypeInstanceIdentifier(String type_name, int update_count, long object_id, long branch_id)
          

Supported API: true
 

Method Detail

get

Identifier get(String identifier_external_form)
               throws IllegalFormatException
From the identifier_external_form, we will construct an Identifier. If the external form represents a DefinitionIdentifier, a DefinitionIdentifier will be constructed. If the external form represents an ElementIdentifier, an ElementIdentifier will be constructed. If the external form only represents an InstanceIdentifier, an InstanceIdentifier will be constructed instead.

Supported API: true

Parameters:
identifier_external_form -
Returns:
Identifier
Throws:
IllegalFormatException

get

Identifier get(String identifier_external_form,
               String identifier_context_external_form)
               throws IllegalFormatException
Construct an Identifier based on the combined string from the external form and the context external form. The only valid external form input are "DefinitionIdentifier, DefinitionIdentifier" or "ElementIdentifier, ElementIdentifier". Other inputs will cause IllegalFormatException.

Supported API: true

Parameters:
identifier_external_form -
identifier_context_external_form -
Returns:
Identifier
Throws:
IllegalFormatException

get

Identifier get(String identifier_external_form,
               Identifier identifier_context)
               throws IllegalFormatException
Construct a DefinitionIdentifier based on the external form and the context(TypeIdentifier). If the external form is not representing a DefinitionIdentifier, IllegalFormatException will be thrown.

Supported API: true

Parameters:
identifier_external_form -
identifier_context -
Returns:
Identifier
Throws:
IllegalFormatException

get

Identifier[] get(String[] identifier_external_forms)
                 throws IllegalFormatException
Bulk mode of the get(String) method.

Supported API: true

Parameters:
identifier_external_forms -
Returns:
Identifier[]
Throws:
IllegalFormatException

get

Identifier[] get(String[] identifier_external_forms,
                 String identifier_context_external_form)
                 throws IllegalFormatException
Bulk mode of the get(String, String) method.

Supported API: true

Parameters:
identifier_external_forms -
identifier_context_external_form -
Returns:
Identifier[]
Throws:
IllegalFormatException

get

Identifier[] get(String[] identifier_external_forms,
                 Identifier identifier_context)
                 throws IllegalFormatException
Bulk mode of the get(String, TypeIdentifier) method.

Supported API: true

Parameters:
identifier_external_forms -
identifier_context -
Returns:
Identifier[]
Throws:
IllegalFormatException

newWCTypeIdentifier

TypeIdentifier newWCTypeIdentifier(String type_name)


Supported API: true

Parameters:
type_name -
Returns:
TypeIdentifier

newWCTypeInstanceIdentifier

TypeInstanceIdentifier newWCTypeInstanceIdentifier(String type_name,
                                                   int update_count,
                                                   long object_id)


Supported API: true

Parameters:
type_name -
update_count -
object_id -
Returns:
TypeInstanceIdentifier

newWCTypeInstanceIdentifier

TypeInstanceIdentifier newWCTypeInstanceIdentifier(String type_name,
                                                   int update_count,
                                                   long object_id,
                                                   long branch_id)


Supported API: true

Parameters:
type_name -
update_count -
object_id -
branch_id -
Returns:
TypeInstanceIdentifier

newUninitializedInstanceIdentifier

InstanceIdentifier newUninitializedInstanceIdentifier(TypeInstanceIdentifier container)


Supported API: true

Parameters:
container -
Returns:
InstanceIdentifier

newNamedInstanceIdentifier

InstanceIdentifier newNamedInstanceIdentifier(String the_name,
                                              TypeInstanceIdentifier container)


Supported API: true

Parameters:
the_name -
container -
Returns:
InstanceIdentifier

newPathInstanceIdentifier

InstanceIdentifier newPathInstanceIdentifier(String the_path,
                                             TypeInstanceIdentifier container)


Supported API: true

Parameters:
the_path -
container -
Returns:
InstanceIdentifier