Title: | RDF Library Bindings in R |
---|---|
Description: | Provides methods to parse, query and serialize information stored in the Resource Description Framework (RDF). RDF is described at <https://www.w3.org/TR/rdf-primer/>. This package supports RDF by implementing an R interface to the Redland RDF C library, described at <https://librdf.org/docs/api/index.html>. In brief, RDF provides a structured graph consisting of Statements composed of Subject, Predicate, and Object Nodes. |
Authors: | Matthew B. Jones [aut, cre] , Peter Slaughter [aut] , Jeroen Ooms [aut] , Carl Boettiger [aut] , Scott Chamberlain [ctb] , David Beckett [cph], University of Bristol [cph], Regents of the University of California [cph] |
Maintainer: | Matthew B. Jones <[email protected]> |
License: | Apache License 2.0 |
Version: | 1.0.17-18 |
Built: | 2024-11-25 06:51:26 UTC |
Source: | CRAN |
Subset a list of ExternalReferences
## S4 method for signature 'ExternalReference' x[i, j, ..., drop = TRUE]
## S4 method for signature 'ExternalReference' x[i, j, ..., drop = TRUE]
x |
a list of ExternalReferences |
i |
row subscript |
j |
column subscript |
... |
additional arguments |
drop |
a logical |
Assign values in a list of ExternalReferences
## S4 replacement method for signature 'ExternalReference' x[i, j, ...] <- value
## S4 replacement method for signature 'ExternalReference' x[i, j, ...] <- value
x |
a list of ExternalReferences |
i |
row subscript |
j |
column subscript |
... |
additional arguments |
value |
a value to assign |
Add a Statement object to the Model
addStatement(.Object, statement) ## S4 method for signature 'Model,Statement' addStatement(.Object, statement)
addStatement(.Object, statement) ## S4 method for signature 'Model,Statement' addStatement(.Object, statement)
.Object |
a Model object |
statement |
the Statement that will be added |
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="")
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="")
The initialize query is executed and the result is returned as a QueryResult object
executeQuery(.Object, model) ## S4 method for signature 'Query' executeQuery(.Object, model)
executeQuery(.Object, model) ## S4 method for signature 'Query' executeQuery(.Object, model)
.Object |
a Query object |
model |
a Model object containing the statements to query |
a QueryResults object
Free memory used by a librdf model.
freeModel(.Object) ## S4 method for signature 'Model' freeModel(.Object)
freeModel(.Object) ## S4 method for signature 'Model' freeModel(.Object)
.Object |
a Model object |
After this method is called, the Model object is no longer usable and should
be deleted "rm(model)"
and a new object created.
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") # At this point, some operations would be performed with the model. # See '?redland' for a complete example. # When the Model object is no longer needed, the resources it has allocated can be freed. freeModel(model) rm(model)
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") # At this point, some operations would be performed with the model. # See '?redland' for a complete example. # When the Model object is no longer needed, the resources it has allocated can be freed. freeModel(model) rm(model)
Free memory used by a librdf parser
freeParser(.Object) ## S4 method for signature 'Parser' freeParser(.Object)
freeParser(.Object) ## S4 method for signature 'Parser' freeParser(.Object)
.Object |
a Node object |
After freeNode is called, the Node object is no longer usable and should
be deleted "rm(nodeName)"
and a new object created.
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") parser <- new("Parser", world) filePath <- system.file("extdata/example.rdf", package="redland") parseFileIntoModel(parser, world, filePath, model) # At this point, some operations would be performed with the Model that has been populated # with the parser. # See '?redland' for a complete example. # When the parser object is no longer needed, the resources it had allocated can be freed. freeParser(parser) rm(parser)
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") parser <- new("Parser", world) filePath <- system.file("extdata/example.rdf", package="redland") parseFileIntoModel(parser, world, filePath, model) # At this point, some operations would be performed with the Model that has been populated # with the parser. # See '?redland' for a complete example. # When the parser object is no longer needed, the resources it had allocated can be freed. freeParser(parser) rm(parser)
Free memory used by a librdf query
freeQuery(.Object) ## S4 method for signature 'Query' freeQuery(.Object)
freeQuery(.Object) ## S4 method for signature 'Query' freeQuery(.Object)
.Object |
a Query object |
After this method is called, the Query object is no longer usable and should
be deleted "rm(query)"
and a new object created.
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") stmt <- new("Statement", world=world, subject="https://orcid.org/0000-0002-2192-403X", predicate="http://www.w3.org/ns/prov#Agent", object="slaughter", objectType="literal", datatype_uri="http://www.w3.org/2001/XMLSchema#string") status <- addStatement(model, stmt) queryString <- paste("PREFIX orcid: <https://orcid.org/>", "PREFIX dataone: <https://cn.dataone.org/cn/v1/resolve/>", "PREFIX prov: <http://www.w3.org/ns/prov#>", "SELECT ?a ?c WHERE { ?a prov:Agent ?c . }", sep=" ") query <- new("Query", world, queryString, base_uri=NULL, query_language="sparql", query_uri=NULL) # Return all results as a string results <- getResults(query, model, "rdfxml") # When the query object is no longer needed, the resources it had allocated can be freed. freeQuery(query) rm(query)
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") stmt <- new("Statement", world=world, subject="https://orcid.org/0000-0002-2192-403X", predicate="http://www.w3.org/ns/prov#Agent", object="slaughter", objectType="literal", datatype_uri="http://www.w3.org/2001/XMLSchema#string") status <- addStatement(model, stmt) queryString <- paste("PREFIX orcid: <https://orcid.org/>", "PREFIX dataone: <https://cn.dataone.org/cn/v1/resolve/>", "PREFIX prov: <http://www.w3.org/ns/prov#>", "SELECT ?a ?c WHERE { ?a prov:Agent ?c . }", sep=" ") query <- new("Query", world, queryString, base_uri=NULL, query_language="sparql", query_uri=NULL) # Return all results as a string results <- getResults(query, model, "rdfxml") # When the query object is no longer needed, the resources it had allocated can be freed. freeQuery(query) rm(query)
After this method is called, the QueryResults object is no longer usable and should
be deleted with "rm(query)"
.
freeQueryResults(.Object) ## S4 method for signature 'QueryResults' freeQueryResults(.Object)
freeQueryResults(.Object) ## S4 method for signature 'QueryResults' freeQueryResults(.Object)
.Object |
a QueryResults object |
Free memory used by a librdf serializer.
freeSerializer(.Object) ## S4 method for signature 'Serializer' freeSerializer(.Object)
freeSerializer(.Object) ## S4 method for signature 'Serializer' freeSerializer(.Object)
.Object |
a Serializer object |
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") filePath <- system.file("extdata/example.rdf", package="redland") parser <- new("Parser", world) parseFileIntoModel(parser, world, filePath, model) # Creat the default "rdfxml" serizlizer serializer <- new("Serializer", world) # At this point, some operations would be performed with the Serializer object. # See '?Serializer' for a complete example. # When the serializer object is no longer needed, the resources it had allocated can be freed. freeSerializer(serializer) rm(serializer)
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") filePath <- system.file("extdata/example.rdf", package="redland") parser <- new("Parser", world) parseFileIntoModel(parser, world, filePath, model) # Creat the default "rdfxml" serizlizer serializer <- new("Serializer", world) # At this point, some operations would be performed with the Serializer object. # See '?Serializer' for a complete example. # When the serializer object is no longer needed, the resources it had allocated can be freed. freeSerializer(serializer) rm(serializer)
Free memory used by a librdf statement
freeStatement(.Object) ## S4 method for signature 'Statement' freeStatement(.Object)
freeStatement(.Object) ## S4 method for signature 'Statement' freeStatement(.Object)
.Object |
a Statement object |
After this method is called, the Statement object is no longer usable and should
be deleted "rm(statement)"
and a new object created. This method frees
all resources for the statement, as well as each node in the statement.
world <- new("World") stmt <- new("Statement", world, subject="http://www.example.com/myevent", predicate="http://example.com/occurredAt", object="Tue Feb 17 14:05:13 PST 2015") # At this point, some operations would be performed with the Statement. # See '?redland' for a complete example. # When the Statement object is no longer needed, the resources it had allocated can be freed. freeStatement(stmt) rm(stmt)
world <- new("World") stmt <- new("Statement", world, subject="http://www.example.com/myevent", predicate="http://example.com/occurredAt", object="Tue Feb 17 14:05:13 PST 2015") # At this point, some operations would be performed with the Statement. # See '?redland' for a complete example. # When the Statement object is no longer needed, the resources it had allocated can be freed. freeStatement(stmt) rm(stmt)
After this method is called, the Storage object is no longer usable and should
be deleted "rm(storage)"
and a new object created.
freeStorage(.Object) ## S4 method for signature 'Storage' freeStorage(.Object)
freeStorage(.Object) ## S4 method for signature 'Storage' freeStorage(.Object)
.Object |
a Storage object to free memory for |
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") # At this point we would perform some operations using the storage object. # See '?redland' for a complete example. # When the Storage object is no longer needed, the resources it had allocated can be freed. status <- freeStorage(storage) rm(storage)
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") # At this point we would perform some operations using the storage object. # See '?redland' for a complete example. # When the Storage object is no longer needed, the resources it had allocated can be freed. status <- freeStorage(storage) rm(storage)
Free memory used by a librdf world object
freeWorld(.Object) ## S4 method for signature 'World' freeWorld(.Object)
freeWorld(.Object) ## S4 method for signature 'World' freeWorld(.Object)
.Object |
a World object |
After this method is called, the World object is no longer usable and should
be deleted "rm(world)"
and a new object created.
world <- new("World") # At this point we would perform some operations using the world object. # When the world object is no longer needed, we can free the resources it has allocated. result <- freeWorld(world) rm(world)
world <- new("World") # At this point we would perform some operations using the world object. # When the world object is no longer needed, we can free the resources it has allocated. result <- freeWorld(world) rm(world)
Get the blank identifier that has been assigned for a specified Node object
getBlankNodeId(.Object) ## S4 method for signature 'Node' getBlankNodeId(.Object)
getBlankNodeId(.Object) ## S4 method for signature 'Node' getBlankNodeId(.Object)
.Object |
a Node object |
When a Node object is initialized with no value specified, i.e. node <- Node(""), a blank node is created and a locally unique identifier is generated by librdf. This method retrieves this identifier and returns in to the caller.
a blank node identifier
world <- new("World") # a blank node is created with a unique identifier generated by librdf node <- new("Node", world, blank=NULL) nodeId <- getBlankNodeId(node)
world <- new("World") # a blank node is created with a unique identifier generated by librdf node <- new("Node", world, blank=NULL) nodeId <- getBlankNodeId(node)
A Node has a type that is assigned at initialization and can have one of the following values: 'resource', 'literal', 'blank' and 'unknown'.
getNodeType(.Object) ## S4 method for signature 'Node' getNodeType(.Object)
getNodeType(.Object) ## S4 method for signature 'Node' getNodeType(.Object)
.Object |
a Node object |
a character vector containing the Node type
world <- new("World") node <- new("Node", world, uri="http://www.example.com") nodeType <- getNodeType(node)
world <- new("World") node <- new("Node", world, uri="http://www.example.com") nodeType <- getNodeType(node)
Get the value of the node as a string
getNodeValue(.Object) ## S4 method for signature 'Node' getNodeValue(.Object)
getNodeValue(.Object) ## S4 method for signature 'Node' getNodeValue(.Object)
.Object |
a Node object |
The value of the node is returned as a string. If the node type is 'blank', then the blank node identifier is returned. If the node type is 'literal', then the literal value is returned with the form "string@language, e.g. "¡Hola, amigo! ¿Cómo estás?"@es". If the node type is 'uri' then the value is returned as a string.
a string representation of the Node's value
world <- new("World") node <- new("Node", world, literal="¡Hola, amigo! ¿Cómo estás?", language="es") value <- getNodeValue(node)
world <- new("World") node <- new("Node", world, literal="¡Hola, amigo! ¿Cómo estás?", language="es") value <- getNodeValue(node)
Get the query result limit
getQueryResultLimit(.Object) ## S4 method for signature 'Query' getQueryResultLimit(.Object)
getQueryResultLimit(.Object) ## S4 method for signature 'Query' getQueryResultLimit(.Object)
.Object |
a Query object |
the query result limit. If a limit is set then the value will be >= 0. If the value is < 0, no limit is set
Return all query results
getResults(.Object, model, ...) ## S4 method for signature 'Query' getResults(.Object, model, formatName = "rdfxml")
getResults(.Object, model, ...) ## S4 method for signature 'Query' getResults(.Object, model, formatName = "rdfxml")
.Object |
a Query object |
model |
a Model object |
... |
additional parameters |
formatName |
a string specifying the RDF format name. Currently the supported formats are "rdfxml" ,"turtle", "json", "csv" |
After this method is called, the Query object is no longer usable and should
be deleted "rm(query)"
and a new object created.
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") stmt <- new("Statement", world=world, subject="https://orcid.org/0000-0002-2192-403X", predicate="http://www.w3.org/ns/prov#Agent", object="slaughter", objectType="literal", datatype_uri="http://www.w3.org/2001/XMLSchema#string") #objectType="literal", language="en") status <- addStatement(model, stmt) queryString <- paste("PREFIX orcid: <https://orcid.org/>", "PREFIX dataone: <https://cn.dataone.org/cn/v1/resolve/>", "PREFIX prov: <http://www.w3.org/ns/prov#>", "SELECT ?a ?c WHERE { ?a prov:Agent ?c . }", sep=" ") query <- new("Query", world, queryString, base_uri=NULL, query_language="sparql", query_uri=NULL) # Return all results as a string results <- getResults(query, model, "rdfxml") results <- getResults(query, model, "turtle") results <- getResults(query, model, "json") # When the query object is no longer needed, the resources it had allocated can be freed. freeQuery(query) rm(query)
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") stmt <- new("Statement", world=world, subject="https://orcid.org/0000-0002-2192-403X", predicate="http://www.w3.org/ns/prov#Agent", object="slaughter", objectType="literal", datatype_uri="http://www.w3.org/2001/XMLSchema#string") #objectType="literal", language="en") status <- addStatement(model, stmt) queryString <- paste("PREFIX orcid: <https://orcid.org/>", "PREFIX dataone: <https://cn.dataone.org/cn/v1/resolve/>", "PREFIX prov: <http://www.w3.org/ns/prov#>", "SELECT ?a ?c WHERE { ?a prov:Agent ?c . }", sep=" ") query <- new("Query", world, queryString, base_uri=NULL, query_language="sparql", query_uri=NULL) # Return all results as a string results <- getResults(query, model, "rdfxml") results <- getResults(query, model, "turtle") results <- getResults(query, model, "json") # When the query object is no longer needed, the resources it had allocated can be freed. freeQuery(query) rm(query)
After a Statement object has been created, this method can be used to determine the RDF type ("uri", "literal", "blank") that has been assigned to the specified RDF term, i.e. "subject", "predicate", "object".
getTermType(.Object, term) ## S4 method for signature 'Statement,character' getTermType(.Object, term)
getTermType(.Object, term) ## S4 method for signature 'Statement,character' getTermType(.Object, term)
.Object |
a Statement object |
term |
the RDF term for which the type will be returned |
world <- new("World") subject <- new("Node", blank="_:myid1", world) predicate <- new("Node", uri="http://www.example.com/isa", world) object <- new("Node", literal="thing", world) stmt <- new("Statement", world, subject, predicate, object, world) termType <- getTermType(stmt, "predicate")
world <- new("World") subject <- new("Node", blank="_:myid1", world) predicate <- new("Node", uri="http://www.example.com/isa", world) object <- new("Node", literal="thing", world) stmt <- new("Statement", world, subject, predicate, object, world) termType <- getTermType(stmt, "predicate")
Constructor for a Model object.
## S4 method for signature 'Model' initialize(.Object, world, storage, options)
## S4 method for signature 'Model' initialize(.Object, world, storage, options)
.Object |
a Node object |
world |
a World object |
storage |
a Storage object |
options |
extra options for model initialization |
the World object
A Node has an associated type corresponding to the RDF component that it is representing. The list of possible types is "resource", "literal" or "blank".
## S4 method for signature 'Node' initialize(.Object, world, literal, uri, blank, datatype_uri, language)
## S4 method for signature 'Node' initialize(.Object, world, literal, uri, blank, datatype_uri, language)
.Object |
the Node object to be initialized |
world |
a World object |
literal |
a literal character value to be assigned to the node |
uri |
a uri character value to be assigned to the node |
blank |
a blank node identifier to be assigned to the node |
datatype_uri |
a uri used to specify the datatype of a literal node, i.e. "http://www.w3.org/2001/XMLSchema#string" |
language |
a character value specifying the RDF language tag (excluding the "@" symbol), i.e. "fr" |
The url=' and 'literal=' arguments determine which type of Node is created. The Node type affects how the Node is processed in serialization, for example a Node created with 'node1 <- new("Node", literal="http://www.example.com")' is processed differently that a Node created with 'node1 <- new("Node", url="http://www.example.com")', with the former being processed as an RDF literal and the latter processed as an RDF resource.
the Node object
Refer to https://www.w3.org/TR/rdf11-concepts information on language tags.
A Parser object is initialized for a specific RDF serialization.
## S4 method for signature 'Parser' initialize( .Object, world, name = "rdfxml", mimeType = "application/rdf+xml", typeUri = as.character(NA) )
## S4 method for signature 'Parser' initialize( .Object, world, name = "rdfxml", mimeType = "application/rdf+xml", typeUri = as.character(NA) )
.Object |
the Parser object |
world |
a World object |
name |
name of the parser factory to use |
mimeType |
a mime type of the syntax of the model |
typeUri |
a URI for the syntax of the model |
The serialization format that are supported by
the Parser object
Initialize the Query object.
## S4 method for signature 'Query' initialize( .Object, world, querystring, base_uri = NULL, query_language = "sparql", query_uri = NULL )
## S4 method for signature 'Query' initialize( .Object, world, querystring, base_uri = NULL, query_language = "sparql", query_uri = NULL )
.Object |
the Query object |
world |
a World object |
querystring |
a query string for the language specified in 'query_language' |
base_uri |
a URI to prepend to relative URI in the document |
query_language |
the query language to execute the querystring with |
query_uri |
a URI to prepend to terms in the query |
the Query object
The QueryResults object is initialized with the librdf query result from
return value of 'Query.execute()'
.
## S4 method for signature 'QueryResults' initialize(.Object, results)
## S4 method for signature 'QueryResults' initialize(.Object, results)
.Object |
the QueryResults object. |
results |
a librdf query result |
A QueryResults object is returned by the Query.executeQuery()
method, so typically a user
does not initialize a QueryResult object by calling new("QueryResult", ...)
the QueryResults object
Construct a Serializer object.
## S4 method for signature 'Serializer' initialize( .Object, world, name = "rdfxml", mimeType = "application/rdf+xml", typeUri = as.character(NA) )
## S4 method for signature 'Serializer' initialize( .Object, world, name = "rdfxml", mimeType = "application/rdf+xml", typeUri = as.character(NA) )
.Object |
the Serializer object |
world |
a World object |
name |
name of a previously created serializer factory to use |
mimeType |
a mime type of the syntax of the model |
typeUri |
a URI for the syntax of the model |
the Serializer object
Construct a Statement object.
## S4 method for signature 'Statement' initialize( .Object, world, subject, predicate, object, subjectType = as.character(NA), objectType = as.character(NA), datatype_uri = as.character(NA), language = as.character(NA) )
## S4 method for signature 'Statement' initialize( .Object, world, subject, predicate, object, subjectType = as.character(NA), objectType = as.character(NA), datatype_uri = as.character(NA), language = as.character(NA) )
.Object |
the Statement object |
world |
a World object |
subject |
a Node object |
predicate |
a Node object |
object |
a Node object |
subjectType |
the Node type of the subject, i.e. "blank", "uri" |
objectType |
the Node type of the object, i.e. "blank", "uri", "literal" |
datatype_uri |
the datatype URI to associate with a object literal value |
language |
a character value specifying the RDF language tag for an object literal value (excluding the "@" symbol), i.e. "fr" |
the Statement object
Initialize a Storage object
## S4 method for signature 'Storage' initialize( .Object, world, type = "hashes", name = "", options = "hash-type='memory'" )
## S4 method for signature 'Storage' initialize( .Object, world, type = "hashes", name = "", options = "hash-type='memory'" )
.Object |
the Storage object |
world |
the World object |
type |
the Redland storage type |
name |
storage instance name |
options |
storage options |
the Storage object
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'")
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'")
Initialize the World object.
## S4 method for signature 'World' initialize(.Object)
## S4 method for signature 'World' initialize(.Object)
.Object |
the World object |
the World object
The pointer is treated as an externalptr and checked via a call in C to see if it is NULL.
is.null.externalptr(pointer)
is.null.externalptr(pointer)
pointer |
externalptr to be checked for NULL value |
logical TRUE if the pointer is NULL, otherwise FALSE
Return length of a SWIGArray
## S4 method for signature 'SWIGArray' length(x)
## S4 method for signature 'SWIGArray' length(x)
x |
the SWIGArray |
Copyright string (multiple lines).
librdf_copyright_string ( .copy )
librdf_copyright_string ( .copy )
.copy |
NA |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Return the Redland RDF copyright
librdf_copyright_string_get (.copy)
librdf_copyright_string_get (.copy)
.copy |
logical |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Finish the digesting of data.
librdf_digest_final ( digest )
librdf_digest_final ( digest )
digest |
the digest ("_p_librdf_digest_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
(Re)initialise the librdf_digest object.
librdf_digest_init ( digest )
librdf_digest_init ( digest )
digest |
the digest ("_p_librdf_digest_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get a string representation of the digest object.
librdf_digest_to_string ( digest )
librdf_digest_to_string ( digest )
digest |
the digest ("_p_librdf_digest_s") |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Add more data to the librdf_digest object.
librdf_digest_update ( digest, buf, length )
librdf_digest_update ( digest, buf, length )
digest |
the digest ("_p_librdf_digest_s") |
buf |
the data buffer ("character") |
length |
the length of the data ("integer") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Add a string to the librdf_digest object.
librdf_digest_update_string ( digest, string )
librdf_digest_update_string ( digest, string )
digest |
the digest ("_p_librdf_digest_s") |
string |
string to add ("character") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Destructor - destroy a librdf_digest object.
librdf_free_digest ( digest )
librdf_free_digest ( digest )
digest |
the digest ("_p_librdf_digest_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Destructor - destroy a librdf_hash object.
librdf_free_hash ( hash )
librdf_free_hash ( hash )
hash |
hash object ("_p_librdf_hash_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Destructor - destroy a librdf_iterator object.
librdf_free_iterator ( s_arg1 )
librdf_free_iterator ( s_arg1 )
s_arg1 |
the librdf_iterator object ("_p_librdf_iterator_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Destructor - Destroy a librdf_model object.
librdf_free_model ( model )
librdf_free_model ( model )
model |
librdf_model model to destroy ("_p_librdf_model_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Destructor - destroy an librdf_node object.
librdf_free_node ( r )
librdf_free_node ( r )
r |
librdf_node object ("_p_librdf_node_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Destructor - destroys a librdf_parser object.
librdf_free_parser ( parser )
librdf_free_parser ( parser )
parser |
the parser ("_p_librdf_parser_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Destructor - destroy a librdf_query object.
librdf_free_query ( query )
librdf_free_query ( query )
query |
librdf_query object ("_p_librdf_query") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Destructor - destroy a librdf_query_results object.
librdf_free_query_results ( query_results )
librdf_free_query_results ( query_results )
query_results |
librdf_query_results object ("_p_librdf_query_results") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Destructor - destroys a librdf_serializer object.
librdf_free_serializer ( serializer )
librdf_free_serializer ( serializer )
serializer |
the serializer ("_p_librdf_serializer_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Destructor - destroy a librdf_statement.
librdf_free_statement ( statement )
librdf_free_statement ( statement )
statement |
librdf_statement object ("_p_librdf_statement_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Destructor - destroy a librdf_storage object.
librdf_free_storage ( storage )
librdf_free_storage ( storage )
storage |
librdf_storage object ("_p_librdf_storage_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Destructor - destroy an libdf_stream object.
librdf_free_stream ( stream )
librdf_free_stream ( stream )
stream |
librdf_stream object ("_p_librdf_stream_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Destructor - destroy a librdf_uri object.
librdf_free_uri ( uri )
librdf_free_uri ( uri )
uri |
librdf_uri object ("_p_librdf_uri_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Terminate the library and frees all allocated resources.
librdf_free_world ( world )
librdf_free_world ( world )
world |
redland world object ("_p_librdf_world_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Format the hash as a string, suitable for parsing by librdf_hash_from_string.
librdf_hash_to_string ( hash, filter )
librdf_hash_to_string ( hash, filter )
hash |
librdf_hash object ("_p_librdf_hash_s") |
filter |
NULL terminated list of keys to ignore ("_p_p_char") |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
This funciton is for internal testing of the Redland software and is not part of the public API.
librdf_internal_test_error ( world )
librdf_internal_test_error ( world )
world |
librdf_world object ("_p_librdf_world_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
This funciton is for internal testing of the Redland software and is not part of the public API.
librdf_internal_test_warning ( world )
librdf_internal_test_warning ( world )
world |
librdf_world ("_p_librdf_world_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Test if the iterator has finished.
librdf_iterator_end ( iterator, .copy )
librdf_iterator_end ( iterator, .copy )
iterator |
the librdf_iterator object ("_p_librdf_iterator_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the context of the current object on the iterator.
librdf_iterator_get_context ( iterator )
librdf_iterator_get_context ( iterator )
iterator |
the librdf_iterator object ("_p_librdf_iterator_s") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the current object from the iterator.
librdf_iterator_get_object ( iterator )
librdf_iterator_get_object ( iterator )
iterator |
the librdf_iterator object ("_p_librdf_iterator_s") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Move to the next iterator element.
librdf_iterator_next ( iterator, .copy )
librdf_iterator_next ( iterator, .copy )
iterator |
the librdf_iterator object ("_p_librdf_iterator_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Retrieve error code from log message.
librdf_log_message_code ( message, .copy )
librdf_log_message_code ( message, .copy )
message |
log message ("_p_librdf_log_message") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Retrieve facility that generated the message.
librdf_log_message_facility ( message, .copy )
librdf_log_message_facility ( message, .copy )
message |
log message ("_p_librdf_log_message") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Retrieve severity of log message.
librdf_log_message_level ( message, .copy )
librdf_log_message_level ( message, .copy )
message |
log message ("_p_librdf_log_message") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Retrieve locator of log entry.
librdf_log_message_locator ( message )
librdf_log_message_locator ( message )
message |
log message ("_p_librdf_log_message") |
_p_raptor_locator
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Retrieve text message from log entry.
librdf_log_message_message ( message )
librdf_log_message_message ( message )
message |
log message ("_p_librdf_log_message") |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Create and add a new statement about a resource to the model.
librdf_model_add ( model, subject, predicate, object, .copy )
librdf_model_add ( model, subject, predicate, object, .copy )
model |
model object ("_p_librdf_model_s") |
subject |
librdf_node of subject ("_p_librdf_node_s") |
predicate |
librdf_node of predicate ("_p_librdf_node_s") |
object |
librdf_node of object (literal or resource) ("_p_librdf_node_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Add a statement to the model.
librdf_model_add_statement ( model, statement, .copy )
librdf_model_add_statement ( model, statement, .copy )
model |
model object ("_p_librdf_model_s") |
statement |
statement object ("_p_librdf_statement_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Add a stream of statements to the model.
librdf_model_add_statements ( model, statement_stream, .copy )
librdf_model_add_statements ( model, statement_stream, .copy )
model |
model object ("_p_librdf_model_s") |
statement_stream |
stream of statements to use ("_p_librdf_stream_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Create and add a new statement about a literal to the model.
librdf_model_add_string_literal_statement ( model, subject, predicate, literal, inStrOrNull, is_wf_xml, .copy )
librdf_model_add_string_literal_statement ( model, subject, predicate, literal, inStrOrNull, is_wf_xml, .copy )
model |
model object ("_p_librdf_model_s") |
subject |
librdf_node of subject ("_p_librdf_node_s") |
predicate |
librdf_node of predicate ("_p_librdf_node_s") |
literal |
string literal conten ("character") |
inStrOrNull |
language of literal ("character") |
is_wf_xml |
literal is XML ("integer") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Create and add a new statement about a typed literal to the model.
librdf_model_add_typed_literal_statement ( model, subject, predicate, string, inStrOrNull, inUriOrNull, .copy )
librdf_model_add_typed_literal_statement ( model, subject, predicate, string, inStrOrNull, inUriOrNull, .copy )
model |
model object ("_p_librdf_model_s") |
subject |
librdf_node of subject ("_p_librdf_node_s") |
predicate |
librdf_node of predicate ("_p_librdf_node_s") |
string |
string literal content ("character") |
inStrOrNull |
language of literal ("character") |
inUriOrNull |
datatype librdf_uri ("_p_librdf_uri_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
List the model contents as a stream of statements.
librdf_model_as_stream ( model )
librdf_model_as_stream ( model )
model |
the model object ("_p_librdf_model_s") |
_p_librdf_stream_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Check for a context in the model.
librdf_model_contains_context ( model, context, .copy )
librdf_model_contains_context ( model, context, .copy )
model |
the model object ("_p_librdf_model_s") |
context |
the contest ("_p_librdf_node_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Check for a statement in the model.
librdf_model_contains_statement ( model, statement, .copy )
librdf_model_contains_statement ( model, statement, .copy )
model |
the model object ("_p_librdf_model_s") |
statement |
the statement ("_p_librdf_statement_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Add a statement to a model with a context.
librdf_model_context_add_statement ( model, context, statement, .copy )
librdf_model_context_add_statement ( model, context, statement, .copy )
model |
librdf_model object ("_p_librdf_model_s") |
context |
librdf_node context ("_p_librdf_node_s") |
statement |
librdf_statement statement object ("_p_librdf_statement_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Add statements to a model with a context.
librdf_model_context_add_statements ( model, context, stream, .copy )
librdf_model_context_add_statements ( model, context, stream, .copy )
model |
librdf_model object ("_p_librdf_model_s") |
context |
librdf_node context ("_p_librdf_node_s") |
stream |
librdf_stream stream object ("_p_librdf_stream_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
List all statements in a model context.
librdf_model_context_as_stream ( model, context )
librdf_model_context_as_stream ( model, context )
model |
librdf_model object ("_p_librdf_model_s") |
context |
librdf_node context ("_p_librdf_node_s") |
_p_librdf_stream_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Remove a statement from a model in a context.
librdf_model_context_remove_statement ( model, context, statement, .copy )
librdf_model_context_remove_statement ( model, context, statement, .copy )
model |
librdf_model object ("_p_librdf_model_s") |
context |
librdf_node context ("_p_librdf_node_s") |
statement |
librdf_statement statement ("_p_librdf_statement_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Remove statements from a model with the given context.
librdf_model_context_remove_statements ( model, context, .copy )
librdf_model_context_remove_statements ( model, context, .copy )
model |
librdf_model object ("_p_librdf_model_s") |
context |
librdf_node context ("_p_librdf_node_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Find matching statements in the model.
librdf_model_find_statements ( model, statement )
librdf_model_find_statements ( model, statement )
model |
the model object ("_p_librdf_model_s") |
statement |
the partial statement to match ("_p_librdf_statement_s") |
_p_librdf_stream_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Search the model for matching statements in a given context.
librdf_model_find_statements_in_context ( model, statement, inNodeOrNull )
librdf_model_find_statements_in_context ( model, statement, inNodeOrNull )
model |
librdf_model object ("_p_librdf_model_s") |
statement |
librdf_statement partial statement to find ("_p_librdf_statement_s") |
inNodeOrNull |
context librdf_node (or NULL) ("_p_librdf_node_s") |
_p_librdf_stream_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Return one arc (predicate) of an arc in an RDF graph given source (subject) and target (object).
librdf_model_get_arc ( model, source, target )
librdf_model_get_arc ( model, source, target )
model |
librdf_model object ("_p_librdf_model_s") |
source |
librdf_node source ("_p_librdf_node_s") |
target |
librdf_node target ("_p_librdf_node_s") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Return the arcs (predicates) of an arc in an RDF graph given source (subject) and target (object).
librdf_model_get_arcs ( model, source, target )
librdf_model_get_arcs ( model, source, target )
model |
librdf_model object ("_p_librdf_model_s") |
source |
librdf_node source ("_p_librdf_node_s") |
target |
librdf_node target ("_p_librdf_node_s") |
_p_librdf_iterator_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Return the properties pointing to the given resource.
librdf_model_get_arcs_in ( model, node )
librdf_model_get_arcs_in ( model, node )
model |
librdf_model object ("_p_librdf_model_s") |
node |
librdf_node resource node ("_p_librdf_node_s") |
_p_librdf_iterator_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Return the properties pointing from the given resource.
librdf_model_get_arcs_out ( model, node )
librdf_model_get_arcs_out ( model, node )
model |
librdf_model object ("_p_librdf_model_s") |
node |
librdf_node resource node ("_p_librdf_node_s") |
_p_librdf_iterator_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Return the list of contexts in the graph.
librdf_model_get_contexts ( model )
librdf_model_get_contexts ( model )
model |
librdf_model object ("_p_librdf_model_s") |
_p_librdf_iterator_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the value of a graph feature .
librdf_model_get_feature ( model, feature )
librdf_model_get_feature ( model, feature )
model |
librdf_model object ("_p_librdf_model_s") |
feature |
librdf_uri feature property ("_p_librdf_uri_s") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Return one source (subject) of arc in an RDF graph given arc (predicate) and target (object).
librdf_model_get_source ( model, arc, target )
librdf_model_get_source ( model, arc, target )
model |
librdf_model object ("_p_librdf_model_s") |
arc |
librdf_node arc ("_p_librdf_node_s") |
target |
librdf_node target ("_p_librdf_node_s") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Return the sources (subjects) of arc in an RDF graph given arc (predicate) and target (object).
librdf_model_get_sources ( model, arc, target )
librdf_model_get_sources ( model, arc, target )
model |
librdf_model object ("_p_librdf_model_s") |
arc |
librdf_node arc ("_p_librdf_node_s") |
target |
librdf_node target ("_p_librdf_node_s") |
_p_librdf_iterator_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Return one target (object) of an arc in an RDF graph given source (subject) and arc (predicate).
librdf_model_get_target ( model, source, arc )
librdf_model_get_target ( model, source, arc )
model |
librdf_model object ("_p_librdf_model_s") |
source |
librdf_node source ("_p_librdf_node_s") |
arc |
librdf_node arc ("_p_librdf_node_s") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Return the targets (objects) of an arc in an RDF graph given source (subject) and arc (predicate).
librdf_model_get_targets ( model, source, arc )
librdf_model_get_targets ( model, source, arc )
model |
librdf_model object ("_p_librdf_model_s") |
source |
librdf_node source ("_p_librdf_node_s") |
arc |
librdf_node arc ("_p_librdf_node_s") |
_p_librdf_iterator_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Check if a node has a given property pointing to it.
librdf_model_has_arc_in ( model, node, property, .copy )
librdf_model_has_arc_in ( model, node, property, .copy )
model |
librdf_model object ("_p_librdf_model_s") |
node |
librdf_node resource node ("_p_librdf_node_s") |
property |
librdf_node property node ("_p_librdf_node_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Check if a node has a given property pointing from it.
librdf_model_has_arc_out ( model, node, property, .copy )
librdf_model_has_arc_out ( model, node, property, .copy )
model |
librdf_model object ("_p_librdf_model_s") |
node |
librdf_node resource node ("_p_librdf_node_s") |
property |
librdf_node property node ("_p_librdf_node_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Load content from a URI into the model.
librdf_model_load ( model, uri, name, mime_type, type_uri, .copy )
librdf_model_load ( model, uri, name, mime_type, type_uri, .copy )
model |
librdf_model object ("_p_librdf_model_s") |
uri |
the URI to read the content ("_p_librdf_uri_s") |
name |
the name of the parser (or NULL) ("character") |
mime_type |
the MIME type of the syntax (NULL if not used) ("character") |
type_uri |
URI identifying the syntax (NULL if not used) ("_p_librdf_uri_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Execute a query against the model.
librdf_model_query_execute ( model, query )
librdf_model_query_execute ( model, query )
model |
librdf_model object ("_p_librdf_model_s") |
query |
librdf_query object ("_p_librdf_query") |
_p_librdf_query_results
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Remove a known statement from the model.
librdf_model_remove_statement ( model, statement, .copy )
librdf_model_remove_statement ( model, statement, .copy )
model |
the model object ("_p_librdf_model_s") |
statement |
the statement ("_p_librdf_statement_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Set the value of a graph feature.
librdf_model_set_feature ( model, feature, value, .copy )
librdf_model_set_feature ( model, feature, value, .copy )
model |
librdf_model object ("_p_librdf_model_s") |
feature |
librdf_uri feature property ("_p_librdf_uri_s") |
value |
librdf_node feature property value ("_p_librdf_node_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the number of statements in the model.
librdf_model_size ( model, .copy )
librdf_model_size ( model, .copy )
model |
librdf_model object ("_p_librdf_model_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Synchronise the model to the model implementation.
librdf_model_sync ( model )
librdf_model_sync ( model )
model |
librdf_model object ("_p_librdf_model_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Write serialized model to a string.
librdf_model_to_string ( model, uri, name, mime_type, inUriOrNull )
librdf_model_to_string ( model, uri, name, mime_type, inUriOrNull )
model |
librdf_model object ("_p_librdf_model_s") |
uri |
base URI to use in serializing (or NULL if not used) ("_p_librdf_uri_s") |
name |
the name of the serializer (or NULL for default) ("character") |
mime_type |
the MIME type of the syntax (NULL if not used) ("character") |
inUriOrNull |
URI identifying the syntax (NULL if not used) ("_p_librdf_uri_s") |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Commit a transaction.
librdf_model_transaction_commit ( model, .copy )
librdf_model_transaction_commit ( model, .copy )
model |
the model object ("_p_librdf_model_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Rollback a transaction.
librdf_model_transaction_rollback ( model, .copy )
librdf_model_transaction_rollback ( model, .copy )
model |
the model object ("_p_librdf_model_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Start a transaction
librdf_model_transaction_start ( model, .copy )
librdf_model_transaction_start ( model, .copy )
model |
the model object ("_p_librdf_model_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new librdf_digest object.
librdf_new_digest ( world, name )
librdf_new_digest ( world, name )
world |
redland world object ("_p_librdf_world_s") |
name |
the digest name to use to create this digest ("character") |
_p_librdf_digest_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new librdf_hash object.
librdf_new_hash ( world, name )
librdf_new_hash ( world, name )
world |
redland world object ("_p_librdf_world_s") |
name |
factory name ("character") |
_p_librdf_hash_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new librdf_hash object from an array of strings.
librdf_new_hash_from_array_of_strings ( world, name, string )
librdf_new_hash_from_array_of_strings ( world, name, string )
world |
redland world object ("_p_librdf_world_s") |
name |
hash name ("character") |
string |
address of the start of the array of char* pointers ("character") |
_p_librdf_hash_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new librdf_hash object from a string.
librdf_new_hash_from_string ( world, name, string )
librdf_new_hash_from_string ( world, name, string )
world |
redland world object ("_p_librdf_world_s") |
name |
hash name ("character") |
string |
hash encoded as a string ("character") |
_p_librdf_hash_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new storage librdf_model object.
librdf_new_model ( world, storage, options_string )
librdf_new_model ( world, storage, options_string )
world |
redland world object ("_p_librdf_world_s") |
storage |
librdf_storage to use ("_p_librdf_storage_s") |
options_string |
options to initialise model ("character") |
_p_librdf_model_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Copy constructor - create a new librdf_model from an existing one.
librdf_new_model_from_model ( model )
librdf_new_model_from_model ( model )
model |
the existing librdf_model ("_p_librdf_model_s") |
_p_librdf_model_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - Create a new librdf_model with storage.
librdf_new_model_with_options ( world, storage, options )
librdf_new_model_with_options ( world, storage, options )
world |
redland world object ("_p_librdf_world_s") |
storage |
librdf_storage storage to use ("_p_librdf_storage_s") |
options |
librdf_hash of options to use ("_p_librdf_hash_s") |
_p_librdf_model_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new librdf_node object with a private identifier.
librdf_new_node ( world )
librdf_new_node ( world )
world |
redland world object ("_p_librdf_world_s") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new blank node librdf_node object from a blank node identifier.
librdf_new_node_from_blank_identifier ( world, inStrOrNull )
librdf_new_node_from_blank_identifier ( world, inStrOrNull )
world |
redland world object ("_p_librdf_world_s") |
inStrOrNull |
UTF-8 encoded blank node identifier or NULL ("character") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new literal librdf_node object.
librdf_new_node_from_literal ( world, string, inStrOrNull, is_wf_xml )
librdf_new_node_from_literal ( world, string, inStrOrNull, is_wf_xml )
world |
redland world object ("_p_librdf_world_s") |
string |
literal UTF-8 encoded string value ("character") |
inStrOrNull |
literal XML language (or NULL, empty string) ("character") |
is_wf_xml |
non 0 if literal is XML ("integer") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Copy constructor - create a new librdf_node object from an existing librdf_node object.
librdf_new_node_from_node ( node )
librdf_new_node_from_node ( node )
node |
librdf_node object to copy ("_p_librdf_node_s") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new librdf_node object from a UTF-8 encoded URI string normalised to a new base URI.
librdf_new_node_from_normalised_uri_string ( world, uri_string, source_uri, base_uri )
librdf_new_node_from_normalised_uri_string ( world, uri_string, source_uri, base_uri )
world |
redland world object ("_p_librdf_world_s") |
uri_string |
UTF-8 encoded string representing a URI ("character") |
source_uri |
source URI ("_p_librdf_uri_s") |
base_uri |
base URI ("_p_librdf_uri_s") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new typed literal librdf_node object.
librdf_new_node_from_typed_literal ( world, string, inStrOrNull, inUriOrNull )
librdf_new_node_from_typed_literal ( world, string, inStrOrNull, inUriOrNull )
world |
redland world object ("_p_librdf_world_s") |
string |
literal UTF-8 encoded string value ("character") |
inStrOrNull |
literal XML language (or NULL, empty string) ("character") |
inUriOrNull |
URI of typed literal datatype or NULL ("_p_librdf_uri_s") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new resource librdf_node object with a given URI.
librdf_new_node_from_uri ( world, uri )
librdf_new_node_from_uri ( world, uri )
world |
redland world object ("_p_librdf_world_s") |
uri |
librdf_uri object ("_p_librdf_uri_s") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new resource librdf_node object with a given URI and local name.
librdf_new_node_from_uri_local_name ( world, uri, local_name )
librdf_new_node_from_uri_local_name ( world, uri, local_name )
world |
redland world object ("_p_librdf_world_s") |
uri |
librdf_uri object ("_p_librdf_uri_s") |
local_name |
local name to append to URI ("character") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new librdf_node object from a URI string.
librdf_new_node_from_uri_string ( world, string )
librdf_new_node_from_uri_string ( world, string )
world |
redland world object ("_p_librdf_world_s") |
string |
string representing a URI ("character") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new librdf_parser object.
librdf_new_parser ( world, name, mime_type, type_uri )
librdf_new_parser ( world, name, mime_type, type_uri )
world |
redland world object ("_p_librdf_world_s") |
name |
the parser factory name (or NULL or empty string if don't care) ("character") |
mime_type |
the MIME type of the syntax (NULL if not used) ("character") |
type_uri |
URI of syntax (NULL if not used) ("_p_librdf_uri_s") |
_p_librdf_parser_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new librdf_query object.
librdf_new_query ( world, name, uri, query_string, base_uri )
librdf_new_query ( world, name, uri, query_string, base_uri )
world |
redland world object ("_p_librdf_world_s") |
name |
the name identifying the query language ("character") |
uri |
the URI identifying the query language (or NULL) ("_p_librdf_uri_s") |
query_string |
the query string ("character") |
base_uri |
the base URI of the query string (or NULL) ("_p_librdf_uri_s") |
_p_librdf_query
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Copy constructor - create a new librdf_query object from an existing one
librdf_new_query_from_query ( old_query )
librdf_new_query_from_query ( old_query )
old_query |
the existing query librdf_query to use ("_p_librdf_query") |
_p_librdf_query
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new librdf_serializer object.
librdf_new_serializer ( world, name, mime_type, type_uri )
librdf_new_serializer ( world, name, mime_type, type_uri )
world |
redland world object ("_p_librdf_world_s") |
name |
the serializer factory name (or NULL or empty string if don't care) ("character") |
mime_type |
the MIME type of the syntax (NULL if not used) ("character") |
type_uri |
URI of syntax (NULL if not used) ("_p_librdf_uri_s") |
_p_librdf_serializer_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new empty librdf_statement.
librdf_new_statement ( world )
librdf_new_statement ( world )
world |
redland world object ("_p_librdf_world_s") |
_p_librdf_statement_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new librdf_statement from existing librdf_node objects.
librdf_new_statement_from_nodes ( world, subject, predicate, object )
librdf_new_statement_from_nodes ( world, subject, predicate, object )
world |
redland world object ("_p_librdf_world_s") |
subject |
librdf_node ("_p_librdf_node_s") |
predicate |
librdf_node ("_p_librdf_node_s") |
object |
librdf_node ("_p_librdf_node_s") |
_p_librdf_statement_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Copy constructor - create a new librdf_statement from an existing librdf_statement. Creates a deep copy - changes to original statement nodes are not reflected in the copy.
librdf_new_statement_from_statement ( statement )
librdf_new_statement_from_statement ( statement )
statement |
librdf_statement to copy ("_p_librdf_statement_s") |
_p_librdf_statement_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new librdf_storage object.
librdf_new_storage ( world, storage_name, name, options_string )
librdf_new_storage ( world, storage_name, name, options_string )
world |
redland world object ("_p_librdf_world_s") |
storage_name |
the storage factory name ("character") |
name |
an identifier for the storage ("character") |
options_string |
options to initialise storage ("character") |
_p_librdf_storage_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Copy constructor - create a new librdf_storage object from an existing one
librdf_new_storage_from_storage ( old_storage )
librdf_new_storage_from_storage ( old_storage )
old_storage |
the existing storage librdf_storage to use ("_p_librdf_storage_s") |
_p_librdf_storage_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new librdf_uri object from a URI string.
librdf_new_uri ( world, string )
librdf_new_uri ( world, string )
world |
redland world object ("_p_librdf_world_s") |
string |
URI in string form ("character") |
_p_librdf_uri_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Constructor - create a new librdf_uri object from a filename.
librdf_new_uri_from_filename ( world, filename )
librdf_new_uri_from_filename ( world, filename )
world |
Redland librdf_world object ("_p_librdf_world_s") |
filename |
filename ("character") |
_p_librdf_uri_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Copy constructor - create a new librdf_uri object from an existing librdf_uri object.
librdf_new_uri_from_uri ( uri )
librdf_new_uri_from_uri ( uri )
uri |
librdf_uri object ("_p_librdf_uri_s") |
_p_librdf_uri_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Create a new Redland execution environment.
librdf_new_world ( )
librdf_new_world ( )
_p_librdf_world_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Compare two librdf_node objects for equality.
librdf_node_equals ( first_node, second_node, .copy )
librdf_node_equals ( first_node, second_node, .copy )
first_node |
first librdf_node node ("_p_librdf_node_s") |
second_node |
second librdf_node node ("_p_librdf_node_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the blank node identifier as a UTF-8 encoded string.
librdf_node_get_blank_identifier ( node )
librdf_node_get_blank_identifier ( node )
node |
the node object ("_p_librdf_node_s") |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the node li object ordinal value.
librdf_node_get_li_ordinal ( node, .copy )
librdf_node_get_li_ordinal ( node, .copy )
node |
the node object ("_p_librdf_node_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the literal value of the node as a UTF-8 encoded string.
librdf_node_get_literal_value ( node )
librdf_node_get_literal_value ( node )
node |
the node object ("_p_librdf_node_s") |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the string literal value of the node as ISO Latin-1.
librdf_node_get_literal_value_as_latin1 ( node )
librdf_node_get_literal_value_as_latin1 ( node )
node |
the node object ("_p_librdf_node_s") |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the typed literal datatype URI of the literal node.
librdf_node_get_literal_value_datatype_uri ( node )
librdf_node_get_literal_value_datatype_uri ( node )
node |
the node object ("_p_librdf_node_s") |
_p_librdf_uri_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the XML well-formness property of the node.
librdf_node_get_literal_value_is_wf_xml ( node, .copy )
librdf_node_get_literal_value_is_wf_xml ( node, .copy )
node |
the node object ("_p_librdf_node_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the XML language of the node.
librdf_node_get_literal_value_language ( node )
librdf_node_get_literal_value_language ( node )
node |
the node object ("_p_librdf_node_s") |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the type of the node.
librdf_node_get_type ( node, .copy )
librdf_node_get_type ( node, .copy )
node |
the node object ("_p_librdf_node_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the URI for a node object.
librdf_node_get_uri ( node )
librdf_node_get_uri ( node )
node |
the node object ("_p_librdf_node_s") |
_p_librdf_uri_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Check node is a blank nodeID.
librdf_node_is_blank ( node, .copy )
librdf_node_is_blank ( node, .copy )
node |
the node object ("_p_librdf_node_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Check node is a literal.
librdf_node_is_literal ( node, .copy )
librdf_node_is_literal ( node, .copy )
node |
the node object ("_p_librdf_node_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Check node is a resource.
librdf_node_is_resource ( node, .copy )
librdf_node_is_resource ( node, .copy )
node |
the node object ("_p_librdf_node_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Check if a parser name is known
librdf_parser_check_name ( world, name, .copy )
librdf_parser_check_name ( world, name, .copy )
world |
redland world object ("_p_librdf_world_s") |
name |
name of parser ("character") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get an HTTP Accept value for the parser.
librdf_parser_get_accept_header ( parser )
librdf_parser_get_accept_header ( parser )
parser |
parser ("_p_librdf_parser_s") |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the value of a parser feature.
librdf_parser_get_feature ( parser, feature )
librdf_parser_get_feature ( parser, feature )
parser |
librdf_parser object ("_p_librdf_parser_s") |
feature |
librdf_Uuri feature property ("_p_librdf_uri_s") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the number of namespaces seen during parsing
librdf_parser_get_namespaces_seen_count ( parser, .copy )
librdf_parser_get_namespaces_seen_count ( parser, .copy )
parser |
librdf_parser object ("_p_librdf_parser_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the prefix of namespaces seen during parsing
librdf_parser_get_namespaces_seen_prefix ( parser, offset )
librdf_parser_get_namespaces_seen_prefix ( parser, offset )
parser |
librdf_parser object ("_p_librdf_parser_s") |
offset |
index into list of namespaces ("integer") |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the uri of namespaces seen during parsing
librdf_parser_get_namespaces_seen_uri ( parser, offset )
librdf_parser_get_namespaces_seen_uri ( parser, offset )
parser |
librdf_parser object ("_p_librdf_parser_s") |
offset |
index into list of namespaces ("integer") |
_p_librdf_uri_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get a parser name for content with type or identifier
librdf_parser_guess_name2 ( world, mime_type, buffer, identifier )
librdf_parser_guess_name2 ( world, mime_type, buffer, identifier )
world |
librdf_world object ("_p_librdf_world_s") |
mime_type |
MIME type of syntax or NULL ("character") |
buffer |
content buffer or NULL ("character") |
identifier |
content identifier or NULL ("character") |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Parse a URI to a librdf_stream of statements.
librdf_parser_parse_as_stream ( parser, uri, inUriorNull )
librdf_parser_parse_as_stream ( parser, uri, inUriorNull )
parser |
the parser ("_p_librdf_parser_s") |
uri |
the URI to read ("_p_librdf_uri_s") |
inUriorNull |
the base URI to use or NULL ("_p_librdf_uri_s") |
_p_librdf_stream_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Parse a counted string of content to a librdf_stream of statements.
librdf_parser_parse_counted_string_as_stream ( parser, string, length, base_uri )
librdf_parser_parse_counted_string_as_stream ( parser, string, length, base_uri )
parser |
the parser ("_p_librdf_parser_s") |
string |
the string to parse ("character") |
length |
length of the string content (must be >0) ("integer") |
base_uri |
the base URI to use or NULL ("_p_librdf_uri_s") |
_p_librdf_stream_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Parse a counted string of content into an librdf_model.
librdf_parser_parse_counted_string_into_model ( parser, string, length, base_uri, model, .copy )
librdf_parser_parse_counted_string_into_model ( parser, string, length, base_uri, model, .copy )
parser |
the parser ("_p_librdf_parser_s") |
string |
the content to parse ("character") |
length |
length of content (must be >0) ("integer") |
base_uri |
the base URI to use or NULL ("_p_librdf_uri_s") |
model |
the model to use ("_p_librdf_model_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Parse a URI of content into an librdf_model.
librdf_parser_parse_into_model ( parser, uri, inUriOrNull, model, .copy )
librdf_parser_parse_into_model ( parser, uri, inUriOrNull, model, .copy )
parser |
the parser ("_p_librdf_parser_s") |
uri |
the URI to read the content ("_p_librdf_uri_s") |
inUriOrNull |
the base URI to use or NULL ("_p_librdf_uri_s") |
model |
the model to use ("_p_librdf_model_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Parse a string of content to a librdf_stream of statements.
librdf_parser_parse_string_as_stream ( parser, string, base_uri )
librdf_parser_parse_string_as_stream ( parser, string, base_uri )
parser |
the parser ("_p_librdf_parser_s") |
string |
the string to parse ("character") |
base_uri |
the base URI to use or NULL ("_p_librdf_uri_s") |
_p_librdf_stream_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Parse a string of content into an librdf_model.
librdf_parser_parse_string_into_model ( parser, string, base_uri, model, .copy )
librdf_parser_parse_string_into_model ( parser, string, base_uri, model, .copy )
parser |
the parser ("_p_librdf_parser_s") |
string |
the content to parse ("character") |
base_uri |
the base URI to use or NULL ("_p_librdf_uri_s") |
model |
the model to use ("_p_librdf_model_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Set the value of a parser feature.
librdf_parser_set_feature ( parser, feature, value, .copy )
librdf_parser_set_feature ( parser, feature, value, .copy )
parser |
librdf_parser object ("_p_librdf_parser_s") |
feature |
librdf_uri feature property ("_p_librdf_uri_s") |
value |
librdf_node feature property value ("_p_librdf_node_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Run the query on a model.
librdf_query_execute ( query, model )
librdf_query_execute ( query, model )
query |
librdf_query object ("_p_librdf_query") |
model |
model to operate query on ("_p_librdf_model_s") |
_p_librdf_query_results
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the query-specified limit on results.
librdf_query_get_limit ( query, .copy )
librdf_query_get_limit ( query, .copy )
query |
librdf_query query object ("_p_librdf_query") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the query-specified offset on results.
librdf_query_get_offset ( query, .copy )
librdf_query_get_offset ( query, .copy )
query |
librdf_query query object ("_p_librdf_query") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get a query result as an RDF graph in librdf_stream form
librdf_query_results_as_stream ( query_results )
librdf_query_results_as_stream ( query_results )
query_results |
librdf_query_results query_results ("_p_librdf_query_results") |
_p_librdf_stream_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Find out if binding results are exhausted.
librdf_query_results_finished ( query_results, .copy )
librdf_query_results_finished ( query_results, .copy )
query_results |
librdf_query_results query results ("_p_librdf_query_results") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get binding name for the current result.
librdf_query_results_get_binding_name ( query_results, offset )
librdf_query_results_get_binding_name ( query_results, offset )
query_results |
librdf_query_results query results ("_p_librdf_query_results") |
offset |
offset of binding name into array of known names ("integer") |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get one binding value for the current result.
librdf_query_results_get_binding_value ( query_results, offset )
librdf_query_results_get_binding_value ( query_results, offset )
query_results |
librdf_query_results query results ("_p_librdf_query_results") |
offset |
offset of binding name into array of known names ("integer") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get one binding value for a given name in the current result.
librdf_query_results_get_binding_value_by_name ( query_results, name )
librdf_query_results_get_binding_value_by_name ( query_results, name )
query_results |
librdf_query_results query results ("_p_librdf_query_results") |
name |
variable name ("character") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the number of bound variables in the result.
librdf_query_results_get_bindings_count ( query_results, .copy )
librdf_query_results_get_bindings_count ( query_results, .copy )
query_results |
librdf_query_results query results ("_p_librdf_query_results") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get boolean query result.
librdf_query_results_get_boolean ( query_results, .copy )
librdf_query_results_get_boolean ( query_results, .copy )
query_results |
librdf_query_results query_results ("_p_librdf_query_results") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get number of bindings so far.
librdf_query_results_get_count ( query_results, .copy )
librdf_query_results_get_count ( query_results, .copy )
query_results |
librdf_query_results query results ("_p_librdf_query_results") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Test if librdf_query_results is variable bindings format.
librdf_query_results_is_bindings ( query_results, .copy )
librdf_query_results_is_bindings ( query_results, .copy )
query_results |
librdf_query_results object ("_p_librdf_query_results") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Test if librdf_query_results is boolean format.
librdf_query_results_is_boolean ( query_results, .copy )
librdf_query_results_is_boolean ( query_results, .copy )
query_results |
librdf_query_results object ("_p_librdf_query_results") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Test if librdf_query_results is RDF graph format.
librdf_query_results_is_graph ( query_results, .copy )
librdf_query_results_is_graph ( query_results, .copy )
query_results |
librdf_query_results object ("_p_librdf_query_results") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Test if librdf_query_results is a syntax.
librdf_query_results_is_syntax ( query_results, .copy )
librdf_query_results_is_syntax ( query_results, .copy )
query_results |
librdf_query_results object ("_p_librdf_query_results") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Move to the next result.
librdf_query_results_next ( query_results, .copy )
librdf_query_results_next ( query_results, .copy )
query_results |
librdf_query_results query results ("_p_librdf_query_results") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Write a query results to a file.
librdf_query_results_to_file2 ( query_results, name, mime_type, format_uri, base_uri, .copy )
librdf_query_results_to_file2 ( query_results, name, mime_type, format_uri, base_uri, .copy )
query_results |
librdf_query_results object ("_p_librdf_query_results") |
name |
filename to write to ("character") |
mime_type |
mime type (or NULL) ("character") |
format_uri |
URI of syntax to format to (or NULL) ("_p_librdf_uri_s") |
base_uri |
Base URI of output formatted syntax (or NULL) ("_p_librdf_uri_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Turn a query results into a string.
librdf_query_results_to_string2 ( query_results, name, mime_type, format_uri, base_uri )
librdf_query_results_to_string2 ( query_results, name, mime_type, format_uri, base_uri )
query_results |
librdf_query_results object ("_p_librdf_query_results") |
name |
format name ("character") |
mime_type |
format mime type (or NULL) ("character") |
format_uri |
URI of syntax to format to (or NULL) ("_p_librdf_uri_s") |
base_uri |
Base URI of output formatted syntax (or NULL) ("_p_librdf_uri_s") |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Set the query-specified limit on results.
librdf_query_set_limit ( query, limit, .copy )
librdf_query_set_limit ( query, limit, .copy )
query |
librdf_query query object ("_p_librdf_query") |
limit |
the limit on results, >=0 to set a limit, <0 to have no limit ("integer") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Set the query-specified offset on results.
librdf_query_set_offset ( query, offset, .copy )
librdf_query_set_offset ( query, offset, .copy )
query |
librdf_query query object ("_p_librdf_query") |
offset |
offset for results, >=0 to set an offset, <0 to have no offset ("integer") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Check if a serializer name is known
librdf_serializer_check_name ( world, name, .copy )
librdf_serializer_check_name ( world, name, .copy )
world |
redland world object ("_p_librdf_world_s") |
name |
name of serializer ("character") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the value of a serializer feature.
librdf_serializer_get_feature ( serializer, feature )
librdf_serializer_get_feature ( serializer, feature )
serializer |
serializer object ("_p_librdf_serializer_s") |
feature |
URI of feature ("_p_librdf_uri_s") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Write a serialized librdf_model to a file.
librdf_serializer_serialize_model_to_file ( serializer, name, inUriOrNull, model, .copy )
librdf_serializer_serialize_model_to_file ( serializer, name, inUriOrNull, model, .copy )
serializer |
the serializer ("_p_librdf_serializer_s") |
name |
filename to serialize to ("character") |
inUriOrNull |
the base URI to use (or NULL) ("_p_librdf_uri_s") |
model |
the librdf_model model to use ("_p_librdf_model_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Write a serialized librdf_model to a string. The returned string must be freed by the caller using librdf_free_memory().
librdf_serializer_serialize_model_to_string ( serializer, inUriOrNull, model )
librdf_serializer_serialize_model_to_string ( serializer, inUriOrNull, model )
serializer |
the serializer ("_p_librdf_serializer_s") |
inUriOrNull |
the base URI to use (or NULL) ("_p_librdf_uri_s") |
model |
the librdf_model model to use ("_p_librdf_model_s") |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Write a librdf_stream to a file.
librdf_serializer_serialize_stream_to_file ( serializer, name, base_uri, stream, .copy )
librdf_serializer_serialize_stream_to_file ( serializer, name, base_uri, stream, .copy )
serializer |
the serializer ("_p_librdf_serializer_s") |
name |
filename to serialize to ("character") |
base_uri |
the base URI to use (or NULL) ("_p_librdf_uri_s") |
stream |
the librdf_stream stream to use ("_p_librdf_stream_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Write a librdf_stream to a string.
librdf_serializer_serialize_stream_to_string ( serializer, base_uri, stream )
librdf_serializer_serialize_stream_to_string ( serializer, base_uri, stream )
serializer |
the serializer ("_p_librdf_serializer_s") |
base_uri |
the base URI to use (or NULL) ("_p_librdf_uri_s") |
stream |
the librdf_stream stream to use ("_p_librdf_stream_s") |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Set the value of a serializer feature.
librdf_serializer_set_feature ( serializer, feature, value, .copy )
librdf_serializer_set_feature ( serializer, feature, value, .copy )
serializer |
serializer object ("_p_librdf_serializer_s") |
feature |
URI of feature ("_p_librdf_uri_s") |
value |
value to set ("_p_librdf_node_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Set a namespace URI/prefix mapping.
librdf_serializer_set_namespace ( serializer, nspace, prefix, .copy )
librdf_serializer_set_namespace ( serializer, nspace, prefix, .copy )
serializer |
serializer object ("_p_librdf_serializer_s") |
nspace |
URI of namespace or NULL ("_p_librdf_uri_s") |
prefix |
prefix to use or NULL ("character") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Short copyright string (one line).
librdf_short_copyright_string ( .copy )
librdf_short_copyright_string ( .copy )
.copy |
NA |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Return Redland librdf copyright string
librdf_short_copyright_string_get( .copy )
librdf_short_copyright_string_get( .copy )
.copy |
logical |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Check if two statements are equal.
librdf_statement_equals ( statement1, statement2, .copy )
librdf_statement_equals ( statement1, statement2, .copy )
statement1 |
first librdf_statement ("_p_librdf_statement_s") |
statement2 |
second librdf_statement ("_p_librdf_statement_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the statement object.
librdf_statement_get_object ( statement )
librdf_statement_get_object ( statement )
statement |
librdf_statement object ("_p_librdf_statement_s") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the statement predicate.
librdf_statement_get_predicate ( statement )
librdf_statement_get_predicate ( statement )
statement |
librdf_statement object ("_p_librdf_statement_s") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the statement subject.
librdf_statement_get_subject ( statement )
librdf_statement_get_subject ( statement )
statement |
librdf_statement object ("_p_librdf_statement_s") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Check if statement is a complete and legal RDF triple.
librdf_statement_is_complete ( statement, .copy )
librdf_statement_is_complete ( statement, .copy )
statement |
librdf_statement object ("_p_librdf_statement_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Match a statement against a 'partial' statement.
librdf_statement_match ( statement, partial_statement, .copy )
librdf_statement_match ( statement, partial_statement, .copy )
statement |
statement ("_p_librdf_statement_s") |
partial_statement |
statement with possible empty parts ("_p_librdf_statement_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Set the statement object.
librdf_statement_set_object ( statement, object )
librdf_statement_set_object ( statement, object )
statement |
librdf_statement object ("_p_librdf_statement_s") |
object |
librdf_node of object ("_p_librdf_node_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Set the statement predicate.
librdf_statement_set_predicate ( statement, predicate )
librdf_statement_set_predicate ( statement, predicate )
statement |
librdf_statement object ("_p_librdf_statement_s") |
predicate |
librdf_node of predicate ("_p_librdf_node_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Set the statement subject.
librdf_statement_set_subject ( statement, subject )
librdf_statement_set_subject ( statement, subject )
statement |
librdf_statement object ("_p_librdf_statement_s") |
subject |
librdf_node of subject ("_p_librdf_node_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Test if the stream has ended.
librdf_stream_end ( stream, .copy )
librdf_stream_end ( stream, .copy )
stream |
librdf_stream object ("_p_librdf_stream_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the current librdf_statement in the stream.
librdf_stream_get_object ( stream )
librdf_stream_get_object ( stream )
stream |
librdf_stream object ("_p_librdf_stream_s") |
_p_librdf_statement_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Move to the next librdf_statement in the stream.
librdf_stream_next ( stream, .copy )
librdf_stream_next ( stream, .copy )
stream |
librdf_stream object ("_p_librdf_stream_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Compare two librdf_uri objects lexicographically.
librdf_uri_compare ( first_uri, second_uri, .copy )
librdf_uri_compare ( first_uri, second_uri, .copy )
first_uri |
librdf_uri object 1 or NULL ("_p_librdf_uri_s") |
second_uri |
librdf_uri object 2 or NULL ("_p_librdf_uri_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Compare two librdf_uri objects for equality.
librdf_uri_equals ( first_uri, second_uri, .copy )
librdf_uri_equals ( first_uri, second_uri, .copy )
first_uri |
librdf_uri object 1 ("_p_librdf_uri_s") |
second_uri |
librdf_uri object 2 ("_p_librdf_uri_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Format the URI as a string.
librdf_uri_to_string ( uri )
librdf_uri_to_string ( uri )
uri |
librdf_uri object ("_p_librdf_uri_s") |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Library full version as a decimal integer.
librdf_version_decimal ( .copy )
librdf_version_decimal ( .copy )
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Return Redland librdf copyright
librdf_version_decimal_get ( .copy )
librdf_version_decimal_get ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Library major version number as a decimal integer.
librdf_version_major ( .copy )
librdf_version_major ( .copy )
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Return the Redland librdf major version number
librdf_version_major_get ( .copy )
librdf_version_major_get ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Library minor version number as a decimal integer.
librdf_version_minor ( .copy )
librdf_version_minor ( .copy )
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Return the Redland librdf minor version number
librdf_version_minor_get ( .copy )
librdf_version_minor_get ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Library release version number as a decimal integer.
librdf_version_release ( .copy )
librdf_version_release ( .copy )
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Return the Redland librdf release version number
librdf_version_release_get ( .copy )
librdf_version_release_get ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Library full version as a string.
librdf_version_string ( .copy )
librdf_version_string ( .copy )
.copy |
NA |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Return the Redland librdf version as a string.
librdf_version_string_get ( .copy )
librdf_version_string_get ( .copy )
.copy |
logical |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the value of a world feature.
librdf_world_get_feature ( world, feature )
librdf_world_get_feature ( world, feature )
world |
librdf_world object ("_p_librdf_world_s") |
feature |
librdf_uri feature property ("_p_librdf_uri_s") |
_p_librdf_node_s
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Open a created redland world environment.
librdf_world_open ( world )
librdf_world_open ( world )
world |
redland world object ("_p_librdf_world_s") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Set the value of a world feature.
librdf_world_set_feature ( world, feature, value, .copy )
librdf_world_set_feature ( world, feature, value, .copy )
world |
librdf_world object ("_p_librdf_world_s") |
feature |
librdf_uri feature property ("_p_librdf_uri_s") |
value |
librdf_node feature property value ("_p_librdf_node_s") |
.copy |
NA |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Set the world log handling function.
librdf_world_set_logger ( world, user_data, log_handler )
librdf_world_set_logger ( world, user_data, log_handler )
world |
redland world object ("_p_librdf_world_s") |
user_data |
user data to pass to function ("_p_void") |
log_handler |
pointer to the function ("_p_librdf_log_func") |
void
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
The redland package uses the SWIG (Simplified Wrapper and Interface Generator) to create the bindings between the Redland RDF C/C++ libraries and R. SWIG creates a NAMESPACE file that contains the function names for the librdf wrapper that it creates, but as of swig 3.0.2 this NAMESPACE file is incorrect and will also be overwritten by Roxygen when 'roxygenize()' or 'devtools:document()' is called, as the wrapper R code doesn't contain Roxygen export annotations used by Roxygen to build the namespace file. To allow for building a NAMESPACE file from all programs in the redland package, this roclet determines the set of wrapper R functions and adds these to the Roxygen generated NAMESPACE file that contains all names from the native R code in the redland package.
mergeNamespace_roclet(x, ...)
mergeNamespace_roclet(x, ...)
x |
a roclet |
... |
additional parameters |
The following line must be present in the DESCRIPTION file for this roclet to be called automatically when 'roxygen2::roxygenize()' or 'devtools::document()' is called:
Roxygen: list(roclets = c("collate", "rd", "namespace", "mergeNamespace_roclet"))
The 'namespace' roclet must always run before the 'mergeNamespace' roclet.
## Not run: roxygen2::roxygenize() devtools::document() ## End(Not run)
## Not run: roxygen2::roxygenize() devtools::document() ## End(Not run)
A Model object is used to store the statements (triples) of an RDF model.
A Model may be created manually by creating Statement
and adding
them to the Model using addStatement
, or a Model may be read in from a
previously saved file using parseFileIntoModel
. Once a Model is created,
it can be queried using Query
.
librdf_model
A redland model object
Model-initialize
: Initialize a Model object
addStatement
: Add a Statement object to the Model
freeModel
: Free memory used by a librdf model object
View examples of creating models by viewing the 'redland_overview'
vignette: 'vignette("redland_overview")'
redland
: redland package
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="")
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="")
A Node represents a RDF Resource, Property, Literal or an RDF blank Node.
librdf_node
A redland node object
Node-initialize
: Initialize a Node object.
getNodeType
: Determine the node type and return as a string.
getNodeValue
: Determine the node type and return as a string.
getBlankNodeId
: Get the value of the node as a string.
redland
: redland package
world <- new("World") # a blank node is created with a unique identifier generated by librdf node <- new("Node", world) # a blank node is created with a unique identifier generated by librdf node <- new("Node", world, blank=NULL) # a blank node is created with the user specified identifier, i.e. "_:id1" node <- new("Node", world, blank="someid") # a node type of 'literal' is created node <- new("Node", world, literal="A Node Value") # a Node type of 'resource' is created node <- new("Node", world, uri="http://www.example.com") # Create a literal node, specifying a language encoding node <- new("Node", world, literal="Gérard de La Martinière", language="fr")
world <- new("World") # a blank node is created with a unique identifier generated by librdf node <- new("Node", world) # a blank node is created with a unique identifier generated by librdf node <- new("Node", world, blank=NULL) # a blank node is created with the user specified identifier, i.e. "_:id1" node <- new("Node", world, blank="someid") # a node type of 'literal' is created node <- new("Node", world, literal="A Node Value") # a Node type of 'resource' is created node <- new("Node", world, uri="http://www.example.com") # Create a literal node, specifying a language encoding node <- new("Node", world, literal="Gérard de La Martinière", language="fr")
The contents of a the specified file are read and parsed into the initialized Parser object
parseFileIntoModel(.Object, world, filePath, model, ...) ## S4 method for signature 'Parser,World,character,Model' parseFileIntoModel(.Object, world, filePath, model, baseUri = as.character(NA))
parseFileIntoModel(.Object, world, filePath, model, ...) ## S4 method for signature 'Parser,World,character,Model' parseFileIntoModel(.Object, world, filePath, model, baseUri = as.character(NA))
.Object |
a Parser object |
world |
a World object |
filePath |
a file that contains the RDF content |
model |
a Model object to parse the RDF content into |
... |
(Additional parameters) |
baseUri |
a base URI (i.e. XML base) to apply to the model |
The parser factory name specified during initialization determines how the content is parsed, for example, if 'rdfxml' was specified during parser initialization, then the parser expects RDF/XML content as specified in the W3C recommendation (http://www.we3.org/TR/REC-rdf-syntax)
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") # Create the default "rdfxml" parser parser <- new("Parser", world) filePath <- system.file("extdata/example.rdf", package="redland") parseFileIntoModel(parser, world, filePath, model)
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") # Create the default "rdfxml" parser parser <- new("Parser", world) filePath <- system.file("extdata/example.rdf", package="redland") parseFileIntoModel(parser, world, filePath, model)
The Parser class provides methods to parse RDF content into a Redland RDF model.
librdf_parser
A redland parser object
Parser-initialize
: Initialize a Parser object.
parseFileIntoModel
: Parse the contents of a file into a model.
freeParser
: Free memory used by a librdf parser.
redland
: redland package
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") # Create the default "rdfxml" parser parser <- new("Parser", world) filePath <- system.file("extdata/example.rdf", package="redland") parseFileIntoModel(parser, world, filePath, model)
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") # Create the default "rdfxml" parser parser <- new("Parser", world) filePath <- system.file("extdata/example.rdf", package="redland") parseFileIntoModel(parser, world, filePath, model)
The Query class is used to execute a query on a Model object using the default query language SPARQL. For more information, please refer to https://librdf.org/rasqal/ for details on supported query languages.
A Query is executed using the executeQuery method, which returns a QueryResults object that can be iterated over the query solution sequence.
librdf_query
A redland query object
librdf_world
A redland world object
Query-initialize
: Initialize a Query object.
executeQuery
: Execute a query.
setQueryResultLimit
: Set limit on returned query results.
getQueryResultLimit
: Get the query result limit.
getResults
: Return all query results.
writeResults
: Write query results to a file.
freeParser
: Free memory used by a librdf query.
www.example.com
redland
: redland package
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") stmt <- new("Statement", world=world, subject="https://cn.dataone.org/cn/v1/resolve/urn:uuid:274a0c5c-3082-4562-bbd3-2b1288768cac", predicate="http://www.w3.org/ns/prov#hadPlan", object="https://cn.dataone.org/cn/v1/resolve/urn:uuid:01305f45-f22b-40c8-8d27-00357d01e4a5") status <- addStatement(model, stmt) stmt <- new("Statement", world=world, subject="https://orcid.org/0000-0002-2192-403X", predicate="http://www.w3.org/ns/prov#Agent", object="slaughter", objectType="literal", datatype_uri="http://www.w3.org/2001/XMLSchema#string") status <- addStatement(model, stmt) queryString <- paste("PREFIX orcid: <https://orcid.org/>", "PREFIX dataone: <https://cn.dataone.org/cn/v1/resolve/>", "PREFIX prov: <http://www.w3.org/ns/prov#>", "SELECT ?a ?c WHERE { ?a prov:Agent ?c . }", sep=" ") query <- new("Query", world, queryString, base_uri=NULL, query_language="sparql", query_uri=NULL) # Return all results as a string results <- getResults(query, model, "rdfxml")
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") stmt <- new("Statement", world=world, subject="https://cn.dataone.org/cn/v1/resolve/urn:uuid:274a0c5c-3082-4562-bbd3-2b1288768cac", predicate="http://www.w3.org/ns/prov#hadPlan", object="https://cn.dataone.org/cn/v1/resolve/urn:uuid:01305f45-f22b-40c8-8d27-00357d01e4a5") status <- addStatement(model, stmt) stmt <- new("Statement", world=world, subject="https://orcid.org/0000-0002-2192-403X", predicate="http://www.w3.org/ns/prov#Agent", object="slaughter", objectType="literal", datatype_uri="http://www.w3.org/2001/XMLSchema#string") status <- addStatement(model, stmt) queryString <- paste("PREFIX orcid: <https://orcid.org/>", "PREFIX dataone: <https://cn.dataone.org/cn/v1/resolve/>", "PREFIX prov: <http://www.w3.org/ns/prov#>", "SELECT ?a ?c WHERE { ?a prov:Agent ?c . }", sep=" ") query <- new("Query", world, queryString, base_uri=NULL, query_language="sparql", query_uri=NULL) # Return all results as a string results <- getResults(query, model, "rdfxml")
The QueryResults object contains the RDF statements that were returned from a query on an RDF model.
librdf_query_results
A redland query object
QueryResults-initialize
: Initialize a QueryResults object.
freeQueryResults
: Free memory used by a librdf query result.
redland
: redland package
Get the locator byte offset from locator
raptor_locator_byte ( locator, .copy )
raptor_locator_byte ( locator, .copy )
locator |
raptor locator ("_p_raptor_locator") |
.copy |
logical |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get column number from locator
raptor_locator_column ( locator, .copy )
raptor_locator_column ( locator, .copy )
locator |
raptor locator ("_p_raptor_locator") |
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get file name from locator.
raptor_locator_file ( locator )
raptor_locator_file ( locator )
locator |
raptor locator ("_p_raptor_locator") |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get line number from locator.
raptor_locator_line ( locator, .copy )
raptor_locator_line ( locator, .copy )
locator |
raptor locator ("_p_raptor_locator") |
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get URI from locator.
raptor_locator_uri ( locator )
raptor_locator_uri ( locator )
locator |
raptor locator ("_p_raptor_locator") |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Raptor version as a decimal number
raptor_version_decimal ( .copy )
raptor_version_decimal ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Raptor version as a decimal number.
raptor_version_decimal_get ( .copy )
raptor_version_decimal_get ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Raptor library major version.
raptor_version_major ( .copy )
raptor_version_major ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get Raptor library major version.
raptor_version_major_get ( .copy )
raptor_version_major_get ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Raptor library minor version.
raptor_version_minor ( .copy )
raptor_version_minor ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get Raptor library minor version.
raptor_version_minor_get ( .copy )
raptor_version_minor_get ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Raptor library release.
raptor_version_release ( .copy )
raptor_version_release ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get Raptor library release.
raptor_version_release_get ( .copy )
raptor_version_release_get ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Raptor library version string.
raptor_version_string ( .copy )
raptor_version_string ( .copy )
.copy |
logical |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get Raptor library version string.
raptor_version_string_get ( .copy )
raptor_version_string_get ( .copy )
.copy |
logical |
character
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Rasqal version as a decimal number.
rasqal_version_decimal ( .copy )
rasqal_version_decimal ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the Rasqal version as a decimal number.
rasqal_version_decimal_get ( .copy )
rasqal_version_decimal_get ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Rasqal major version number.
rasqal_version_major ( .copy )
rasqal_version_major ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get Rasqal major version number.
rasqal_version_major_get ( .copy )
rasqal_version_major_get ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Rasqal minor version number.
rasqal_version_minor ( .copy )
rasqal_version_minor ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the Rasqal minor version number.
rasqal_version_minor_get ( .copy )
rasqal_version_minor_get ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Rasqal release version number.
rasqal_version_release ( .copy )
rasqal_version_release ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the Rasqal release version number.
rasqal_version_release_get ( .copy )
rasqal_version_release_get ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Rasqal version as a string.
rasqal_version_string ( .copy )
rasqal_version_string ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
Get the Rasqal version as a string.
rasqal_version_string_get ( .copy )
rasqal_version_string_get ( .copy )
.copy |
logical |
integer
This R function is a wrapper function that directly calls the the Redland RDF C libraries. For more information about Redland RDF, view the online documentation indicated in the 'References' section.
The R package redland provides methods to create, query and write information stored in the
Resource Description Framework (RDF). This package is implemented as R scripts that provide an
R interface (aka "wrapper") to the Redland RDF C libraries. Documentation for the redland R package classes
and functions are available from the standard R help facility, for example, 'help("Node-class")'
, '?getNodeType'
, etc.
An overview of the redland R package is available with the R command: 'vignette("redland_overview")'
.
The Redland C library functions are described at https://librdf.org/docs/api/index.html.
An introduction to RDF can be found at https://www.w3.org/TR/rdf-primer/.
The redland R package classes and the corresponding Redland C library types are shown in the following table:
Concept | Redland C type | redland R class | Purpose |
Resource / Literal | librdf_node | Node | RDF Model & Syntax nodes |
Statement / Triple | librdf_statement | Statement | RDF Model & Syntax arcs (statements, triples) |
Model | librdf_model | Model | Set of Statements usually held in one Storage. |
Node | librdf_node | Node | The subject, predicate or object of a Statement |
Storage | librdf_storage | Storage | Storage for Models either persistent or in-memory. |
Parser | librdf_parser | Parser | Syntax parsers delivering Stream of Statements or writing to a Model |
Query | librdf_query | Query | Querying of an Model delivering a QueryResults |
QueryResults | librdf_query_results | QueryResults | Results of applying an Query to a Model giving either variable bindings with Node values or Stream of Statements |
Serializer | librdf_serializer | Serializer | Serializes a Model into a syntax such as RDF/XML |
World | librdf_world | World | RDF wrapper class handling Redland startup/shutdown |
In order to communicate with the Redland RDF C libraries, the redland R package uses an interface layer that is created with the software package Simplified Wrapper and Interface Generator (SWIG). The relationship between the redland R package and the Redland C libraries is:
User script -> redland R package -> SWIG R interface -> Redland C libraries -> RDF data
It is recommended that the redland package R classes be used to interact with RDF, as these higher level classes take care of many of the the
details of communicating with the Redland C libraries. However, all of the lower level R interface functions generated by SWIG are made available
by the redland package. These interface functions usually have names beginning with 'librdf_'
, 'rasqal_'
or 'raptor_'
and
are usually the same name as the underlying C library function. Documentation
for the R SWIG interface functions can be found via R help i.e. '?librdf_iterator'
.
Matthew B. Jones (NCEAS) and Peter Slaughter (NCEAS)
# This example creates the necessary R objects to hold an RDF model and reads # in a file that contains RDF/XML statements. This model is then queried for # and the query results inspected. world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") filePath <- system.file("extdata/example.rdf", package="redland") parser <- new("Parser", world) parseFileIntoModel(parser, world, filePath, model) queryString <- paste("PREFIX dc: <http://purl.org/dc/elements/1.1/> ", "SELECT ?a ?c WHERE { ?a dc:description ?c . }", sep="") query <- new("Query", world, queryString, base_uri=NULL, query_language="sparql", query_uri=NULL) results <- getResults(query, model, "rdfxml") # When the query object is no longer needed, the resources it had allocated can be freed. freeQuery(query) rm(query)
# This example creates the necessary R objects to hold an RDF model and reads # in a file that contains RDF/XML statements. This model is then queried for # and the query results inspected. world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") filePath <- system.file("extdata/example.rdf", package="redland") parser <- new("Parser", world) parseFileIntoModel(parser, world, filePath, model) queryString <- paste("PREFIX dc: <http://purl.org/dc/elements/1.1/> ", "SELECT ?a ?c WHERE { ?a dc:description ?c . }", sep="") query <- new("Query", world, queryString, base_uri=NULL, query_language="sparql", query_uri=NULL) results <- getResults(query, model, "rdfxml") # When the query object is no longer needed, the resources it had allocated can be freed. freeQuery(query) rm(query)
The 'roclet_output' function handles output of the results from the 'roc_process' function. This function merges the NAMESPACE file created by the 'namespace' roclet with the list of Redland RDF functions determined by the 'roc_process' function.
## S3 method for class 'roclet_mergeNamespace' roclet_output(x, results, base_path, ...)
## S3 method for class 'roclet_mergeNamespace' roclet_output(x, results, base_path, ...)
x |
the currently running roclet |
results |
the list of items to process that was generated by the roc_process.mergedNamespace function |
base_path |
the base directory path of the package |
... |
additional parameters |
This function is called by the Roxygen2 roxygenize function.
## S3 method for class 'roclet_mergeNamespace' roclet_process(x, blocks, env, base_path)
## S3 method for class 'roclet_mergeNamespace' roclet_process(x, blocks, env, base_path)
x |
the currently running roclet |
blocks |
the documentation blocks |
env |
the current env |
base_path |
the top directory of the R package |
This function loads the Redland interface file and tests each loaded function to see if it should be exported via the NAMESPACE file.
The Serializer class provides methods to convert a Model object to other forms, for example, write out a Model to a file.
librdf_serializer
A redland statement object
Serializer-initialize
: Initialize a Serializer object.
setNameSpace
: Set a namespace for the serializer.
serializeToCharacter
: Serialize a model to a character vector.
serializeToFile
: Serialize a model to a file.
freeSerializer
: Free memory used by a librdf serializer.
redland
: redland package
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") filePath <- system.file("extdata/example.rdf", package="redland") parser <- new("Parser", world) parseFileIntoModel(parser, world, filePath, model) # Creat the default "rdfxml" serizlizer serializer <- new("Serializer", world) # Add a namespace definition to the serializer status <- setNameSpace(serializer, world, namespace="http://purl.org/dc/elements/1.1/", prefix="dc") rdf <- serializeToCharacter(serializer, world, model, baseUri="")
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") filePath <- system.file("extdata/example.rdf", package="redland") parser <- new("Parser", world) parseFileIntoModel(parser, world, filePath, model) # Creat the default "rdfxml" serizlizer serializer <- new("Serializer", world) # Add a namespace definition to the serializer status <- setNameSpace(serializer, world, namespace="http://purl.org/dc/elements/1.1/", prefix="dc") rdf <- serializeToCharacter(serializer, world, model, baseUri="")
Serialize a model to a character vector.
serializeToCharacter(.Object, world, model, ...) ## S4 method for signature 'Serializer,World,Model' serializeToCharacter(.Object, world, model, baseUri = as.character(NA))
serializeToCharacter(.Object, world, model, ...) ## S4 method for signature 'Serializer,World,Model' serializeToCharacter(.Object, world, model, baseUri = as.character(NA))
.Object |
a Serializer object |
world |
a World object |
model |
a Model object |
... |
Additional parameters |
baseUri |
a URI to prepend to relative URIs in the document |
a character vector containing the serialized model
Serialize a model to a file.
serializeToFile(.Object, world, model, filePath, ...) ## S4 method for signature 'Serializer,World,Model,character' serializeToFile(.Object, world, model, filePath, baseUri = as.character(NA))
serializeToFile(.Object, world, model, filePath, ...) ## S4 method for signature 'Serializer,World,Model,character' serializeToFile(.Object, world, model, filePath, baseUri = as.character(NA))
.Object |
a Serializer object |
world |
a World object |
model |
a Model object |
filePath |
a file path that the serialized model will be written to |
... |
Additional parameters |
baseUri |
a base URI to use for the serialization |
an integer containing the return status where non zero indicates an error occurred during serialization
Set a namespace for the serializer.
setNameSpace(.Object, world, namespace, prefix) ## S4 method for signature 'Serializer,World,character,character' setNameSpace(.Object, world, namespace, prefix)
setNameSpace(.Object, world, namespace, prefix) ## S4 method for signature 'Serializer,World,character,character' setNameSpace(.Object, world, namespace, prefix)
.Object |
a Serializer object |
world |
a World object |
namespace |
the namespace to add to the serializer |
prefix |
the namespace prefix to associate with the namespace |
Set limit on returned query results
setQueryResultLimit(.Object, limit) ## S4 method for signature 'Query' setQueryResultLimit(.Object, limit)
setQueryResultLimit(.Object, limit) ## S4 method for signature 'Query' setQueryResultLimit(.Object, limit)
.Object |
a Query object |
limit |
the result set limit. Specify a value >= to have a limit, or a value < 0 to have no limit. |
A Statement object is created using the provided subject, predicate and object.
A Statement object can be created from Node objects that are provided for the subject,
predicate and object. An alternative way to create a Statement object is to provide the
subject, predicate and object as character values. If this later method is used, the character values will be evaluated to
determine the appropriate RDF type for the subject and object. Note that the RDF type for the predicate will always
be 'uri' (aka 'resource'). If the automatic determination of RDF types is not desired, then the subjectType
and
objectType
parameters can be specified to explicitly set the RDF types.
librdf_statement
A redland statement object
Statement-initialize
: Initialize a Statement object.
getTermType
: Return the redland node type for the specified RDF term in a statement.
freeStatement
: Free memory used by a librdf statement.
redland
: redland package
world <- new("World") # Create nodes manually and add to the statment subject <- new("Node", blank="_:myid1", world) predicate <- new("Node", uri="http://www.example.com/isa", world) object <- new("Node", literal="thing", world) stmt <- new("Statement", world, subject, predicate, object) # Create the statement specifying node values directly stmt <- new("Statement", world, subject="http://www.example.com/myevent", predicate="http://example.com/occurredAt", object="Tue Feb 17 14:05:13 PST 2015") stmt <- new("Statement", world, subject=NULL, predicate="http://www.example.com/hasAddr", object="http://www.nothing.com", objectType="literal") stmt <- new("Statement", world, subject="http://www.example.com/BobSmith", predicate="http://www.example.com/says", object="¡Hola, amigo! ¿Cómo estás?", objectType="literal", language="es")
world <- new("World") # Create nodes manually and add to the statment subject <- new("Node", blank="_:myid1", world) predicate <- new("Node", uri="http://www.example.com/isa", world) object <- new("Node", literal="thing", world) stmt <- new("Statement", world, subject, predicate, object) # Create the statement specifying node values directly stmt <- new("Statement", world, subject="http://www.example.com/myevent", predicate="http://example.com/occurredAt", object="Tue Feb 17 14:05:13 PST 2015") stmt <- new("Statement", world, subject=NULL, predicate="http://www.example.com/hasAddr", object="http://www.nothing.com", objectType="literal") stmt <- new("Statement", world, subject="http://www.example.com/BobSmith", predicate="http://www.example.com/says", object="¡Hola, amigo! ¿Cómo estás?", objectType="literal", language="es")
A Redland Storage object
librdf_storage
A redland storage object
type
the storage type to create, i.e. "hashes", "mysql", "postgresql", ...
Storage-initialize
: Initialize a Storage object
freeStorage
: Free memory used by a librdf storage object
redland
: redland package
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'")
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'")
A World object is the top level object in the Redland RDF library implementation, so it contains all other objects needed to process RDF Models.
librdf_world
A redland world object
World-initialize
: Initialize a World object
freeWorld
: Free memory used by a librdf world object
redland
: redland package
world <- new("World")
world <- new("World")
Write query results to a file.
writeResults(.Object, model, ...) ## S4 method for signature 'Query' writeResults( .Object, model, file, mimeType = "application/x-turtle", format_uri = NULL, base_uri = NULL )
writeResults(.Object, model, ...) ## S4 method for signature 'Query' writeResults( .Object, model, file, mimeType = "application/x-turtle", format_uri = NULL, base_uri = NULL )
.Object |
a Query object |
model |
a Model object |
... |
additional parameters |
file |
a string specifying the output file |
mimeType |
a string specifying the mimeType of the output file. Currently supported values are "application/x-turtle", "text/plain", "application/json", "text/html" |
format_uri |
(not currently used) |
base_uri |
(not currently used) |
After this method is called, the Query object is no longer usable and should
be deleted "rm(query)"
and a new object created.
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") stmt <- new("Statement", world=world, subject="https://orcid.org/0000-0002-2192-403X", predicate="http://www.w3.org/ns/prov#Agent", object="slaughter", objectType="literal", datatype_uri="http://www.w3.org/2001/XMLSchema#string") status <- addStatement(model, stmt) queryString <- paste("PREFIX orcid: <https://orcid.org/>", "PREFIX dataone: <https://cn.dataone.org/cn/v1/resolve/>", "PREFIX prov: <http://www.w3.org/ns/prov#>", "SELECT ?a ?c WHERE { ?a prov:Agent ?c . }", sep=" ") query <- new("Query", world, queryString, base_uri=NULL, query_language="sparql", query_uri=NULL) # Return all results as a string tf <- tempfile() writeResults(query, model, file=tf, mimeType="application/x-turtle") # When the query object is no longer needed, the resources it had allocated can be freed. freeQuery(query) rm(query)
world <- new("World") storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'") model <- new("Model", world, storage, options="") stmt <- new("Statement", world=world, subject="https://orcid.org/0000-0002-2192-403X", predicate="http://www.w3.org/ns/prov#Agent", object="slaughter", objectType="literal", datatype_uri="http://www.w3.org/2001/XMLSchema#string") status <- addStatement(model, stmt) queryString <- paste("PREFIX orcid: <https://orcid.org/>", "PREFIX dataone: <https://cn.dataone.org/cn/v1/resolve/>", "PREFIX prov: <http://www.w3.org/ns/prov#>", "SELECT ?a ?c WHERE { ?a prov:Agent ?c . }", sep=" ") query <- new("Query", world, queryString, base_uri=NULL, query_language="sparql", query_uri=NULL) # Return all results as a string tf <- tempfile() writeResults(query, model, file=tf, mimeType="application/x-turtle") # When the query object is no longer needed, the resources it had allocated can be freed. freeQuery(query) rm(query)