AnnotationTerm

open class AnnotationTerm : ObjectBase

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.value of annotations referencing this term, or nil if 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
  • true if this item allows Unicode content. If isUnicode is false, then this item only allows ASCII content.

    Declaration

    Swift

    final public var isUnicode: Bool
  • Minimum length for string and binary values.

    See also

    TypeFacets.ANY_LENGTH.

    Declaration

    Swift

    final public var minLength: Int
  • Maximum length for string and binary values.

    See also

    TypeFacets.ANY_LENGTH.

    Declaration

    Swift

    final public var maxLength: Int
  • Precision for decimal and integer values.

    See also

    TypeFacets.ANY_PRECISION.

    Declaration

    Swift

    final public var precision: Int
  • Scale for decimal values.

    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
  • true if 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
  • true if 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.

    See also

    annotations and AnnotationMap.get, for looking up annotations that might not exist.

    Declaration

    Swift

    open func annotation(withName term: String) throws -> Annotation

    Parameters

    term

    The 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.

    See also

    Annotation, AnnotationTerm.

    Declaration

    Swift

    open var annotations: AnnotationMap { get }
  • Declaration

    Swift

    open class func equal(a: AnnotationTerm?, b: AnnotationTerm?) -> Bool

    Parameters

    a

    First annotation term.

    b

    Second annotation term.

    Return Value

    true if two annotation terms have equal key-values.

  • true if this item has fixed length for string and binary values.

    See also

    minLength, maxLength.

    Declaration

    Swift

    open var fixedLength: Bool { get }
  • Synonym for qualifiedName.

    Declaration

    Swift

    open var name: String { get }
  • Declaration

    Swift

    override open func toString() -> String

    Return Value

    A string representation of this object.

  • Data type for Annotation.value of annotations referencing this term.

    Declaration

    Swift

    public final var type: DataType { get set }