Commit 15977791 authored by Laurent Wouters's avatar Laurent Wouters
Browse files

[fix] Fixed inverse relations loaded from ontology

parent e878da3e3633
......@@ -79,13 +79,13 @@ export class RdfEntity {
}
public getEntitiesForS(property: string): RdfEntity[] {
return this.getValuesForS(property)
return this.getValuesForE(this.manager.entityForUri(property))
.filter((node: $rdf.Node) => node.termType == "NamedNode")
.map((node: $rdf.NamedNode) => this.manager.entityForUri(node.uri));
}
public getEntitiesForN(property: $rdf.NamedNode): RdfEntity[] {
return this.getValuesForN(property)
return this.getValuesForE(this.manager.entityForUri(property.uri))
.filter((node: $rdf.Node) => node.termType == "NamedNode")
.map((node: $rdf.NamedNode) => this.manager.entityForUri(node.uri));
}
......@@ -220,6 +220,7 @@ export class RdfEntityStore {
if (inverses != null && inverses != undefined) {
Object.keys(inverses).forEach((uri: string) => {
this.inverses[uri] = inverses[uri];
this.inverses[inverses[uri]] = uri;
});
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment