kDB: Knowledge DataBase
Loading...
Searching...
No Matches
kDBRobotics::Agents::Collection Class Reference

#include <Collection.h>

Inheritance diagram for kDBRobotics::Agents::Collection:
Collaboration diagram for kDBRobotics::Agents::Collection:

Public Types

using ValueType = Agent
 
using OperatorOptions = kDB::Repository::RDF::FocusNodeCollection::OperatorOptions
 
- Public Types inherited from kDB::Repository::RDF::FocusNodeCollectionWrapper< Collection >
using Derive
 
using ValueType
 

Public Member Functions

 Collection (const Collection &_rhs)
 
Collectionoperator= (const Collection &_rhs)
 
cres_qresult< Agentagent (const knowCore::Uri &_agentUri) const
 
cres_qresult< Streamstream (const knowCore::Uri &_streamUri) const
 
cres_qresult< bool > hasAgent (const knowCore::Uri &_agentUri) const
 
cres_qresult< bool > hasStream (const knowCore::Uri &_streamUri) const
 
cres_qresult< QList< Stream > > streamsOf (const knowCore::Uri &_resource) const
 
cres_qresult< QList< Agent > > agents (const QList< QPair< knowCore::Uri, knowCore::ConstrainedValue > > &_constraints, const OperatorOptions &_operatorOptions=OperatorOptions()) const
 
template<typename... _TArgs_>
cres_qresult< QList< Agent > > agents (const knowCore::Uri &_uri, const knowCore::ConstrainedValue &_constraint, const _TArgs_ &...) const
 
cres_qresult< AgentcreateAgent (const knowCore::Uri &_typeUri, const QString &_name, const QString &_frame_name, const knowCore::Uri &_agentUri=knowCore::Uri::createUnique({"agent"}))
 
cres_qresult< StreamcreateStream (const knowCore::Uri &_contentTypeUri, const QString &_identifier, const knowCore::Uri &_dataTypeUri, const knowCore::Uri &_streamUri=knowCore::Uri::createUnique({"stream"}))
 
- Public Member Functions inherited from kDB::Repository::RDF::FocusNodeCollectionWrapper< Collection >
bool operator== (const Derive &_rhs) const
 
bool isValid () const
 
bool isReadOnly () const
 
knowCore::Uri uri () const
 
kDB::Repository::Connection connection () const
 
cres_qresult< std::size_t > count () const
 
cres_qresult< QList< ValueType > > all () const
 

Static Public Member Functions

static knowCore::Uri collectionType ()
 
static knowCore::Uri allFocusNodesView ()
 
static knowCore::Uri primaryType ()
 
static knowCore::UriList containedTypes ()
 
static cres_qresult< knowCore::UriListdefaultDatatypes (const QList< QPair< knowCore::Uri, knowCore::ConstrainedValue > > &_constraints)
 
static Collection allAgents (const kDB::Repository::Connection &_connection)
 
- Static Public Member Functions inherited from kDB::Repository::RDF::FocusNodeCollectionWrapper< Collection >
static cres_qresult< Derive > get (const kDB::Repository::Connection &_connection, const knowCore::Uri &_graph)
 
static cres_qresult< Derive > create (const kDB::Repository::Connection &_connection, const knowCore::Uri &_graph)
 
static cres_qresult< Derive > getOrCreate (const kDB::Repository::Connection &_connection, const knowCore::Uri &_graph)
 
static cres_qresult< void > registerCollection (const kDB::Repository::QueryConnectionInfo &_connection)
 

Protected Member Functions

 Collection (const kDB::Repository::RDF::FocusNodeCollectionWrapper< Collection > &_rhs)
 
- Protected Member Functions inherited from kDB::Repository::RDF::FocusNodeCollectionWrapper< Collection >
 operator Derive () const
 
cres_qresult< ValueType > focusNode (const knowCore::Uri &_uri) const
 
cres_qresult< bool > hasFocusNode (const knowCore::Uri &_focusNodeUri, const knowCore::Uri &_typeUri=Derive::primaryType()) const
 
cres_qresult< QList< ValueType > > focusNodes (const QList< QPair< knowCore::Uri, knowCore::ConstrainedValue > > &_constraints, const FocusNodeCollection::OperatorOptions &_operatorOptions) const
 
cres_qresult< QList< ValueType > > focusNodes (const knowCore::Uri &_uri, const knowCore::ConstrainedValue &_constraint, const _TArgs_ &... _args) const
 
cres_qresult< ValueType > createFocusNode (const knowCore::Uri &_typeUri, const knowCore::ValueHash &_properties, const knowCore::Uri &_focusNodeUri)
 
FocusNodeCollectionfocusNodeCollection ()
 
const FocusNodeCollectionfocusNodeCollection () const
 

Friends

class ::TestAgents
 

Detailed Description

Interface a kDB::Repository::TripleStore that contains a set of agents.

Member Function Documentation

◆ agent()

cres_qresult< Agent > Collection::agent ( const knowCore::Uri & _agentUri) const
Returns
the agent with the Uri _agentUri

◆ agents()

cres_qresult< QList< Agent > > Collection::agents ( const QList< QPair< knowCore::Uri, knowCore::ConstrainedValue > > & _constraints,
const OperatorOptions & _operatorOptions = OperatorOptions() ) const
Parameters
_constraintsa list of pair of list of uris representing the property uri and a constraint.
_operatorOptionsset the precision used by operators
Returns
the list of agents that satisfies the constraints

◆ allAgents()

Collection Collection::allAgents ( const kDB::Repository::Connection & _connection)
static
Returns
an interface to the view that covers all agents.

◆ createAgent()

cres_qresult< Agent > Collection::createAgent ( const knowCore::Uri & _typeUri,
const QString & _name,
const QString & _frame_name,
const knowCore::Uri & _agentUri = knowCore::Uri::createUnique({"agent"}) )

Create a new Agent of uri type _typeUri with name _name and add it to this agent graph.

◆ createStream()

cres_qresult< Stream > Collection::createStream ( const knowCore::Uri & _contentTypeUri,
const QString & _identifier,
const knowCore::Uri & _dataTypeUri,
const knowCore::Uri & _streamUri = knowCore::Uri::createUnique({"stream"}) )

Create a new Stream of uri type _typeUri with name _name and add it to this agent graph.

◆ hasAgent()

cres_qresult< bool > Collection::hasAgent ( const knowCore::Uri & _agentUri) const
Returns
true if the agent already exists.

◆ hasStream()

cres_qresult< bool > Collection::hasStream ( const knowCore::Uri & _streamUri) const
Returns
true if the stream already exists.

◆ stream()

cres_qresult< Stream > Collection::stream ( const knowCore::Uri & _streamUri) const
Returns
the stream with the Uri _agentUri

◆ streamsOf()

cres_qresult< QList< Stream > > kDBRobotics::Agents::Collection::streamsOf ( const knowCore::Uri & _resource) const
Returns
all the streams associated to a resource.

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