Skip to content

Commit 27d48fd

Browse files
committed
Support bracket-less literal types.
1 parent 88fb6c0 commit 27d48fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/org/linkeddatafragments/servlet/BasicLdfServlet.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*/
3838
public class BasicLdfServlet extends HttpServlet {
3939
private final static long serialVersionUID = 1L;
40-
private final static Pattern STRINGPATTERN = Pattern.compile("^\"(.*)\"(?:@(.*)|\\^\\^<(.*)>)?$");
40+
private final static Pattern STRINGPATTERN = Pattern.compile("^\"(.*)\"(?:@(.*)|\\^\\^<?([^<>]*)>?)?$");
4141
private final static TypeMapper types = TypeMapper.getInstance();
4242
private final static long TRIPLESPERPAGE = 100;
4343

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

0 commit comments

Comments
 (0)