Internalfunctions - SmartSlog KP Library
Macros | Functions
kpi_interface.c File Reference

Contains functions for providing interface to kpi_low. More...

#include "kpi_interface.h"
#include "properties.h"
#include "utils/util_func.h"

Macros

#define _KPI_INTERFACE_C_

Functions

ss_triple_t * individual_to_triples (individual_t *ind)
 Converts individual to triples.
ss_triple_t * individual_to_triples_any (individual_t *ind)
 Converts individual to triples.
ss_triple_t * individual_to_triples_by_pattern (individual_t *ind, pattern_t *pattern)
 Converts individual to triples.
ss_triple_t * individual_to_triples_by_pattern_any (individual_t *ind, pattern_t *pattern)
 Converts individual to triples.
ss_triple_t * class_to_triples (class_t *ont_class)
 Converts individual to triples.
ss_triple_t * pattern_to_triples (pattern_t *pattern)
 Converts pattern to triples.
bool is_in_individuals_list (char *uuid, list_t *inds_list)
 Checkes is there input item in list of individuals.
list_t * triples_to_individuals (ss_triple_t *triples)
 Converts triples to individuals.
individual_ttriples_to_individual_first (ss_triple_t *triples)
 Converts triples to individual.
ss_triple_t * individual_to_triples_by_properties_any (individual_t *ind, list_t *properties)
 Convert individual to triplets using given list properties.

Detailed Description

Contains functions for providing interface to kpi_low.

Vanag Pavel vanag.nosp@m.@cs..nosp@m.karel.nosp@m.ia.r.nosp@m.u

Date:
20 April, 2009
Version:
0.2alpha

LICENSE

SmartSlog KP Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

SmartSlog KP Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with SmartSlog KP Library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

DESCRIPTION

Contains functions for providing interface to kpi_low. This file is part of SmartSlog KP Library.


Macro Definition Documentation

#define _KPI_INTERFACE_C_

Function Documentation

ss_triple_t * class_to_triples ( class_t ont_class)

Converts individual to triples.

Converts triples to individuals.

Converts class properties with values with classtype to triples. Function sets global SmartSlog KP Library's errno.

Parameters:
[in]class_t*ont_class. Pointer to the class struct.
Returns:
ss_triple_t *. List of triples or NULL if error accures.

Converts properties without values and uuid with classtype to individual struct. Function sets global SmartSlog KP Library's errno.

Parameters:
[in]ss_triple_t*triples. Pointer to the list of triples.
Returns:
list_t *. List of all individuals.
ss_triple_t * individual_to_triples ( individual_t ind)

Converts individual to triples.

rdf:type.

Converts individual properties with values and uuid with classtype to triples. Subject is UUID of individual for all triples Function sets global SmartSlog KP Library's errno.

Parameters:
[in]individual_t* individual. Pointer to the individual struct.
Returns:
ss_triple_t *. List of triples or NULL if error accures.

Converts individual to triples.

Converts individual properties with values and uuid with classtype to triples. Function sets global SmartSlog KP Library's errno.

Parameters:
[in]individual_t* individual. Pointer to the individual struct.
Returns:
ss_triple_t *. List of triples or NULL if error accures.
ss_triple_t * individual_to_triples_any ( individual_t ind)

Converts individual to triples.

Converts individual properties without values and uuid with classtype to triples. Function sets global SmartSlog KP Library's errno.

Parameters:
[in]individual_t* individual. Pointer to the individual struct.
Returns:
ss_triple_t *. List of triples or NULL if error accures.
ss_triple_t * individual_to_triples_by_pattern ( individual_t ind,
pattern_t pattern 
)

Converts individual to triples.

Converts individual properties by pattern with values and uuid with classtype to triples. Function sets global SmartSlog KP Library's errno.

Parameters:
[in]individual_t* individual. Pointer to the individual struct.
[in]void*pattern. Entity of pettern (class or individual).
Returns:
ss_triple_t *. List of triples or NULL if error accures.
ss_triple_t * individual_to_triples_by_pattern_any ( individual_t ind,
pattern_t pattern 
)

Converts individual to triples.

Converts individual properties by pattern without values and uuid with classtype to triples. Function sets global SmartSlog KP Library's errno.

Parameters:
[in]individual_t* individual. Pointer to the individual struct.
[in]void*pattern. Entity of pettern (class or individual).
Returns:
ss_triple_t *. List of triples or NULL if error accures.
ss_triple_t* individual_to_triples_by_properties_any ( individual_t ind,
list_t *  properties 
)

Convert individual to triplets using given list properties.

Checks properties, if they can be set for given individuals it convert it to triples, without set object (use SS_RDF_SIB_ANY - any value). It not convert object properties.

Parameters:
indindividual.
propertieslist of properties. It can be NULL - all properties that be set for individual are converted to triplets.
Returns:
0 on success or not otherwise.
bool is_in_individuals_list ( char *  uuid,
list_t *  inds_list 
)

Checkes is there input item in list of individuals.

Parameters:
char* uuid.
list_head_t* individuals list.
Returns:
returns true if item founded in list and false otherwise.
ss_triple_t * pattern_to_triples ( pattern_t pattern)

Converts pattern to triples.

Converts pattern structures to triples. If set UUID then Subject is UUID, SS_RDF_SIB_ANY otherwise. Function sets global SmartSlog KP Library's errno.

Parameters:
[in]individual_t* individual. Pointer to the individual struct.
[in]void*pattern. Entity of pettern (class or individual).
Returns:
ss_triple_t *. List of triples or NULL if error accures.

Converts pattern structures to triples. Function sets global SmartSlog KP Library's errno.

Parameters:
[in]individual_t* individual. Pointer to the individual struct.
[in]void*pattern. Entity of pettern (class or individual).
Returns:
ss_triple_t *. List of triples or NULL if error accures.
individual_t * triples_to_individual_first ( ss_triple_t *  triples)

Converts triples to individual.

Converts properties without values and uuid with classtype to individual struct. Function sets global SmartSlog KP Library's errno.

Parameters:
[in]ss_triple_t*triples. Pointer to the list of triples.
Returns:
individual_t . First individual only.
ss_triple_t * triples_to_individuals ( ss_triple_t *  triples)

Converts triples to individuals.

Converts properties without values and uuid with classtype to individual struct. Function sets global SmartSlog KP Library's errno.

Parameters:
[in]ss_triple_t*triples. Pointer to the list of triples.
Returns:
list_t *. List of all individuals.