Skip to main content

Crate ext_rdf

Crate ext_rdf 

Source
Expand description

ext-rdf: RDF Linked Data import extension for KyuGraph.

Provides RDF file parsing (Turtle, N-Triples, N-Quads, RDF/XML) and automatic schema inference following Linked Data Principles:

  • rdf:type → node table assignment
  • Literal-valued predicates → node properties
  • URI-valued predicates → relationships (hyperlinks as edges)
  • URI serves as primary key on every node table

§Library API

let triples = ext_rdf::parse_triples("foaf.ttl")?;
let schema = ext_rdf::infer_schema(&triples)?;

§Extension procedures

CALL rdf.stats('file.ttl')
CALL rdf.prefixes('file.ttl')
CALL rdf.types('file.ttl')

Re-exports§

pub use model::RdfNodeTable;
pub use model::RdfObject;
pub use model::RdfRelTable;
pub use model::RdfSchema;
pub use model::Triple;
pub use parser::parse_triples;
pub use schema::infer_schema;

Modules§

model
RDF data model types for the Linked Data → Property Graph mapping.
parser
RDF file parsing using oxttl (Turtle/N-Triples/N-Quads) and oxrdfxml (RDF/XML).
schema
Schema inference: two-pass algorithm mapping RDF triples to property graph tables.

Structs§

RdfExtension
RDF extension providing inspection procedures.