47 lines
968 B
TypeScript
47 lines
968 B
TypeScript
const taxonomie = {
|
|
nodes: [
|
|
{
|
|
id: 'process_a',
|
|
label: 'procces a'
|
|
},
|
|
{
|
|
id: 'subprocess_of_a_1',
|
|
label: 'subprocces of a -> 1'
|
|
},
|
|
{
|
|
id: 'subprocess_of_a_2',
|
|
label: 'subprocces of a -> 2'
|
|
}
|
|
],
|
|
edges: [
|
|
{
|
|
from: 'process_a',
|
|
to: 'subprocess_of_a_1',
|
|
id: 'e1'
|
|
},
|
|
{
|
|
from: 'process_a',
|
|
to: 'subprocess_of_a_2',
|
|
id: 'e2',
|
|
attribute: 'test'
|
|
}
|
|
]
|
|
}
|
|
|
|
import { createDatabase, createCollectionObject, createGraph } from "../src/creating";
|
|
|
|
|
|
async function main(){
|
|
try {
|
|
await createGraph('graph','test',taxonomie, 'root', 'zema1234', 'http://cl-022-lxc-dev:8529/')
|
|
} catch (e) {
|
|
console.error(e);
|
|
}
|
|
|
|
}
|
|
|
|
main().then(() => {
|
|
console.log('done');
|
|
}).catch(e => {
|
|
console.error(e)
|
|
}); |