USMeta.Components

Previous Next

At runtime, gets metadata information about components from the model developed in USoft Definer. This information takes the form of component methods, with parameters, as well as general info about the component such as the name and architecture among others.

Returns an XML document of the form demonstrated in Example 1 below.

Syntax

SELECT USMeta.Components(
       name-pattern           Components
,      architecture-pattern   Architecture
)

All parameters are optional. Parameter values that you pass are mapped to parameters by alias name. The '.*DOT NET.*' value in the following example is for architecture-pattern because of the "Architecture" alias:

SELECT   USMeta.Components( '.*DOT NET.*' Architecture )

This results in all components of the "DOT NET", and the "DOT NET INTERNAL" architectures.

(For backward compatibility only, it is possible to supply parameter values by position. Using this syntax, a list of non-aliased values maps to the parameter list in the order stated, with empty values at the end of the list if you supply less than 2 values, and '' (the empty string) as a way of explicitly declaring an empty value.)

Name-pattern is a regular expression that matches zero, one or more component names in the model. The result data is limited to components matching the pattern. If name-pattern is omitted, then result data is not limited in this way.

Architecture-pattern is a regular expression that matches zero, one or more component architectures in the model. The result data is limited to components with architectures matching the pattern. If architecture-pattern is omitted, then result data is not limited in this way. The following are valid component architectures in USoft:

AUTOMATION SERVER

J2EE

DOT NET

UNSPECIFIED

DOT NET INTERNAL

WEB SERVICE

INTERNAL

WEB SERVICE PROVIDER

Example 1

This example returns component information about any components in the model that have the name 'REGEXP', and are of the 'J2EE' architecture :

SELECT USMeta.Components( 

   'REGEXP'    Components

,  'J2EE'      Architecture

)

The return value of this statement could be:

<?xml version="1.0" encoding="UTF-16"?>
<Meta>
   <Components>
      <Component NAME="REGEXP" ARCHITECTURE="J2EE" LIFE_TIME="STATELESS" OPERATION_COUNT="2" ASSEMBLY_REFERENCES="" COM_CLS_ID="" 

           COM_HOST="" COM_PROG_ID="" CONSTRUCTOR_SQL="" MODULE="TRAVEL2" INTERFACE="N">
         <Operations>
            <Operation NAME="MATCHES" INPUT_PARAMETERS_COUNT="2" OUTPUT_PARAMETERS_COUNT="1" RETURN_PARAMETER="result">
               <Parameters>
                  <Parameter NAME="str" KIND="IN" LENGTH="1" DB_TYPE="NVARCHAR2" PRIMITIVE_data type="STRING"/>
                  <Parameter NAME="regexp" KIND="IN" LENGTH="1" DB_TYPE="NVARCHAR2" PRIMITIVE_data type="STRING"/>
                  <Parameter NAME="result" KIND="RETURN" LENGTH="32" DB_TYPE="NUMBER" PRIMITIVE_data type="BOOLEAN"/>
               </Parameters>
            </Operation>
            <Operation NAME="REPLACE" INPUT_PARAMETERS_COUNT="3" OUTPUT_PARAMETERS_COUNT="1" RETURN_PARAMETER="result">
               <Parameters>
                  <Parameter NAME="input" KIND="IN" LENGTH="1" DB_TYPE="NVARCHAR2" PRIMITIVE_data type="STRING"/>
                  <Parameter NAME="pattern" KIND="IN" LENGTH="1" DB_TYPE="NVARCHAR2" PRIMITIVE_data type="STRING"/>
                  <Parameter NAME="replacement" KIND="IN" LENGTH="1" DB_TYPE="NVARCHAR2" PRIMITIVE_data type="STRING"/>
                  <Parameter NAME="result" KIND="RETURN" LENGTH="1" DB_TYPE="NVARCHAR2" PRIMITIVE_data type="STRING"/>
               </Parameters>
            </Operation>
         </Operations>
      </Component>
   </Components>
</Meta>

 

 

See also

USMeta internal component