<?xml version="1.0" encoding="utf-16"?>
<ECSchema schemaName="Bentley_Standard_CustomAttributes" nameSpacePrefix="bsca" version="1.3" description="Bentley Standard Custom Attributes" displayLabel="Bentley Standard Custom Attributes" xmlns="http://www.bentley.com/schemas/Bentley.ECXML.2.0">
    <ECSchemaReference name="EditorCustomAttributes" version="01.00" prefix="beca" />
    <ECClass typeName="GlobalIdSpecification" description="Global ID Specification" displayLabel="Global Id Specification" isCustomAttributeClass="True">
        <ECProperty propertyName="PropertyName" typeName="string" description="Name of Property to use for displaying GlobalId.StringValue" displayLabel="Property Name" />
    </ECClass>

    <ECClass typeName="BusinessKeySpecification" description="Business Key Specification" displayLabel="Business Key Specification" isCustomAttributeClass="True">
         <ECProperty propertyName="PropertyName" typeName="string" description="Name of Property to use for displaying ECBusinessKey.StringValue" displayLabel="Property Name" />
    </ECClass>
    <ECClass typeName="InstanceLabelSpecification" displayLabel="InstanceLabel Specification" description="Specifies which ECProperty to use for the InstanceLabel for tree nodes and other GUI"  isCustomAttributeClass="True">
         <ECProperty propertyName="PropertyName" typeName="string" displayLabel="Property Name" description="Name of ECProperty to use for the InstanceLabel for tree nodes and other GUI"  />
    </ECClass>
    
    <!-- This schema's custom attribute is used to define the standard classes of a schema. If you modify it, you 
         must adjust the code of RepositoryStandardClassesHelper class. -->
    <ECClass typeName="IdentificationOfStandardClasses" isCustomAttributeClass="True">
        <ECProperty propertyName="ProjectBaseClass" typeName="string" />
        <ECProperty propertyName="FolderBaseClass" typeName="string" />
        <ECProperty propertyName="DocumentBaseClass" typeName="string" />
        <ECProperty propertyName="FolderParentRelationshipClass" typeName="string" />
        <ECProperty propertyName="ProjectParentRelationshipClass" typeName="string" />
        <ECProperty propertyName="DocumentParentRelationshipClass" typeName="string" />
        <ECProperty propertyName="UserBaseClass" typeName="string" />
        <ECProperty propertyName="UserGroupBaseClass" typeName="string" />
        <ECProperty propertyName="ActivityBaseClass" typeName="string" />
        <ECProperty propertyName="UserParentRelationshipClass" typeName="string" />
        <ECProperty propertyName="UserGroupParentRelationshipClass" typeName="string" />
        <ECProperty propertyName="ActivityApproverRelationshipClass" typeName="string" />
    </ECClass>

  <ECClass typeName="RelatesToExtendedPropertyObject" isCustomAttributeClass="True" />
    <!-- Class's custom attribute that identify class properties that represent standard file attributes.
         If you modify it, you must adjust the code of FilePropertiesHelper.cs -->
    <ECClass typeName="FileDependentProperties" isCustomAttributeClass="TRUE" isDomainClass="FALSE">
      <ECProperty propertyName="FileName" typeName="string"/>
      <ECProperty propertyName="FileSize" typeName="string"/>
      <ECProperty propertyName="DateCreated" typeName="string"/>
      <ECProperty propertyName="DateModified" typeName="string"/>
      <ECProperty propertyName="IsReadOnly" typeName="string"/>
      <ECProperty propertyName="IsHidden" typeName="string"/>
    </ECClass>

    <!-- Class's custom attribute that identify class properties that represent standard folder attributes.
         If you modify it, you must adjust the code of FolderPropertiesHelper.cs -->
    <ECClass typeName="FolderDependentProperties" isCustomAttributeClass="TRUE" isDomainClass="FALSE">
      <ECProperty propertyName="FolderName" typeName="string"/>
      <ECProperty propertyName="DateCreated" typeName="string"/>
      <ECProperty propertyName="DateModified" typeName="string"/>
      <ECProperty propertyName="IsHidden" typeName="string"/>
    </ECClass>

    <!-- Class's custom attribute that identify class properties that represent standard User attributes.
         If you modify it, you must adjust the code of UserPropertiesHelper.cs -->
    <ECClass typeName="IdentificationOfUserProperties" isDomainClass="False" isCustomAttributeClass="True">
      <ECProperty propertyName="Name" typeName="string" />
      <ECProperty propertyName="Description" typeName="string" />
      <ECProperty propertyName="SecurityContext" typeName="string" />
      <ECProperty propertyName="LoginIdentifier" typeName="string" />
      <ECProperty propertyName="PrimaryEmail" typeName="string" />
      <ECProperty propertyName="SecondaryEmail" typeName="string" />
      <ECProperty propertyName="HomePhone" typeName="string" />
      <ECProperty propertyName="WorkPhone" typeName="string" />
      <ECProperty propertyName="MobilePhone" typeName="string" />
      <ECProperty propertyName="TextMessagingNumber" typeName="string" />
    </ECClass>

    <!-- Class's custom attribute that identify class properties that represent standard UserGroup attributes.
         If you modify it, you must adjust the code of UserGroupPropertiesHelper.cs -->
    <ECClass typeName="IdentificationOfUserGroupProperties" isDomainClass="False" isCustomAttributeClass="True">
      <ECProperty propertyName="Name" typeName="string" />
      <ECProperty propertyName="Description" typeName="string" />
      <ECProperty propertyName="IsSecurityGroup" typeName="string" />
      <ECProperty propertyName="SecurityContext" typeName="string" />
    </ECClass>

    <!-- Class's custom attribute that identify class properties that represent standard Activity attributes.
         If you modify it, you must adjust the code of ActivityPropertiesHelper.cs -->
    <ECClass typeName="IdentificationOfActivityProperties" isDomainClass="False" isCustomAttributeClass="True">
      <ECProperty propertyName="Name" typeName="string" />
      <ECProperty propertyName="Description" typeName="string" />
    </ECClass>


  <ECClass typeName="PrimarySchemaMetaData" description="Defined at the top level of a schema to indicate that this schema may have supplemental schemas" displayLabel="Primary Schema MetaData" isCustomAttributeClass="True">
        <ECProperty propertyName="ContainsUnits" typeName="boolean" description="True if this primary schema contains units data" displayLabel="Contains Units"/>
    </ECClass>

    <ECClass typeName="SupplementalSchemaMetaData" description="Custom Attribute Class that is applied to a supplemental schema" displayLabel="Supplemental Schema MetaData" isCustomAttributeClass="True">
        <ECProperty propertyName="PrimarySchemaName" typeName="string" description="The name of the schema that this schema supplements" displayLabel="Primary Schema Name" />
        <ECProperty propertyName="PrimarySchemaMajorVersion" typeName="int" description="The major version number of the primary schema" displayLabel="Primary Schema Major Version" />
        <ECProperty propertyName="PrimarySchemaMinorVersion" typeName="int" description="The minor version number of the primary schema" displayLabel="Primary Schema Minor Version" />
        <ECProperty propertyName="Precedence" typeName="int" description="Integer precedence of this supplemental schema. Lower Precedence than primary (Universal:0-99, Industrial:100-199).  Higher Precedence than primary (Speciality:200-299, Company:300-399, Department:400-499, Project:500-599)." />
        <ECProperty propertyName="Purpose" typeName="string" description="A string representing the function of this supplemental schema." displayLabel="Purpose" />
        <ECProperty propertyName="IsUserSpecific" typeName="boolean" description="If true this schema is specific to a user." displayLabel="Is User Specific" />
    </ECClass>

    <ECClass typeName="DGNPersistedGeometry" description="See Bentley.ECObjects.Standards.DGNPersistedGeometry. ECCustomAttributeClass for specifying that an IGeometry ECProperty is to be translated to DGN geometry when the instance is written to a DGN file with the default persistence strategy of the DgnECPlugin" displayLabel="Specificiation of DGN persisted geometry" isCustomAttributeClass="True">
        <ECProperty propertyName="NameOfGeometryProperty" typeName="string" description="The name of the IGeometry ECProperty of this ECClass that is to be translated to DGN geometry when the instance is written to a DGN file with the default persistence strategy of the DgnECPlugin" displayLabel="Name of Geometry ECProperty" />
    </ECClass>

    <ECClass typeName="CalculatedECPropertySpecification" description="See Bentley.ECObjects.Standards.CalculatedECPropertySpecification. ECCustomAttributeClass for specifying an ECExpression to be used for calculating the value of a given ECProperty." displayLabel="Calculated ECProperty Specification" isCustomAttributeClass="True">
        <ECProperty propertyName="ECExpression" typeName="string" description="The ECExpression used to calculate an ECProperty's value. " />
        <ECProperty propertyName="FailureValue" typeName="string" description="The string representation of the value to use when the value cannot be calculated due to missing dependents or any other reason." displayLabel="Failure value" />
        <ECProperty propertyName="ParserRegularExpression" typeName="string" description="Will be used when converting from the property value back into its constituent properties. This may be null, and is mostly applicable when the expression has been used to concatentate multiple other property values. " displayLabel="Parser regular expression" />
        <ECProperty propertyName="IsDefaultValueOnly" typeName="boolean" description="Indicates that the value will only be calculated once on the initial get." displayLabel="Is calculated as default value only" />
        <ECProperty propertyName="UseLastValidValueOnFailure" typeName="boolean" description="Indicates that if the CalculatedECProperty fails to calculate, then use the last valid value." displayLabel="Use the last valid value on failure" />
        <ECArrayProperty propertyName="RequiredSymbolSets" typeName="string" minOccurs="0" maxOccurs="unbounded" description="ECExpressions SymbolSets required for evaluation of the ECExpression" displayLabel="Required ECExpression SymbolSets" />
    </ECClass>

   <!-- Class's attribute that identifies Synchronization ID property -->
    <ECClass typeName="SyncIDSpecification" description="Custom attribute that points on property that should be used as synchronization ID" displayLabel="SyncID Specification" isCustomAttributeClass="True">
        <ECProperty propertyName="Property" typeName="string" description="Name of property" />
	</ECClass>
	
    <!-- RelationshipClass's attribute that identifies that relationship is of reference type-->
    <ECClass typeName="ReferenceTypeRelationship" description="Custom attribute showing that the relationship is of reference type. This means that the relationship is just reference, but not an object. IDs for such relationship are not meaningful." displayLabel="Reference Type Relationship" isCustomAttributeClass="True"/>

    <!-- Image custom attribute that can be applied on schemas, classes and properties to define image monikers
         The Image_Default property would be used to define the default image moniker, you can add Image_<<statename>> ecproperties to define
         other monikers for different states of image e.g. Image_Expanded -->

    <ECClass typeName="CustomImageSpecification" isCustomAttributeClass="TRUE" isDomainClass="FALSE">
      <ECProperty propertyName="Moniker_Default" typeName="string"/>
      <ECProperty propertyName="Moniker_Expanded" typeName="string"/>
      <ECProperty propertyName="Moniker_Collapsed" typeName="string"/>
    </ECClass>

  <!-- Display Options attribute is used to mark object as hidden -->
    <ECClass typeName="DisplayOptions" displayLabel="Display Options" isCustomAttributeClass="True" isDomainClass="FALSE">
        <ECProperty propertyName="Hidden" typeName="boolean" />
    </ECClass>
  <!-- These custom attributes are used by class editor, "add from dictionary" features to put a back reference of the template class from dictionary on the business class/property added from dictionary.-->
    <ECClass typeName="DefinitionMetaData" isDomainClass="True" isCustomAttributeClass="True">
        <ECProperty propertyName="DefinitionBackReference" typeName="string" />
    </ECClass>
    <ECClass typeName="ISO15926MetaData" description="ISO 15926 metadata back reference" displayLabel="ISO 15926 Definition Metadata" isCustomAttributeClass="True" isDomainClass="True">
        <BaseClass>DefinitionMetaData</BaseClass>
        <ECProperty propertyName="EntityType" typeName="string" description="ISO 15926 Part2 Entity Type (e.g. http://dm.rdlfacade.org/data#ClassOfInanimatePhysicalObject)" displayLabel="Entity Type" />
        <ECProperty propertyName="IdPCA" typeName="string" description="POSC Caesar Association Identifier" displayLabel="Identifier" />
        <ECProperty propertyName="Designation" typeName="string" description="POSC Caesar Association Alternate Designation" />
        <ECProperty propertyName="CreationDate" typeName="dateTime" description="POSC Caesar Association Creation Date" displayLabel="Creation Date" />
        <ECProperty propertyName="SubmitterOrg" typeName="string" description="POSC Caesar Association Submitting Organization" displayLabel="Organization" />
        <ECProperty propertyName="Creator" typeName="string" description="POSC Caesar Association Creator" />
        <ECProperty propertyName="Status" typeName="string" description="POSC Caesar Association Registration Status" />
        <ECProperty propertyName="Note" typeName="string" description="POSC Caesar Association Note" />
        <ECProperty propertyName="Example" typeName="string" description="POSC Caesar Association Note Example" />
    </ECClass>
  <!--This custom attribute is used by class editor. It is used as a schema level custom attribute to mark particular schema as dictionary.-->
    <ECClass typeName="DictionaryCustomAttributes" isDomainClass="True" isCustomAttributeClass="True">
        <ECProperty propertyName="IsClassDictionary" typeName="boolean" />
        <ECProperty propertyName="IsPropertyDictionary" typeName="boolean" />
        <ECProperty propertyName="IsUnitsDictionary" typeName="boolean" />
        <ECProperty propertyName="IsDimensionDictionary" typeName="boolean" />
        <ECProperty propertyName="IsKindOfQuantityDictionary" typeName="boolean" />
     </ECClass>
  <!--This custom attribute is used by class editor. It is added on to TemplateProperty classes in property dictionary to store property template metadata like datatype.-->
    <ECClass typeName="PropertyTemplateMetadata" isDomainClass="True" isCustomAttributeClass="True">
        <ECProperty propertyName="DataType" typeName="string" />
    </ECClass>
  <!--This custom attribute is used by class editor. It is added at the schema level to set the fore and back colors of all the nodes in schema.-->
    <ECClass typeName="TreeColorCustomAttributes" isDomainClass="True" isCustomAttributeClass="True">
        <ECProperty propertyName="NodeBackColor" typeName="string" description="Back color of the node" displayLabel="Node Back Color" />
        <ECProperty propertyName="NodeForeColor" typeName="string" description="Fore Color of the Node" displayLabel="Node Fore Color" />
    </ECClass>

  <!--Helper class used to map old display label to new display label-->
    <ECClass typeName="TabDisplaySpecification" isStruct="True" isDomainClass="False">
        <ECProperty propertyName="DisplayLabel" typeName="string" />
        <ECProperty propertyName="NewDisplayLabel" typeName="string" />
        <ECProperty propertyName="Show" typeName="boolean" />
    </ECClass>

  <!--This custom attribute is used by class editor. It is added at the schema level to set different customizations of content pane.-->
    <ECClass typeName="CEContentPaneCustomization" isDomainClass="False" isCustomAttributeClass="True">
        <ECArrayProperty propertyName="TabSpecifications" typeName="TabDisplaySpecification" minOccurs="0" maxOccurs="unbounded" isStruct="True" />
    </ECClass>


  <!-- Indicates if a relationship class supports ordered relationships. When a class has this custom attribute, it supports ordered relationships. 
       This custom attribute is meaningful only for relationship classes. -->
  <ECClass typeName="SupportsOrderedRelationships" 
           description="Custom attribute that indicates if a relationship class supports ordered relationships." 
           displayLabel="Supports Ordered Relationships" 
           isCustomAttributeClass="True">
    <ECProperty propertyName="OrderIdSourceProperty" typeName="string" />
    <ECProperty propertyName="OrderIdTargetProperty" typeName="string" />
  </ECClass>

  <!-- ItemsBrowserTreePresentation can be used to set some specific ItemsBrowser tree hierarchy options. For example specify what nodes should be at the top. -->
  <ECClass typeName="ItemsBrowserTreePresentation" displayLabel="ItemsBrowser tree presentation" isCustomAttributeClass="True" isDomainClass="FALSE">
    <ECProperty propertyName="ShowAtTopLevel" typeName="bool" />
  </ECClass>
    <ECClass typeName="PreviousName" displayLabel="Previous name" isStruct="True" isDomainClass="True">
        <ECProperty propertyName="OldName" typeName="string" displayLabel="Old Name" />
        <ECProperty propertyName="OldVersionMajor" typeName="int" displayLabel="Old Version Major" description="Used when building change tracking history but not when generating mappings because we cannot trust versions" />
        <ECProperty propertyName="OldVersionMinor" typeName="int" displayLabel="Old Version Minor" description="Used when building change tracking history but not when generating mappings because we cannot trust versions" />
    </ECClass>
    <ECClass typeName="PreviousNameArray" displayLabel="Previous Name Array" isDomainClass="True" isCustomAttributeClass="True">
        <ECArrayProperty propertyName="PreviousNames" typeName="PreviousName" displayLabel="Previous Names" minOccurs="0" maxOccurs="unbounded" isStruct="True" />
    </ECClass>

    <!-- ConfigurableECPlugin can sort navigation nodes and contents instances according to these sorting parameters. -->
    <ECClass typeName="InstanceSortingOptions" displayLabel="Options of class item sorting" isDomainClass="True" isCustomAttributeClass="True">
        <ECProperty propertyName="SortingType" typeName="int">
            <ECCustomAttributes>
                <StandardValues xmlns="EditorCustomAttributes.01.00">
                    <ValueMap>
                        <ValueMap>
                            <DisplayString>Do not apply sorting.</DisplayString>
                            <Value>0</Value>
                        </ValueMap>
                        <ValueMap>
                            <DisplayString>Natural alpha-numeric sorting by the instance label.</DisplayString>
                            <Value>1</Value>
                        </ValueMap>
                        <ValueMap>
                            <DisplayString>Natural alpha-numeric sorting by a specified property</DisplayString>
                            <Value>2</Value>
                        </ValueMap>
                    </ValueMap>
                    <MustBeFromList>True</MustBeFromList>
                </StandardValues>
            </ECCustomAttributes>
        </ECProperty>
        <ECProperty propertyName="SortingDirection" typeName="int">
            <ECCustomAttributes>
                <StandardValues xmlns="EditorCustomAttributes.01.00">
                <MustBeFromList>True</MustBeFromList>
                <ValueMap>
                    <ValueMap>
                        <Value>0</Value>
                        <DisplayString>Ascending sorting.</DisplayString>
                    </ValueMap>
                    <ValueMap>
                        <Value>1</Value>
                        <DisplayString>Descending sorting.</DisplayString>
                    </ValueMap>
                </ValueMap>
            </StandardValues>
          </ECCustomAttributes>
        </ECProperty>
        <ECProperty propertyName="SortingProperty" typeName="string" />
    </ECClass>
</ECSchema>
