String lexicalForm = strings[0];
String language = strings[1];
String datatype = strings[2];
Literal literal;
if (language != null) {
literal = new LiteralImpl(lexicalForm, language);
} else if (datatype != null) {
literal = new LiteralImpl(lexicalForm, URI.create(datatype));
} else {
literal = new LiteralImpl(lexicalForm);
}
((LiteralMutableId) literal).setId(nodeId);
return literal;
}