Skip to content

Commit

Permalink
Support bracket-less literal types.
Browse files Browse the repository at this point in the history
  • Loading branch information
RubenVerborgh committed Aug 11, 2014
1 parent 88fb6c0 commit 27d48fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/org/linkeddatafragments/servlet/BasicLdfServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/
public class BasicLdfServlet extends HttpServlet {
private final static long serialVersionUID = 1L;
private final static Pattern STRINGPATTERN = Pattern.compile("^\"(.*)\"(?:@(.*)|\\^\\^<(.*)>)?$");
private final static Pattern STRINGPATTERN = Pattern.compile("^\"(.*)\"(?:@(.*)|\\^\\^<?([^<>]*)>?)?$");
private final static TypeMapper types = TypeMapper.getInstance();
private final static long TRIPLESPERPAGE = 100;

Expand Down Expand Up @@ -213,7 +213,7 @@ private RDFNode parseAsNode(String value) {
return ResourceFactory.createTypedLiteral(body, types.getSafeTypeByName(type));
return ResourceFactory.createPlainLiteral(body);
}
return null;
return INVALID_URI;
// assume it's a URI without angular brackets
default:
return ResourceFactory.createResource(value);
Expand Down

0 comments on commit 27d48fd

Please sign in to comment.