Internalfunctions - SmartSlog KP Library
|
Contains describtion of functions for work with classes throw SS. More...
#include <ckpi/ckpi.h>
#include "kpi_interface.h"
#include "ss_properties.h"
#include "ss_func.h"
#include "utils/list.h"
Go to the source code of this file.
Macros | |
#define | SSLOG_EXTERN |
Functions | |
SSLOG_EXTERN int | sslog_ss_init_individual (individual_t *ind) |
rdf:type. | |
SSLOG_EXTERN int | sslog_ss_init_individual_with_uuid (individual_t *ind, const char *uuid) |
Initialize individual for SS by given uuid. | |
SSLOG_EXTERN int | sslog_ss_insert_individual (individual_t *individual) |
Inserts given individual to SS. | |
SSLOG_EXTERN int | sslog_ss_insert_individual_by_pattern (individual_t *individual, pattern_t *pattern) |
Inserts given individual to SS by pattern. | |
SSLOG_EXTERN int | sslog_ss_update_individual (individual_t *individual) |
Updates given individual in SS. | |
SSLOG_EXTERN int | sslog_ss_update_individual_by_pattern (individual_t *individual, pattern_t *pattern) |
Updates given individual in SS by pattern. | |
SSLOG_EXTERN int | sslog_ss_remove_individual (individual_t *individual) |
Removes given individual from SS. | |
SSLOG_EXTERN int | sslog_ss_exists_individual (individual_t *individual) |
Checks if given individual exists in SS. | |
SSLOG_EXTERN int | sslog_ss_exists_class (class_t *ont_class) |
Checks if any individual of given class exists in SS. | |
SSLOG_EXTERN int | sslog_ss_exists_individual_by_uuid (individual_t *individual) |
Checks if uuid of given individual exists in SS. | |
SSLOG_EXTERN int | sslog_ss_exists_uuid (char *uuid) |
Checks if individual with given uuid exists in SS. | |
SSLOG_EXTERN int | sslog_ss_exists_individual_by_pattern (pattern_t *pattern) |
Checks if individual matches given pattern exists in SS. | |
SSLOG_EXTERN list_t * | sslog_ss_get_individual_by_class_all (class_t *ont_class) |
Finds all individuals of given class in SS. |
Contains describtion of functions for work with classes throw SS.
Vanag Pavel vanag @cs. karel ia.r u
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
Contains describtion of functions for work with classes throw SS. This file is part of SmartSlog KP library.
#define SSLOG_EXTERN |
SSLOG_EXTERN int sslog_ss_exists_class | ( | class_t * | ont_class | ) |
Checks if any individual of given class exists in SS.
Tries to find individual of given class. Function sets global SmartSlog KP Library's errno.
[in] | class_t | *ont_class. Pointer to the class struct. |
SSLOG_EXTERN int sslog_ss_exists_individual | ( | individual_t * | individual | ) |
Checks if given individual exists in SS.
Tries to find individual by given individual data (uuid, properties). Function sets global SmartSlog KP Library's errno.
[in] | individual_t | * individual. Pointer to the individual struct. |
SSLOG_EXTERN int sslog_ss_exists_individual_by_pattern | ( | pattern_t * | pattern | ) |
Checks if individual matches given pattern exists in SS.
Tries to find individual by pattern. Function sets global SmartSlog KP Library's errno.
[in] | void | *pattern. Pointer to the individual or class struct. |
Tries to find individual by pattern. Function sets global SmartSlog KP Library's errno.
[in] | pattern_t | *pattern. Pointer to the individual or class struct. |
SSLOG_EXTERN int sslog_ss_exists_individual_by_uuid | ( | individual_t * | individual | ) |
Checks if uuid of given individual exists in SS.
Tries to find individual by uuid. Function sets global SmartSlog KP Library's errno.
[in] | individual_t | * individual. Pointer to the individual struct. |
SSLOG_EXTERN int sslog_ss_exists_uuid | ( | char * | uuid | ) |
Checks if individual with given uuid exists in SS.
Tries to find individual by uuid. Function sets global SmartSlog KP Library's errno.
[in] | char | *uuid. Char array with uuid. |
SSLOG_EXTERN list_t* sslog_ss_get_individual_by_class_all | ( | class_t * | ont_class | ) |
Finds all individuals of given class in SS.
Tries to find individual by class. Function sets global SmartSlog KP Library's errno.
[in] | class_t | ont_class. Pointer to the class struct. |
SSLOG_EXTERN int sslog_ss_init_individual | ( | individual_t * | ind | ) |
rdf:type.
Initialize individual for SS.
This function generate UUID and registry given individuals in SS.
individual_t | individual for initialize. |
rdf:type.
This function generate UUID and registry given individuals in SS.
individual_t | individual for initialize. |
SSLOG_EXTERN int sslog_ss_init_individual_with_uuid | ( | individual_t * | ind, |
const char * | uuid | ||
) |
Initialize individual for SS by given uuid.
This function registry given individuals in SS with given uuid.
individual_t | individual for initialize. |
const | char * uuid of individual. |
SSLOG_EXTERN int sslog_ss_insert_individual | ( | individual_t * | individual | ) |
Inserts given individual to SS.
Get ss_info struct.
Checks individual correctness: cardinality, property values limitation, and converts the individual to triplets, which will be placed to SS. Function sets global SmartSlog KP Library's errno.
[in] | individual_t | * individual. Pointer to the individual struct. |
ss_info used by KPI Low functions.
Inserts given individual to SS
Checks individual correctness: cardinality, property values limitation, and converts the individual to triplets, which will be placed to SS. Function sets global SmartSlog KP Library's errno.
[in] | individual_t | * individual. Pointer to the individual struct. |
Checks individual correctness: cardinality, property values limitation, and converts the individual to triplets, which will be placed to SS. Function sets global SmartSlog KP Library's errno.
[in] | individual_t | * individual. Pointer to the individual struct. |
SSLOG_EXTERN int sslog_ss_insert_individual_by_pattern | ( | individual_t * | individual, |
pattern_t * | pattern | ||
) |
Inserts given individual to SS by pattern.
Checks individual correctness: cardinality, property values limitation, and converts the individual to triplets by pattern, which will be placed to SS. Function sets global SmartSlog KP Library's errno.
[in] | individual_t | * individual. Pointer to the individual struct. |
[in] | void | *pattern. Entity contains pattern (individual or class). |
Checks individual correctness: cardinality, property values limitation, and converts the individual to triplets by pattern, which will be placed to SS. Function sets global SmartSlog KP Library's errno.
[in] | individual_t | * individual. Pointer to the individual struct. |
[in] | pattern_t | *pattern. Entity contains pattern (individual or class). |
SSLOG_EXTERN int sslog_ss_remove_individual | ( | individual_t * | individual | ) |
Removes given individual from SS.
Tries to find individuals description(triplets) in the SS, then removes all triplets from SS and from individual, UUID removed too. After work you have empty individual struct. Function sets global SmartSlog KP Library's errno.
[in] | individual_t | * individual. Pointer to the individual struct. |
SSLOG_EXTERN int sslog_ss_update_individual | ( | individual_t * | individual | ) |
Updates given individual in SS.
IMPORTANT: function replace individual (removes and inserts it) Checks individual correctness: cardinality, property values limitation, and converts the individual to triplets, which will be updated in SS, other properties (which has’t individual, but that are in SS) will be removed from SS. Function sets global SmartSlog KP Library's errno.
[in] | individual_t | * individual. Pointer to the individual struct. |
Checks individual correctness: cardinality, property values limitation, and converts the individual to triplets, which will be updated in SS, other properties (which has’t individual, but that are in SS) will be removed from SS. Function sets global SmartSlog KP Library's errno.
[in] | individual_t | * individual. Pointer to the individual struct. |
SSLOG_EXTERN int sslog_ss_update_individual_by_pattern | ( | individual_t * | individual, |
pattern_t * | pattern | ||
) |
Updates given individual in SS by pattern.
IMPORTANT: function replace individual (removes and inserts it by pattern)
Checks individual correctness: cardinality, property values limitation, and converts the individual to triplets by pattern, which will be updated in SS, other properties (which has’t individual, but that are in SS) will be removed from SS. Function sets global SmartSlog KP Library's errno.
[in] | individual_t | * individual. Pointer to the individual struct. |
[in] | void | * pattern. Pointer to the individual struct that considered as pattern. |