Ingen  0.5.1
Classes | Public Types | Public Member Functions | List of all members
Ingen::Parser Class Reference

Read Ingen objects from Turtle files or strings. More...

#include <Parser.hpp>

Classes

struct  ResourceRecord
 Record of a resource listed in a bundle manifest. More...
 

Public Types

typedef Node::Properties Properties
 

Public Member Functions

virtual std::set< ResourceRecordfind_resources (Sord::World &world, const std::string &manifest_uri, const Raul::URI &type_uri)
 Find all resources of a given type listed in a manifest file. More...
 
virtual bool parse_file (World *world, Interface *target, const std::string &path, boost::optional< Raul::Path > parent=boost::optional< Raul::Path >(), boost::optional< Raul::Symbol > symbol=boost::optional< Raul::Symbol >(), boost::optional< Properties > data=boost::optional< Properties >())
 Parse a graph from RDF into a Interface (engine or client). More...
 
virtual boost::optional< Raul::URI > parse_string (World *world, Interface *target, const std::string &str, const std::string &base_uri, boost::optional< Raul::Path > parent=boost::optional< Raul::Path >(), boost::optional< Raul::Symbol > symbol=boost::optional< Raul::Symbol >(), boost::optional< Properties > data=boost::optional< Properties >())
 

Detailed Description

Read Ingen objects from Turtle files or strings.

Member Function Documentation

§ find_resources()

std::set< Parser::ResourceRecord > Ingen::Parser::find_resources ( Sord::World &  world,
const std::string &  manifest_uri,
const Raul::URI &  type_uri 
)
virtual

Find all resources of a given type listed in a manifest file.

§ parse_file()

bool Ingen::Parser::parse_file ( World world,
Interface target,
const std::string &  path,
boost::optional< Raul::Path >  parent = boost::optional<Raul::Path>(),
boost::optional< Raul::Symbol >  symbol = boost::optional<Raul::Symbol>(),
boost::optional< Properties data = boost::optional<Properties>() 
)
virtual

Parse a graph from RDF into a Interface (engine or client).

If path is a file path, then the graph is loaded from that file. If it is a directory, then the manifest.ttl from that directory is used instead. In either case, any rdfs:seeAlso files are loaded and the graph parsed from the resulting combined model.

Returns
whether or not load was successful.

The documentation for this class was generated from the following files: