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
-
– wrappedQueryResultsReturns the underlying librdf_query_results object of the receiver.
-
– countReturns the number of bindings so far
-
– nextAdvances to the next result.
-
– finishedReturns YES if the query results are exhausted.
-
– bindingsReturns a dictionary of the current result bindings.
-
– countOfBindingsReturns 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.
-
– resultStreamReturns an RDF graph of the results.
-
– resultEnumeratorReturns 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.
-
– isBindingsReturns YES if the query results are in variable bindings format.
-
– isBooleanReturns YES if the query results are in boolean format.
-
– isGraphReturns YES if the query results are in graph format.
-
– getBooleanGet boolean query result.
Instance Methods
bindings
Returns a dictionary of the current result bindings.
- (NSDictionary *)bindingsReturn Value
An NSDictionary
Discussion
Returns a dictionary of the current result bindings.
Declared In
RedlandQueryResults.mcount
Returns the number of bindings so far
- (int)countReturn Value
Returns the number of bindings so far
Declared In
RedlandQueryResults.mcountOfBindings
Returns the number of bindings of the receiver.
- (int)countOfBindingsReturn Value
An int
Discussion
Returns the number of bindings of the receiver.
Declared In
RedlandQueryResults.mfinished
Returns YES if the query results are exhausted.
- (BOOL)finishedReturn Value
Returns YES if the query results are exhausted.
Declared In
RedlandQueryResults.mgetBoolean
Get boolean query result.
- (int)getBooleanReturn 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.misBindings
Returns YES if the query results are in variable bindings format.
- (BOOL)isBindingsReturn Value
A BOOL
Discussion
Returns YES if the query results are in variable bindings format.
Declared In
RedlandQueryResults.misBoolean
Returns YES if the query results are in boolean format.
- (BOOL)isBooleanReturn Value
A BOOL
Discussion
Returns YES if the query results are in boolean format.
Declared In
RedlandQueryResults.misGraph
Returns YES if the query results are in graph format.
- (BOOL)isGraphReturn Value
A BOOL
Discussion
Returns YES if the query results are in graph format.
Declared In
RedlandQueryResults.mnameOfBindingAtIndex:
Returns the name of the binding at the given index.
- (NSString *)nameOfBindingAtIndex:(int)offsetReturn Value
An NSString instance
Discussion
Returns the name of the binding at the given index.
Declared In
RedlandQueryResults.mnext
Advances to the next result.
- (BOOL)nextReturn Value
Returns YES if there is a next result, otherwise NO.
Discussion
Advances to the next result.
Declared In
RedlandQueryResults.mresultEnumerator
Returns an enumerator over the query results.
- (RedlandQueryResultsEnumerator *)resultEnumeratorReturn Value
A RedlandQueryResultsEnumerator
Discussion
Returns an enumerator over the query results.
Warning: This is the recommended way to evaluate query results.
Declared In
RedlandQueryResults.mresultStream
Returns an RDF graph of the results.
- (RedlandStream *)resultStreamReturn 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.mstringRepresentationWithFormat:baseURI:
Turns query results into a string in the specified format.
- (NSString *)stringRepresentationWithFormat:(RedlandURI *)formatURI baseURI:(RedlandURI *)baseURIReturn Value
An NSString instance
Discussion
Turns query results into a string in the specified format.
Declared In
RedlandQueryResults.mstringRepresentationWithMimeType:baseURI:
Turns query results into a string in the specified mimeType.
- (NSString *)stringRepresentationWithMimeType:(NSString *)mimeType baseURI:(RedlandURI *)baseURIReturn Value
An NSString instance
Discussion
Turns query results into a string in the specified mimeType.
Declared In
RedlandQueryResults.mstringRepresentationWithName:baseURI:
Turns query results into a string in the specified name.
- (NSString *)stringRepresentationWithName:(NSString *)name baseURI:(RedlandURI *)baseURIReturn Value
An NSString instance
Discussion
Turns query results into a string in the specified name.
Declared In
RedlandQueryResults.mvalueOfBinding:
Returns the current value of the binding with the given name.
- (RedlandNode *)valueOfBinding:(NSString *)aNameParameters
- aName
NSString
Return Value
A RedlandNode object
Discussion
Returns the current value of the binding with the given name.
Declared In
RedlandQueryResults.mvalueOfBindingAtIndex:
Returns the current value of the binding at the given index.
- (RedlandNode *)valueOfBindingAtIndex:(int)offsetReturn Value
A RedlandNode object
Discussion
Returns the current value of the binding at the given index.
Declared In
RedlandQueryResults.m