AnnotationTerm
open class AnnotationTerm : ObjectBase, @unchecked Sendable
Encapsulates an OData term definition.
See also
Annotation.
-
Term name within its defining schema, e.g. “MyTerm”.
Declaration
Swift
final public var localName: String -
Term name qualified by its owning schema, e.g. “MySchema.MyTerm”.
Declaration
Swift
final public var qualifiedName: String -
If this annotation was derived from an XML attribute, then the attribute name. XML attribute-based annotations are commonly used in OData 2.0 schemas.
Declaration
Swift
final public var xmlAttribute: String? -
Base term if this term is inherited, otherwise
nil.Declaration
Swift
final public var baseTerm: AnnotationTerm? -
Default value for
Annotation.valueof annotations referencing this term, ornilif there is no default value.Declaration
Swift
final public var defaultValue: DataValue? -
The types of CSDL definition this term applies to.
Declaration
Swift
final public var appliesTo: StringList -
True if the term value is text which can be pretty printed in CSDL documents (preserving relative indentation of lines but shifted for context).
Declaration
Swift
final public var prettyText: Bool -
trueif this item allows Unicode content. IfisUnicodeisfalse, then this item only allows ASCII content.Declaration
Swift
final public var isUnicode: Bool -
Minimum length for
stringandbinaryvalues.See also
TypeFacets.ANY_LENGTH.Declaration
Swift
final public var minLength: Int -
Maximum length for
stringandbinaryvalues.See also
TypeFacets.ANY_LENGTH.Declaration
Swift
final public var maxLength: Int -
Precision for
decimalandintegervalues.See also
TypeFacets.ANY_PRECISION.Declaration
Swift
final public var precision: Int -
Scale for
decimalvalues.See also
TypeFacets.FLOATING_SCALE,TypeFacets.VARIABLE_SCALE.Declaration
Swift
final public var scale: Int -
EPSG Spatial Reference System Identifier (SRID) for the associated value.
See also
TypeFacets.VARIABLE_SRID.Declaration
Swift
final public var srid: Int -
trueif this item is nullable.Declaration
Swift
final public var isOptional: Bool -
Source line number for this schema element within its defining schema.
Declaration
Swift
final public var sourceLine: Int -
trueif this annotation term was inferred due to a missing term definition in the CSDL.Declaration
Swift
final public var isInferred: Bool -
Default initializer.
Declaration
Swift
override public init() -
Lookup an existing annotation by term name, or throw an exception if the annotation is not found.
Declaration
Swift
open func annotation(withName term: String) throws -> AnnotationParameters
termThe term name.
Return Value
The annotation.
-
Obsolete. Use
annotations.Declaration
Swift
open var annotationList: AnnotationList { get } -
Obsolete. Use
annotations.Declaration
Swift
open var annotationMap: AnnotationMap { get } -
Map of annotations for this model element. For annotations without qualifiers, the entry key is the annotation term name. For annotations with qualifiers, the entry key is the annotation term name, then “#”, then the annotation qualifier.
Declaration
Swift
open var annotations: AnnotationMap { get } -
Declaration
Swift
open class func equal(a: AnnotationTerm?, b: AnnotationTerm?) -> BoolParameters
aFirst annotation term.
bSecond annotation term.
Return Value
trueif two annotation terms have equal key-values. -
Synonym for
qualifiedName.Declaration
Swift
open var name: String { get } -
Declaration
Swift
override open func toString() -> StringReturn Value
A string representation of this object.
-
Data type for
Annotation.valueof annotations referencing this term.Declaration
Swift
public final var type: DataType { get set }