Skip to content
Snippets Groups Projects

Resolve "Pb d'attachement des relations aux scopes"

1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -77,7 +77,7 @@ public class UnlDocumentToRdfConverter {
@@ -77,7 +77,7 @@ public class UnlDocumentToRdfConverter {
var uw = (UniversalWordNode) sentenceNode;
var uw = (UniversalWordNode) sentenceNode;
// Création de l'universalWord dans le dictionnaire
// Création de l'universalWord dans le dictionnaire
var universalWordIndividual = sentenceOntModel.createIndividual(String.format("%s#%s", uniqId, slugify(uw.getUniversalWord().toString())), UNL.UW_Lexeme);
var universalWordIndividual = sentenceOntModel.createIndividual(String.format("%s/%s#%s", DOMAIN, uniqId, slugify(uw.getUniversalWord().toString())), UNL.UW_Lexeme);
universalWordIndividual.addLabel(uw.getUniversalWord().toString(), "fr/tetras_libre/unltools/unl");
universalWordIndividual.addLabel(uw.getUniversalWord().toString(), "fr/tetras_libre/unltools/unl");
// Création de l'occurence du l'universalWord
// Création de l'occurence du l'universalWord
@@ -109,7 +109,7 @@ public class UnlDocumentToRdfConverter {
@@ -109,7 +109,7 @@ public class UnlDocumentToRdfConverter {
GraphExtensions.getRelationWithinScopeStream(graphRefNode.getReferenceNumber(), sentencegraph)
GraphExtensions.getRelationWithinScopeStream(graphRefNode.getReferenceNumber(), sentencegraph)
.forEach(relationWithinScope -> {
.forEach(relationWithinScope -> {
try {
try {
var relationWithinScopeUri = RelationsUri.constructRelationUri(scopeName, relationWithinScope);
var relationWithinScopeUri = RelationsUri.constructRelationUri(String.format("%s#", sentenceUri), relationWithinScope);
var relationWithinScopeObjectProperty = this.relationLabelToUnlPropertyConverter.getObjectProperty(relationWithinScope.getRelationLabel(), docModel);
var relationWithinScopeObjectProperty = this.relationLabelToUnlPropertyConverter.getObjectProperty(relationWithinScope.getRelationLabel(), docModel);
var relationWithinScopeIndividual = sentenceOntModel.createIndividual(relationWithinScopeUri, relationWithinScopeObjectProperty);
var relationWithinScopeIndividual = sentenceOntModel.createIndividual(relationWithinScopeUri, relationWithinScopeObjectProperty);
sentenceOntModel.add(scopeIndividual, UNL.is_scope_of, relationWithinScopeIndividual);
sentenceOntModel.add(scopeIndividual, UNL.is_scope_of, relationWithinScopeIndividual);
Loading