Extract concepts subsystem
This commit is contained in:
parent
5e36cb6e5c
commit
66291f6d43
|
|
@ -24,7 +24,8 @@ target_link_libraries(amduat_federation
|
||||||
PRIVATE amduat_asl amduat_enc amduat_util amduat_fed
|
PRIVATE amduat_asl amduat_enc amduat_util amduat_fed
|
||||||
)
|
)
|
||||||
|
|
||||||
set(amduatd_sources src/amduatd.c src/amduatd_caps.c src/amduatd_space.c)
|
set(amduatd_sources src/amduatd.c src/amduatd_caps.c src/amduatd_space.c
|
||||||
|
src/amduatd_concepts.c)
|
||||||
if(AMDUATD_ENABLE_UI)
|
if(AMDUATD_ENABLE_UI)
|
||||||
list(APPEND amduatd_sources src/amduatd_ui.c)
|
list(APPEND amduatd_sources src/amduatd_ui.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
3256
src/amduatd.c
3256
src/amduatd.c
File diff suppressed because it is too large
Load diff
3428
src/amduatd_concepts.c
Normal file
3428
src/amduatd_concepts.c
Normal file
File diff suppressed because it is too large
Load diff
61
src/amduatd_concepts.h
Normal file
61
src/amduatd_concepts.h
Normal file
|
|
@ -0,0 +1,61 @@
|
||||||
|
#ifndef AMDUATD_CONCEPTS_H
|
||||||
|
#define AMDUATD_CONCEPTS_H
|
||||||
|
|
||||||
|
#include "amduat/asl/collection.h"
|
||||||
|
#include "amduatd_space.h"
|
||||||
|
#include "amduatd_ui.h"
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
amduat_reference_t record_ref;
|
||||||
|
amduat_reference_t src_ref;
|
||||||
|
amduat_reference_t dst_ref;
|
||||||
|
char *rel;
|
||||||
|
} amduatd_edge_entry_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
amduatd_edge_entry_t *items;
|
||||||
|
size_t len;
|
||||||
|
size_t cap;
|
||||||
|
} amduatd_edge_list_t;
|
||||||
|
|
||||||
|
typedef struct amduatd_concepts_t {
|
||||||
|
const char *root_path;
|
||||||
|
char edges_path[1024];
|
||||||
|
char *edge_collection_name;
|
||||||
|
amduat_reference_t rel_aliases_ref;
|
||||||
|
amduat_reference_t rel_materializes_ref;
|
||||||
|
amduat_reference_t rel_represents_ref;
|
||||||
|
amduat_reference_t rel_requires_key_ref;
|
||||||
|
amduat_reference_t rel_within_domain_ref;
|
||||||
|
amduat_reference_t rel_computed_by_ref;
|
||||||
|
amduat_reference_t rel_has_provenance_ref;
|
||||||
|
amduat_asl_collection_store_t edge_collection;
|
||||||
|
amduatd_edge_list_t edges;
|
||||||
|
} amduatd_concepts_t;
|
||||||
|
|
||||||
|
bool amduatd_concepts_init(amduatd_concepts_t *c,
|
||||||
|
amduat_asl_store_t *store,
|
||||||
|
const amduatd_space_t *space,
|
||||||
|
const char *root_path,
|
||||||
|
bool enable_migrations);
|
||||||
|
|
||||||
|
void amduatd_concepts_free(amduatd_concepts_t *c);
|
||||||
|
|
||||||
|
bool amduatd_concepts_can_handle(const amduatd_http_req_t *req);
|
||||||
|
|
||||||
|
bool amduatd_concepts_handle(amduatd_ctx_t *ctx,
|
||||||
|
const amduatd_http_req_t *req,
|
||||||
|
amduatd_http_resp_t *resp);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /* extern "C" */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* AMDUATD_CONCEPTS_H */
|
||||||
Loading…
Reference in a new issue