kpi_interface.c File Reference

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

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

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, void *pattern)
 Converts individual to triples.
ss_triple_t * individual_to_triples_by_pattern_any (individual_t *ind, void *pattern)
 Converts individual to triples.
ss_triple_t * class_to_triples (class_t *class)
 Converts individual to triples.
list_t * triples_to_individuals (ss_triple_t *triples)
individual_t * triples_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.
void print_triples (ss_triple_t *triples)
 Prints triples to sdtout.


Detailed Description

Contains functions for providing interface to kpi_low.

Vanag Pavel <vanag@cs.karelia.ru>

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.

Function Documentation

ss_triple_t * class_to_triples ( class_t *  class  ) 

Converts individual to triples.

Converts triples to individuals.

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

Parameters:
[in] class_t *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 PetrSU 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.

Converts individual properties with values and uuid with classtype to triples. Function sets global PetrSU 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 PetrSU 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,
void *  pattern 
)

Converts individual to triples.

Converts individual properties by pattern with values and uuid with classtype to triples. Function sets global PetrSU 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,
void *  pattern 
)

Converts individual to triples.

Converts individual properties by pattern without values and uuid with classtype to triples. Function sets global PetrSU 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:
ind individual.
properties list of properties. It can be NULL - all properties that be set for individual are converted to triplets.
Returns:
0 on success or not otherwise.

void * print_triples ( ss_triple_t *  triples  ) 

Prints triples to sdtout.

Prints each triple in list in stdout.

Parameters:
[in] ss_triple_t *triples. Pointer to the list of triples.

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 PetrSU KP Library's errno.

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

list_t* triples_to_individuals ( ss_triple_t *  triples  ) 


doxygen