mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 16:36:21 +02:00
Fix/core save api (#172)
* Acknowledge messaages from Pulsar, doh! * Change API to deliver a boolean e if value is an entity * Change loaders to use new API * Changes, entity-aware API is complete
This commit is contained in:
parent
340d7a224f
commit
887fafcf8c
9 changed files with 104 additions and 70 deletions
|
|
@ -1,6 +1,16 @@
|
|||
|
||||
from . defs import *
|
||||
from .. schema import Triple, Value
|
||||
|
||||
def Value(value, is_uri):
|
||||
if is_uri:
|
||||
return Uri(value)
|
||||
else:
|
||||
return Literal(value)
|
||||
|
||||
def Triple(s, p, o):
|
||||
return {
|
||||
"s": s, "p": p, "o": o,
|
||||
}
|
||||
|
||||
class Organization:
|
||||
def __init__(self, id, name=None, description=None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue