Annotation

open class Annotation : ObjectBase

Represents an OData annotation.

See also

AnnotationTerm.
  • Annotation qualifier.

    Declaration

    Swift

    final public var qualifier: String?
  • Is explicitValue an explicit nil value?

    Declaration

    Swift

    final public var explicitNull: Bool
  • Explicit annotation value.

    See also

    value.

    Declaration

    Swift

    final public var explicitValue: DataValue?
  • Property name if this annotation was applied to a property.

    Declaration

    Swift

    final public var propertyName: String?
  • Source line number for this schema element within its defining schema.

    Declaration

    Swift

    final public var sourceLine: Int
  • Source line name for this schema element within its defining schema.

    Declaration

    Swift

    final public var sourceFile: String?
  • 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) -> 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: Annotation?, b: Annotation?) -> Bool

    Parameters

    a

    First annotation.

    b

    Second annotation.

    Return Value

    true if two annotations have equal key-values.

  • Annotation term.

    Declaration

    Swift

    public final var term: AnnotationTerm { get set }
  • Declaration

    Swift

    override open func toString() -> String

    Return Value

    A string representation of this object.

  • Annotation value. Will return term.defaultValue if explicitValue is nil and explicitNull is false. Otherwise returns explicitValue.

    Declaration

    Swift

    open var value: DataValue? { get }
  • Declaration

    Swift

    open func valueIsTrue() -> Bool

    Return Value

    true if value is true.