RedlandQueryResults Class Reference
Inherits from | RedlandWrappedObject : NSObject |
Declared in | RedlandQueryResults.h RedlandQueryResults.m |
Overview
This class represents results from the execution of a RedlandQuery.
Warning: Query results work almost like an enumerator. You can go through the results by invoking next and get the bindings for each result through the various methods defined below. For simplicity, it is recommended that you use the resultEnumerator method to get a standard Cocoa NSEnumerator of the results.
Tasks
-
– wrappedQueryResults
Returns the underlying librdf_query_results object of the receiver.
-
– count
Returns the number of bindings so far
-
– next
Advances to the next result.
-
– finished
Returns YES if the query results are exhausted.
-
– bindings
Returns a dictionary of the current result bindings.
-
– countOfBindings
Returns the number of bindings of the receiver.
-
– valueOfBinding:
Returns the current value of the binding with the given name.
-
– valueOfBindingAtIndex:
Returns the current value of the binding at the given index.
-
– nameOfBindingAtIndex:
Returns the name of the binding at the given index.
-
– resultStream
Returns an RDF graph of the results.
-
– resultEnumerator
Returns an enumerator over the query results.
-
– stringRepresentationWithFormat:baseURI:
Turns query results into a string in the specified format.
-
– stringRepresentationWithName:baseURI:
Turns query results into a string in the specified name.
-
– stringRepresentationWithMimeType:baseURI:
Turns query results into a string in the specified mimeType.
-
– isBindings
Returns YES if the query results are in variable bindings format.
-
– isBoolean
Returns YES if the query results are in boolean format.
-
– isGraph
Returns YES if the query results are in graph format.
-
– getBoolean
Get boolean query result.
Instance Methods
bindings
Returns a dictionary of the current result bindings.
- (NSDictionary *)bindings
Return Value
An NSDictionary
Discussion
Returns a dictionary of the current result bindings.
Declared In
RedlandQueryResults.m
count
Returns the number of bindings so far
- (int)count
Return Value
Returns the number of bindings so far
Declared In
RedlandQueryResults.m
countOfBindings
Returns the number of bindings of the receiver.
- (int)countOfBindings
Return Value
An int
Discussion
Returns the number of bindings of the receiver.
Declared In
RedlandQueryResults.m
finished
Returns YES if the query results are exhausted.
- (BOOL)finished
Return Value
Returns YES if the query results are exhausted.
Declared In
RedlandQueryResults.m
getBoolean
Get boolean query result.
- (int)getBoolean
Return Value
Returns > 0 if true, 0 if false, < 0 on error or finished
Discussion
Get boolean query result.
Warning: The return value is only meaningful if this is a boolean query result.
Declared In
RedlandQueryResults.m
isBindings
Returns YES if the query results are in variable bindings format.
- (BOOL)isBindings
Return Value
A BOOL
Discussion
Returns YES if the query results are in variable bindings format.
Declared In
RedlandQueryResults.m
isBoolean
Returns YES if the query results are in boolean format.
- (BOOL)isBoolean
Return Value
A BOOL
Discussion
Returns YES if the query results are in boolean format.
Declared In
RedlandQueryResults.m
isGraph
Returns YES if the query results are in graph format.
- (BOOL)isGraph
Return Value
A BOOL
Discussion
Returns YES if the query results are in graph format.
Declared In
RedlandQueryResults.m
nameOfBindingAtIndex:
Returns the name of the binding at the given index.
- (NSString *)nameOfBindingAtIndex:(int)offset
Return Value
An NSString instance
Discussion
Returns the name of the binding at the given index.
Declared In
RedlandQueryResults.m
next
Advances to the next result.
- (BOOL)next
Return Value
Returns YES if there is a next result, otherwise NO.
Discussion
Advances to the next result.
Declared In
RedlandQueryResults.m
resultEnumerator
Returns an enumerator over the query results.
- (RedlandQueryResultsEnumerator *)resultEnumerator
Return Value
A RedlandQueryResultsEnumerator
Discussion
Returns an enumerator over the query results.
Warning: This is the recommended way to evaluate query results.
Declared In
RedlandQueryResults.m
resultStream
Returns an RDF graph of the results.
- (RedlandStream *)resultStream
Return Value
Discussion
Returns an RDF graph of the results.
Warning: The return value is only meaningful if this is an RDF graph query result.
Declared In
RedlandQueryResults.m
stringRepresentationWithFormat:baseURI:
Turns query results into a string in the specified format.
- (NSString *)stringRepresentationWithFormat:(RedlandURI *)formatURI baseURI:(RedlandURI *)baseURI
Return Value
An NSString instance
Discussion
Turns query results into a string in the specified format.
Declared In
RedlandQueryResults.m
stringRepresentationWithMimeType:baseURI:
Turns query results into a string in the specified mimeType.
- (NSString *)stringRepresentationWithMimeType:(NSString *)mimeType baseURI:(RedlandURI *)baseURI
Return Value
An NSString instance
Discussion
Turns query results into a string in the specified mimeType.
Declared In
RedlandQueryResults.m
stringRepresentationWithName:baseURI:
Turns query results into a string in the specified name.
- (NSString *)stringRepresentationWithName:(NSString *)name baseURI:(RedlandURI *)baseURI
Return Value
An NSString instance
Discussion
Turns query results into a string in the specified name.
Declared In
RedlandQueryResults.m
valueOfBinding:
Returns the current value of the binding with the given name.
- (RedlandNode *)valueOfBinding:(NSString *)aName
Parameters
- aName
NSString
Return Value
A RedlandNode object
Discussion
Returns the current value of the binding with the given name.
Declared In
RedlandQueryResults.m
valueOfBindingAtIndex:
Returns the current value of the binding at the given index.
- (RedlandNode *)valueOfBindingAtIndex:(int)offset
Return Value
A RedlandNode object
Discussion
Returns the current value of the binding at the given index.
Declared In
RedlandQueryResults.m