OWLClassExpression

Objective-C

@protocol OWLClassExpression <OWLObject, OWLPropertyRange>

Swift

protocol OWLClassExpression : OWLPropertyRange

Represents Class Expressions in the OWL 2 specification. This protocol covers named and anonymous classes.

  • The class expression type for this class expression.

    Declaration

    Objective-C

    @property (nonatomic, readonly) OWLClassExpressionType classExpressionType;

    Swift

    var classExpressionType: OWLClassExpressionType { get }
  • Determines whether or not this expression represents an anonymous class expression.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL anonymous;

    Swift

    var anonymous: Bool { get }
  • Determines if this expression is the built in class owl:Thing.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isOWLThing;

    Swift

    var isOWLThing: Bool { get }
  • Determines if this expression is the built in class owl:Nothing.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isOWLNothing;

    Swift

    var isOWLNothing: Bool { get }
  • Interprets this expression as a conjunction and returns the conjuncts.

    Declaration

    Objective-C

    - (nonnull NSSet<id<OWLClassExpression>> *)asConjunctSet;

    Swift

    func asConjunctSet() -> Set<AnyHashable>

    Return Value

    The conjucts of this expression if it is a conjunction (object intersection of), or otherwise a set containing this expression.

  • If this class expression is in fact a named class then this method may be used to obtain the expression as an OWLClass without the need for casting. The general pattern of use is to use ‘anonymous’ to first check.

    Declaration

    Objective-C

    - (nullable id<OWLClass>)asOwlClass;

    Return Value

    This class expression as an OWLClass, or nil on error.