commonj.connector.metadata.build
Interface MetadataType


public interface MetadataType

Top-level interface for building types that can be used when building service descriptions. MetadataType is used by tools at design-time to build types.

Implementations of this interface must have a default constructor so that tool environments are able to create instances of it during the bootstrap process. Implementations must be thread compatible (not thread-safe), as they may run in a threaded environment. Thread compatible requires that if a unique instance is used in each thread then correct behaviour is observed. Also, if the tool synchronizes calls to the methods then correct behaviour is observed except when internal state is changed. Applying data properties will change state.

Since:
1.1

Method Summary
 void applyDataProperties(PropertyGroup dataProperties)
          Apply values of the specified data properties to the MetadataType.
 PropertyGroup createDataProperties()
          The set of properties for determining the types to be created.
 QName getName()
          Returns the name of the top level global complex type in the array of schema definitions.
 SchemaDefinition[] getSchemaDefinitions()
          Returns an array of schema definitions for the specified data properties.
 void setLocation(URI uri)
          The tool passes the relative location for the schema.
 

Method Detail

createDataProperties

PropertyGroup createDataProperties()
The set of properties for determining the types to be created.

Returns:
PropertyGroup A set of properties for determining the types to create. The return value must not be null.

applyDataProperties

void applyDataProperties(PropertyGroup dataProperties)
Apply values of the specified data properties to the MetadataType. The PropertyGroup argument must have been created by createDataProperties method. The argument must not be null.

Parameters:
dataProperties - a PropertyGroup containing the specified data properties.

setLocation

void setLocation(URI uri)
                 throws MetadataException
The tool passes the relative location for the schema.

Parameters:
uri - is the relative location for the schema.
Throws:
MetadataException - - thrown if an error occurs or if the set was refused.

getSchemaDefinitions

SchemaDefinition[] getSchemaDefinitions()
Returns an array of schema definitions for the specified data properties.

Returns:
An array of SchemaDefinitions for new types

getName

QName getName()
Returns the name of the top level global complex type in the array of schema definitions.

Returns:
the name of the top level global complex type.