# Application Schema Metadata

This target can be used to gather information about application schemas (more specifically: the schemas that are selected for processing).

Note | At the moment the target only supports a limited set of metadata - reporting of additional useful metadata can be added in the future.

## 1. Configuration

### 1.1. Class

The class for the target implementation is de.interactive_instruments.ShapeChange.Target.Metadata.ApplicationSchemaMetadata

### 1.2. Encoding Rules

The following rules are supported by this target.

#### 1.2.1. rule-asm-all-identify-profiles

If this rule is enabled, the target identifies the names of all profiles to which schema elements belong (NOTE: Only for the schemas that are selected for processing).

#### 1.2.2. rule-asm-all-identifyPropertiesWithSpecificTaggedValues

(since 2.9.0)

This rule identifies all properties (maybe including inherited ones, if parameter inheritedProperties is true) of a class that have tagged values whose name matches a regular expression defined by parameter tagNameRegex. The optional parameter tagValueRegex can be used to restrict the tags to only those whose values match the regular expression defined by that parameter.

#### 1.2.3. rule-asm-all-identifyTypeUsage

(since 2.8.0)

This rule identifies which feature and object types directly or indirectly make use (as property value type) of one or more of the union or data types defined by target parameter typesForTypeUsageIdentification.

### 1.3. Parameters

The parameters supported by this target are described in the following sections.

#### 1.3.1. defaultEncodingRule

Alias: none

Type: String

Default Value: none

Behavior:

The identifier of the default encoding rule governing the derivation of the replication schema.

Applies to Rule(s):

- none - default behavior

#### 1.3.2. inheritedProperties

(since 2.9.0)

Alias: none

Type: Boolean

Default Value: false

Behavior:

If true, then the output per class will not only contain the direct properties of the class but also the inherited properties.

Applies to Rule(s):

- rule-asm-all-identifyPropertiesWithSpecificTaggedValues

#### 1.3.3. tagNameRegex

(since 2.9.0)

Alias: none

Type: String (with regular expression)

Default Value: none

Behavior: Regular expression to match the name of tagged values that shall be reported.

Applies to Rule(s):

- rule-asm-all-identifyPropertiesWithSpecificTaggedValues

#### 1.3.4. tagValueRegex

(since 2.9.0)

Alias: none

Type: String (with regular expression)

Default Value: none

Behavior: If set, then all values of a tag whose name matches parameter tagNameRegex must match this regular expression, in order for the tagged value to be reported.

Applies to Rule(s):

- rule-asm-all-identifyPropertiesWithSpecificTaggedValues

#### 1.3.5. typesForTypeUsageIdentification

Alias: none

Type: String

Default Value: none

Behavior:

Required parameter for rule-asm-all-identifyTypeUsage. Multiple (union or data) type names are separated by commas.

Applies to Rule(s):

- rule-asm-all-identifyTypeUsage

#### 1.3.6. outputDirectory

Alias: none

Type: String

Default Value: the current run directory

Behavior:

The path to the folder in which the output file (an XML file structured according to this schema) will be created.

Applies to Rule(s):

- none - default behavior

### 1.4. Map Entries

At the moment, no specific map entries have been defined for this target.

### 1.5. Sample Configuration

      1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11

      <Target class="de.interactive_instruments.ShapeChange.Target.Metadata.ApplicationSchemaMetadata"
      mode="enabled">
      <targetParameter name="outputDirectory" value="testResults/schema_metadata"/>
      <targetParameter name="sortedOutput" value="true"/>
      <targetParameter name="defaultEncodingRule" value="metadata"/>
      <rules>
        <EncodingRule name="metadata">
          <rule name="rule-asm-all-identify-profiles"/>
        </EncodingRule>
      </rules>
    </Target>