private Node convert(AResource r) { if (!r.isAnonymous()) { // URI. String uriStr = r.getURI() ; if ( errorForSpaceInURI ) { // Special check for spaces in a URI. // Convert to an error like TokernizerText. if ( uriStr.contains(" ") ) { int i = uriStr.indexOf(' '); String s = uriStr.substring(0,i); String msg = String.format("Bad character in IRI (space): <%s[space]...>", s); riotErrorHandler.error(msg, -1, -1); throw new RiotParseException(msg, -1, -1); } } return NodeFactory.createURI(uriStr); } // String id = r.getAnonymousID(); Node rr = (Node) r.getUserData(); if (rr == null) { rr = NodeFactory.createBlankNode(); r.setUserData(rr); } return rr; }
private static Node convert(AResource r) { if (!r.isAnonymous()) return NodeFactory.createURI(r.getURI()); // String id = r.getAnonymousID(); Node rr = (Node) r.getUserData(); if (rr == null) { rr = NodeFactory.createBlankNode(); r.setUserData(rr); } return rr; }
private static Node convert(AResource r) { if (!r.isAnonymous()) return NodeFactory.createURI(r.getURI()); // String id = r.getAnonymousID(); Node rr = (Node) r.getUserData(); if (rr == null) { rr = NodeFactory.createBlankNode(); r.setUserData(rr); } return rr; }