Package com.hp.hpl.jena.rdf.model.impl

Examples of com.hp.hpl.jena.rdf.model.impl.LiteralImpl


        // Best way.
        if ( model != null )
             return model.asRDFNode(n) ;
       
        if ( n.isLiteral() )
            return new LiteralImpl(n, null) ;
               
        if ( n.isURI() || n.isBlank() )
            return new ResourceImpl(n, null) ;
       
        throw new ARQInternalErrorException("Unknown node type for node: "+n) ;
View Full Code Here


        // Best way.
        if ( model != null )
             return model.asRDFNode(n) ;
       
        if ( n.isLiteral() )
            return new LiteralImpl(n, null) ;
               
        if ( n.isURI() || n.isBlank() )
            return new ResourceImpl(n, null) ;
       
        throw new ARQInternalErrorException("Unknown node type for node: "+n) ;
View Full Code Here

    }

    @Test
    public void stringForObject_misc_versions() throws Exception {
        assertEquals("<<null>>", FmtUtils.stringForObject(null)) ;
        assertEquals("<n1>", FmtUtils.stringForObject(new LiteralImpl(aNode(), null))) ;
        assertEquals("<nzz1>", FmtUtils.stringForObject(new ResourceImpl(NodeFactory.createURI("nzz1"), null))) ;
        assertEquals("abc", FmtUtils.stringForObject("abc")) ;
    }
View Full Code Here

        assertEquals("abc", FmtUtils.stringForObject("abc")) ;
    }

    @Test
    public void stringForRDFNode_literal() {
        assertEquals("<n1>", stringForRDFNode(new LiteralImpl(aNode(), null))) ;
    }
View Full Code Here

        // Best way.
        if ( model != null )
             return model.asRDFNode(n) ;
       
        if ( n.isLiteral() )
            return new LiteralImpl(n, null) ;
               
        if ( n.isURI() || n.isBlank() )
            return new ResourceImpl(n, null) ;
       
        throw new ARQInternalErrorException("Unknown node type for node: "+n) ;
View Full Code Here

        // Best way.
        if ( model != null )
             return model.asRDFNode(n) ;
       
        if ( n.isLiteral() )
            return new LiteralImpl(n, null) ;
               
        if ( n.isURI() || n.isBlank() )
            return new ResourceImpl(n, null) ;
       
        throw new ARQInternalErrorException("Unknown node type for node: "+n) ;
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.rdf.model.impl.LiteralImpl

Copyright © 2018 www.massapicom. 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.