Examples of AnonId


Examples of com.hp.hpl.jena.rdf.model.AnonId

    if(o instanceof BlankNode) {
      // blank node
      log.debug("instanceof BlankNode");
      assert o instanceof AbstractBlankNodeImpl : "expected a BlankNodeImpl and found a "
              + o.getClass();
      AnonId anonId = new AnonId(((AbstractBlankNodeImpl)o).getUnderlyingBlankNode()
              .toString());
      Node jenaNode = NodeFactory.createAnon(anonId);
      return jenaNode;
    }
   
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.AnonId

    if(o instanceof BlankNode) {
      // blank node
      log.debug("instanceof BlankNode");
      assert o instanceof AbstractBlankNodeImpl : "expected a BlankNodeImpl and found a "
              + o.getClass();
      AnonId anonId = new AnonId(((AbstractBlankNodeImpl)o).getUnderlyingBlankNode()
              .toString());
      Node jenaNode = NodeFactory.createAnon(anonId);
      return jenaNode;
    }
   
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.AnonId

    private Node alloc(byte[] labelBytes) {
        mDigest.update(seedBytes) ;
        mDigest.update(labelBytes) ;
        byte[] bytes = mDigest.digest() ; // resets
        String hexString = Bytes.asHexLC(bytes) ;
        return NodeFactory.createAnon(new AnonId(hexString)) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.AnonId

        Node n = create("@" + x) ;
        return n ;
    }
   
    private Node create(String label) {
        return NodeFactory.createAnon(new AnonId(label)) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.AnonId

    public static Node decode(String s, PrefixMapping pmap)
    {
        if ( s.startsWith("_:") )  
        {
            s = s.substring(2) ;
            return NodeFactory.createAnon(new AnonId(s)) ;
        }

        if ( s.startsWith("<") )
        {
            s = s.substring(1,s.length()-1) ;
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.AnonId

        {
            // Must be done this way.
            // In particular, bnode labels can contain ":" from Jena
            // TokenizerText does not recognize these.
            str = str.substring(2) ;
            return NodeFactory.createAnon(new AnonId(str)) ;
        }

        if ( str.startsWith("<") )
        {
            // Do directly.
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.AnonId

    public Node asNode(PrefixMap pmap)
    {
        switch(tokenType)
        {
            // Assumes that bnode labels have been sorted out already.
            case BNODE : return NodeFactory.createAnon(new AnonId(tokenImage)) ;
            case IRI :
                // RiotLib.createIRIorBNode(tokenImage) includes processing <_:label>
                return NodeFactory.createURI(tokenImage) ;
            case PREFIXED_NAME :
                if ( pmap == null )
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.AnonId

                        if ( isTag(tag, XMLResults.dfBNode) ) {
                            String label = parser.getElementText() ;
                            Node node = null ;
                            // if ( inputGraphLabels.getValue() )
                            if ( inputGraphLabels )
                                node = NodeFactory.createAnon(new AnonId(label)) ;
                            else
                                node = bNodes.asNode(label) ;
                            addBinding(binding, Var.alloc(varName), node) ;
                            break ;
                        }
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.AnonId

    private static Node makeNode(String lex, String datatype, String lang, ValueType vType)
    {
        switch (vType)
        {
            case BNODE:
                return Node.createAnon(new AnonId(lex)) ;
            case URI:
                return Node.createURI(lex) ;
            case STRING:
                return Node.createLiteral(lex, lang, false) ;
            case XSDSTRING:
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.AnonId

    {
        // Is it a bNode label? i.e. <_:xyz>
        if ( isBNodeIRI(iri) )
        {
            String s = iri.substring(bNodeLabelStart.length()) ;
            Node n = NodeFactory.createAnon(new AnonId(s)) ;
            return n ;
        }
        return NodeFactory.createURI(iri) ;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.