зеркало из https://github.com/microsoft/CDM.git
461 строка
15 KiB
JSON
461 строка
15 KiB
JSON
{
|
|
"$schema": "./schema.cdm.json",
|
|
"jsonSchemaSemanticVersion": "1.0.0",
|
|
"definitions": [
|
|
{
|
|
"traitName": "is",
|
|
"explanation": "the root 'trait' from which all others derive."
|
|
},
|
|
{
|
|
"traitName": "does",
|
|
"extendsTrait": "is",
|
|
"explanation": "a root with a more meaningful base name for certain exhibited traits"
|
|
},
|
|
{
|
|
"traitName": "means",
|
|
"extendsTrait": "is",
|
|
"explanation": "a root with a more meaningful base name for certain semantic meaning traits"
|
|
},
|
|
{
|
|
"explanation": "the root dataType",
|
|
"dataTypeName": "any"
|
|
},
|
|
{
|
|
"traitName": "is.dataFormat",
|
|
"extendsTrait": "is",
|
|
"associatedProperties": [
|
|
"dataFormat"
|
|
]
|
|
},
|
|
{
|
|
"traitName": "is.dataFormat.integer",
|
|
"extendsTrait": "is.dataFormat"
|
|
},
|
|
{
|
|
"traitName": "is.dataFormat.big",
|
|
"extendsTrait": "is.dataFormat"
|
|
},
|
|
{
|
|
"traitName": "is.dataFormat.small",
|
|
"extendsTrait": "is.dataFormat"
|
|
},
|
|
{
|
|
"traitName": "is.dataFormat.floatingPoint",
|
|
"extendsTrait": "is.dataFormat"
|
|
},
|
|
{
|
|
"traitName": "is.dataFormat.array",
|
|
"extendsTrait": "is.dataFormat"
|
|
},
|
|
{
|
|
"traitName": "is.dataFormat.character",
|
|
"extendsTrait": "is.dataFormat"
|
|
},
|
|
{
|
|
"traitName": "is.dataFormat.byte",
|
|
"extendsTrait": "is.dataFormat"
|
|
},
|
|
{
|
|
"traitName": "is.dataFormat.numeric",
|
|
"extendsTrait": "is.dataFormat"
|
|
},
|
|
{
|
|
"traitName": "is.dataFormat.date",
|
|
"extendsTrait": "is.dataFormat"
|
|
},
|
|
{
|
|
"traitName": "is.dataFormat.time",
|
|
"extendsTrait": "is.dataFormat"
|
|
},
|
|
{
|
|
"traitName": "is.dataFormat.boolean",
|
|
"extendsTrait": "is.dataFormat"
|
|
},
|
|
{
|
|
"traitName": "is.dataFormat.guid",
|
|
"extendsTrait": "is.dataFormat"
|
|
},
|
|
{
|
|
"traitName": "is.dataFormat.timeOffset",
|
|
"extendsTrait": "is.dataFormat"
|
|
},
|
|
{
|
|
"dataTypeName": "integer",
|
|
"extendsDataType": "any",
|
|
"exhibitsTraits": [
|
|
"is.dataFormat.integer"
|
|
]
|
|
},
|
|
{
|
|
"dataTypeName": "float",
|
|
"extendsDataType": "any",
|
|
"exhibitsTraits": [
|
|
"is.dataFormat.floatingPoint"
|
|
]
|
|
},
|
|
{
|
|
"traitName": "is.dataFormat.numeric.shaped",
|
|
"extendsTrait": "is.dataFormat.numeric",
|
|
"hasParameters": [
|
|
{
|
|
"name": "precision",
|
|
"dataType": "integer",
|
|
"explanation": "the total number of significant digits",
|
|
"required": false
|
|
},
|
|
{
|
|
"name": "scale",
|
|
"dataType": "integer",
|
|
"explanation": "the number of digits to the right of the decimal place",
|
|
"required": false
|
|
}
|
|
],
|
|
"explanation": "for setting the exact precision and scale of numeric values"
|
|
},
|
|
{
|
|
"dataTypeName": "decimal",
|
|
"extendsDataType": "any",
|
|
"exhibitsTraits": [
|
|
"is.dataFormat.numeric.shaped"
|
|
]
|
|
},
|
|
{
|
|
"dataTypeName": "boolean",
|
|
"extendsDataType": "any",
|
|
"exhibitsTraits": [
|
|
"is.dataFormat.boolean"
|
|
]
|
|
},
|
|
{
|
|
"dataTypeName": "char",
|
|
"extendsDataType": "any",
|
|
"exhibitsTraits": [
|
|
"is.dataFormat.character",
|
|
"is.dataFormat.big"
|
|
]
|
|
},
|
|
{
|
|
"dataTypeName": "string",
|
|
"extendsDataType": "char",
|
|
"exhibitsTraits": [
|
|
"is.dataFormat.array"
|
|
]
|
|
},
|
|
{
|
|
"dataTypeName": "byte",
|
|
"extendsDataType": "any",
|
|
"exhibitsTraits": [
|
|
"is.dataFormat.byte"
|
|
]
|
|
},
|
|
{
|
|
"dataTypeName": "binary",
|
|
"extendsDataType": "byte",
|
|
"exhibitsTraits": [
|
|
"is.dataFormat.array"
|
|
]
|
|
},
|
|
{
|
|
"dataTypeName": "smallInteger",
|
|
"extendsDataType": "integer",
|
|
"exhibitsTraits": [
|
|
"is.dataFormat.small"
|
|
]
|
|
},
|
|
{
|
|
"dataTypeName": "bigInteger",
|
|
"extendsDataType": "integer",
|
|
"exhibitsTraits": [
|
|
"is.dataFormat.big"
|
|
]
|
|
},
|
|
{
|
|
"dataTypeName": "double",
|
|
"extendsDataType": "float",
|
|
"exhibitsTraits": [
|
|
"is.dataFormat.big"
|
|
]
|
|
},
|
|
{
|
|
"dataTypeName": "guid",
|
|
"extendsDataType": "string",
|
|
"exhibitsTraits": [
|
|
"is.dataFormat.guid"
|
|
]
|
|
},
|
|
{
|
|
"traitName": "means.identity",
|
|
"extendsTrait": "means"
|
|
},
|
|
{
|
|
"traitName": "means.identity.entityId",
|
|
"extendsTrait": "means.identity"
|
|
},
|
|
{
|
|
"explanation": "a unique identier for entity instances",
|
|
"dataTypeName": "entityId",
|
|
"extendsDataType": "guid",
|
|
"exhibitsTraits": [
|
|
"means.identity.entityId"
|
|
]
|
|
},
|
|
{
|
|
"explanation": "types for trait parameters that take objects as values",
|
|
"dataTypeName": "object",
|
|
"extendsDataType": "any"
|
|
},
|
|
{
|
|
"explanation": "types for trait parameters that take CDM objects as values",
|
|
"dataTypeName": "cdmObject",
|
|
"extendsDataType": "object"
|
|
},
|
|
{
|
|
"explanation": "types for trait parameters that take objects as values",
|
|
"dataTypeName": "trait",
|
|
"extendsDataType": "cdmObject"
|
|
},
|
|
{
|
|
"explanation": "types for trait parameters that take objects as values",
|
|
"dataTypeName": "dataType",
|
|
"extendsDataType": "cdmObject"
|
|
},
|
|
{
|
|
"explanation": "types for trait parameters that take objects as values",
|
|
"dataTypeName": "purpose",
|
|
"extendsDataType": "cdmObject"
|
|
},
|
|
{
|
|
"explanation": "types for trait parameters that take objects as values",
|
|
"dataTypeName": "entity",
|
|
"extendsDataType": "cdmObject"
|
|
},
|
|
{
|
|
"explanation": "type for trait parameters that take attribute names as values",
|
|
"dataTypeName": "entityName",
|
|
"extendsDataType": "string",
|
|
"exhibitsTraits": [
|
|
{
|
|
"traitReference": {
|
|
"traitName": "means.entityName",
|
|
"extendsTrait": "means"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"explanation": "types for trait parameters that take objects as values",
|
|
"dataTypeName": "attribute",
|
|
"extendsDataType": "cdmObject"
|
|
},
|
|
{
|
|
"explanation": "types for trait parameters that take objects as values",
|
|
"dataTypeName": "attributeGroup",
|
|
"extendsDataType": "cdmObject"
|
|
},
|
|
{
|
|
"explanation": "type for trait parameters that take attribute names as values",
|
|
"dataTypeName": "attributeName",
|
|
"extendsDataType": "string",
|
|
"exhibitsTraits": [
|
|
{
|
|
"traitReference": {
|
|
"traitName": "means.attributeName",
|
|
"extendsTrait": "means"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"traitName": "means.content",
|
|
"extendsTrait": "means"
|
|
},
|
|
{
|
|
"traitName": "means.content.text",
|
|
"extendsTrait": "means.content"
|
|
},
|
|
{
|
|
"traitName": "means.content.text.HTML",
|
|
"extendsTrait": "means.content.text"
|
|
},
|
|
{
|
|
"traitName": "means.content.text.JSON",
|
|
"extendsTrait": "means.content.text"
|
|
},
|
|
{
|
|
"traitName": "means.content.text.XML",
|
|
"extendsTrait": "means.content.text"
|
|
},
|
|
{
|
|
"traitName": "means.content.text.CSV",
|
|
"extendsTrait": "means.content.text"
|
|
},
|
|
{
|
|
"traitName": "means.content.binary",
|
|
"extendsTrait": "means.content"
|
|
},
|
|
{
|
|
"traitName": "means.content.binary.image",
|
|
"extendsTrait": "means.content.binary"
|
|
},
|
|
{
|
|
"traitName": "means.content.binary.image.BMP",
|
|
"extendsTrait": "means.content.binary.image"
|
|
},
|
|
{
|
|
"traitName": "means.content.binary.image.GIF",
|
|
"extendsTrait": "means.content.binary.image"
|
|
},
|
|
{
|
|
"traitName": "means.content.binary.image.JPG",
|
|
"extendsTrait": "means.content.binary.image"
|
|
},
|
|
{
|
|
"traitName": "means.content.binary.image.PNG",
|
|
"extendsTrait": "means.content.binary.image"
|
|
},
|
|
{
|
|
"traitName": "means.content.binary.image.TIFF",
|
|
"extendsTrait": "means.content.binary.image"
|
|
},
|
|
{
|
|
"explanation": "a CSV contained within one string value",
|
|
"dataTypeName": "list",
|
|
"extendsDataType": "string",
|
|
"exhibitsTraits": [
|
|
"means.content.text.CSV"
|
|
]
|
|
},
|
|
{
|
|
"explanation": "a root entity for constant reference tables",
|
|
"entityName": "reference"
|
|
},
|
|
{
|
|
"explanation": "The root relationship for associating attributes with entities.",
|
|
"purposeName": "hasA"
|
|
},
|
|
{
|
|
"traitName": "is.hidden",
|
|
"explanation": "All attributes with this trait should be hidden from view of the entity consumer."
|
|
},
|
|
{
|
|
"traitName": "is.secret",
|
|
"extendsTrait": "is"
|
|
},
|
|
{
|
|
"traitName": "is.required",
|
|
"extendsTrait": "is"
|
|
},
|
|
{
|
|
"traitName": "is.sensitive",
|
|
"extendsTrait": "is"
|
|
},
|
|
{
|
|
"traitName": "does.elevateAttribute",
|
|
"extendsTrait": "does",
|
|
"hasParameters": [
|
|
{
|
|
"name": "attribute",
|
|
"dataType": "attribute",
|
|
"required": true
|
|
}
|
|
],
|
|
"elevated": true,
|
|
"explanation": "elevates (up to a entity) a trait that describes a specific attribute"
|
|
},
|
|
{
|
|
"traitName": "is.identifiedBy",
|
|
"extendsTrait": "does.elevateAttribute",
|
|
"associatedProperties": [
|
|
"primaryKey",
|
|
"isPrimaryKey"
|
|
],
|
|
"explanation": "names a specifc identity attribute to use with an entity"
|
|
},
|
|
{
|
|
"explanation": "The attribute which supplies the unique identifier for the entity. Used by default in refereneces unless a different attribute is supplied with 'is.identifiedBy' trait.",
|
|
"purposeName": "identifiedBy",
|
|
"extendsPurpose": "hasA",
|
|
"exhibitsTraits": [
|
|
"is.identifiedBy"
|
|
]
|
|
},
|
|
{
|
|
"traitName": "is.named",
|
|
"extendsTrait": "does.elevateAttribute"
|
|
},
|
|
{
|
|
"explanation": "The attribute which supplies the name for the entity.",
|
|
"purposeName": "namedBy",
|
|
"extendsPurpose": "hasA",
|
|
"exhibitsTraits": [
|
|
"is.named"
|
|
]
|
|
},
|
|
{
|
|
"traitName": "is.ordered",
|
|
"extendsTrait": "does.elevateAttribute"
|
|
},
|
|
{
|
|
"explanation": "An attribute which determines the ordering of entity records",
|
|
"purposeName": "orderedBy",
|
|
"extendsPurpose": "hasA",
|
|
"exhibitsTraits": [
|
|
"is.ordered"
|
|
]
|
|
},
|
|
{
|
|
"traitName": "is.locatable",
|
|
"extendsTrait": "does.elevateAttribute"
|
|
},
|
|
{
|
|
"explanation": "An attribute which identifies the location of an entity",
|
|
"purposeName": "locatedAt",
|
|
"extendsPurpose": "hasA",
|
|
"exhibitsTraits": [
|
|
"is.locatable"
|
|
]
|
|
},
|
|
{
|
|
"traitName": "is.addedInSupportOf",
|
|
"extendsTrait": "is",
|
|
"hasParameters": [
|
|
{
|
|
"name": "inSupportOf",
|
|
"dataType": "attributeName",
|
|
"explanation": "output parameter naming the attribute that is being supported",
|
|
"required": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"traitName": "is.linkedEntity",
|
|
"explanation": "base for traits that are used to decorate the attributes and artifacts created by the traits on the hasFlexibleRelationshipWithEntity relationship."
|
|
},
|
|
{
|
|
"traitName": "is.linkedEntity.identifier",
|
|
"extendsTrait": "is.linkedEntity",
|
|
"hasParameters": [
|
|
{
|
|
"name": "entityReferences",
|
|
"dataType": "entity",
|
|
"explanation": "a reference to the constant entity holding the list of entity references",
|
|
"required": false
|
|
}
|
|
],
|
|
"explanation": "Marks the attribute(s) that hold foreign key references to a linked (used as an attribute) entity. This attribute is added to the resolved entity to enumerate the referenced entities."
|
|
},
|
|
{
|
|
"traitName": "is.linkedEntity.name",
|
|
"extendsTrait": "is.linkedEntity",
|
|
"explanation": "Marks an attribute that contains the entity name or 'class' for the situation where one entity links to (uses as an attribute) a set of possible entities."
|
|
},
|
|
{
|
|
"traitName": "is.linkedEntity.array",
|
|
"explanation": "Identifies the case when one entity links to (uses as an attribute) an array of other entities."
|
|
},
|
|
{
|
|
"traitName": "is.linkedEntity.array.count",
|
|
"explanation": "Marks an attribute that contains the count of items in the array of linked (used as an attribute) entities"
|
|
}
|
|
]
|
|
} |