Skip to content

Commit 6b94d3f

Browse files
committed
updating the generation of literal with datatype
1 parent 1fb28e4 commit 6b94d3f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

morph-base/src/main/scala/es/upm/fi/dia/oeg/morph/base/GeneralUtility.scala

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,14 @@ object GeneralUtility {
128128
GeneralUtility.createBlankNode(id.getLabelString());
129129
}
130130
else if(rdfNode.isLiteral()) {
131-
/*
132131
val literalNode = rdfNode.asLiteral();
132+
val nodeLexicalForm = literalNode.getLexicalForm();
133133
val datatype = literalNode.getDatatype();
134134
val lang = literalNode.getLanguage();
135135

136-
val literalValue = literalNode.getValue();
137-
val literalValueString = literalValue.toString();
138-
136+
//val literalValue = literalNode.getValue();
137+
//val literalValueString = literalValue.toString();
138+
val literalValueString = nodeLexicalForm;
139139

140140
val literalString = if(datatype == null) {
141141
if(lang == null || lang.equals("")) {
@@ -148,9 +148,8 @@ object GeneralUtility {
148148
}
149149

150150
literalString
151-
*/
152151

153-
rdfNode.asNode().toString();
152+
//rdfNode.asNode().toString();
154153
}
155154
else { rdfNode.toString()}
156155
}

0 commit comments

Comments
 (0)