ResourceDescriptionFramework: Mutable RDF Object

Description Usage Arguments Format See Also

Description

This is a mutable object. Adds, stores, and serializes RDF statements efficiently. Uses an amortized vector DynVector as a internal storage. You can inherit this class and override to create your own implementation and still retain syntax compatibility.

Usage

1

Arguments

initialize(size=100)

Constructor. Use this to create new objects it has a default tuning parameter. You may want to set it to the average number of triples per processed document.

set_context(context)

Context needs to be an identifier object that correspond to the named graph of where the statements are stored.

get_prefixes()

Returns the prefixes as a deduplicated named character vector of prefix to namespace mappings.

add_triple(subject, predicate, object)
  • subject identifier

  • predicate identifier

  • object identifier or literal or AnonymousRDF. Use the anonymous RDF if you hop through a blank node.

Returns the success status (logical)

add_triples(ll)

ll needs to be a ResourceDescriptionFramework object. The information is merged.

serialize()

Returns the Turtle serialization.

prefix_list

dynamic_vector Prefixes of all the stored identifiers as an uncollapsed list. For most cases you would want to use get_prefixes.

context

identifier. The named graph of where the statements are stored.

Format

An object of class R6ClassGenerator of length 24.

See Also

Other rdf: is.ResourceDescriptionFramework


vsenderov/rdf4r documentation built on May 3, 2019, 4:02 p.m.