Skip to content

Commit

Permalink
Properly format rdf:langString literals
Browse files Browse the repository at this point in the history
  • Loading branch information
atextor committed Jan 26, 2021
1 parent e3c0887 commit c1366a7
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ private State writeLiteral( final Literal literal, final State state ) {
if ( literal.getDatatypeURI().equals( XSD.xdouble.getURI() ) ) {
return state.write( "" + literal.getDouble() );
}
if ( literal.getDatatypeURI().equals( RDF.langString.getURI() ) ) {
return state.write( "\"" + literal.getLexicalForm() + "\"@" + literal.getLanguage() );
}

final Resource typeResource = ResourceFactory.createResource( literal.getDatatypeURI() );
final State literalWritten = state.write( "\"" + literal.getLexicalForm() + "\"^^" );
Expand Down

0 comments on commit c1366a7

Please sign in to comment.