This id is guaranteed to be unique on this machine.
269270271272273274275276277278
{ // Is it a bNode label? i.e. <_:xyz> if ( isBNodeIRI(iri) ) { String s = iri.substring(bNodeLabelStart.length()) ; Node n = Node.createAnon(new AnonId(s)) ; return n ; } return Node.createURI(iri) ; }
187188189190191192193194195196197
Node n ; // One case; VARS line then * if ( token.hasType(TokenType.STAR ) || ( token.isCtlCode() && token.getCntrlCode() == -1 ) ) n = lastLine.get(v) ; else if ( token.hasType(TokenType.BNODE) ) n = Node.createAnon(new AnonId(NodeFmtLib.decodeBNodeLabel(token.getImage()))) ; else n = profile.create(null, token) ; binding.add(v, n) ; } i++ ;
868788899091
@Test public void nodec_uri_01() { test ("<>") ; } @Test public void nodec_uri_02() { test ("<http://example/>") ; } // Jena anon ids can have a string form including ":" @Test public void nodec_blank_01() { test (Node.createAnon(new AnonId("a"))) ; }
878889909192
@Test public void nodec_uri_01() { test ("<>") ; } @Test public void nodec_uri_02() { test ("<http://example/>") ; } // Jena anon ids can have a string form including ":" @Test public void nodec_blank_01() { test (Node.createAnon(new AnonId("a"))) ; } @Test public void nodec_blank_02() { test (Node.createAnon(new AnonId("a:b:c-d"))) ; }
8687888990919293949596
{ // Must be done this way. // In particular, bnode labels can contain ":" from Jena // TokenizerText does not recognize these. str = str.substring(2) ; return Node.createAnon(new AnonId(str)) ; } if ( str.startsWith("<") ) { // Do directly.
96979899100101102103104
@Test public void bindingStream_61() { BindingMap b = BindingFactory.create() ; Node bn = NodeFactory.createAnon(new AnonId("unusual")) ; b.add(Var.alloc("v"), bn) ; testWriteRead(b) ; }
465466467468469470471472473474475
{ String label = parser.getElementText() ; Node node = null ; //if ( inputGraphLabels.getValue() ) if ( inputGraphLabels ) node = Node.createAnon(new AnonId(label)) ; else node = bNodes.asNode(label) ; addBinding(binding, Var.alloc(varName), node) ; break ; }
100101102103104105106107108109110
282283284285286287288289290291
387388389390391392393394395396397398399400401
anonymous in the model, then when they're reserialized they'll get different /blank/ URIs and you'll never be able to match them up. */ if (makeAnonymousNodes && uri.startsWith("http://marklogic.com/semantics/blank/")) { AnonId id = null; if (anonids.containsKey(uri)) { id = anonids.get(uri); } else { id = new AnonId(); anonids.put(uri, id); } return model.createResource(id); } else {