Inherits from RedlandWrappedObject : NSObject
Conforms to NSCoding
NSCopying
Declared in RedlandStatement.h
RedlandStatement.m

Overview

A RedlandStatement represents a single statement or assertion in an RDF graph.

Each statement consists of a subject, a predicate and an object, which are all of the class RedlandNode. Wraps librdf_statement. Instances of RedlandStatement conform to the NSCopying and NSCoding protocols.

Tasks

Properties

object

The object, may be nil.

@property (nonatomic, readonly, strong) RedlandNode *object

Discussion

The object, may be nil.

Declared In

RedlandStatement.h

predicate

The predicate, may be nil.

@property (nonatomic, readonly, strong) RedlandNode *predicate

Discussion

The predicate, may be nil.

Declared In

RedlandStatement.h

subject

The subject, may be nil.

@property (nonatomic, readonly, strong) RedlandNode *subject

Discussion

The subject, may be nil.

Declared In

RedlandStatement.h

Class Methods

statementWithSubject:predicate:object:

Convenience method which returns an autoreleased statement initialized using the designated initializer.

+ (RedlandStatement *)statementWithSubject:(id)subjectNode predicate:(id)predicateNode object:(id)objectNode

Parameters

subjectNode

The subject for the statement

predicateNode

The predicate

objectNode

The object

Discussion

Convenience method which returns an autoreleased statement initialized using the designated initializer.

Declared In

RedlandStatement.m

Instance Methods

initWithSubject:predicate:object:

The designated initializer, initializes a new RedlandStatement.

- (id)initWithSubject:(id)subjectNode predicate:(id)predicateNode object:(id)objectNode

Parameters

subjectNode

An object representing the subject or source of the statement.

predicateNode

An object representing the predicate or arc of the statement.

objectNode

An object representing the object or target of the statement.

Discussion

The designated initializer, initializes a new RedlandStatement.

Each parameter can be either be nil, of type RedlandNode, or of any other class that responds to the selector nodeValue. The Redland Objective-C framework provides additional nodeValue methods for the core Cocoa classes NSString, NSNumber, NSURL, and NSDate.

Declared In

RedlandStatement.m

isComplete

Returns YES if the receiver has all non-nil subject, predicate, and object parts.

- (BOOL)isComplete

Return Value

Returns YES if the receiver has all non-nil subject, predicate, and object parts.

Declared In

RedlandStatement.m

matchesPartialStatement:

All parts of aStatement which are non-nil must be equal to their counterparts in the receiver.

- (BOOL)matchesPartialStatement:(RedlandStatement *)aStatement

Parameters

aStatement

The statement to compare the receiver to.

Return Value

Returns YES if the receiver matches aStatement.

Discussion

Warning: All parts of aStatement which are non-nil must be equal to their counterparts in the receiver.

Declared In

RedlandStatement.m

wrappedStatement

Returns the underlying librdf_statement pointer of the receiver.

- (librdf_statement *)wrappedStatement

Return Value

Returns the underlying librdf_statement pointer of the receiver.

Declared In

RedlandStatement.m