Package com.hp.hpl.jena.sparql.util

Examples of com.hp.hpl.jena.sparql.util.Symbol


    }

    @Override
    public Object setProperty(String propName, Object propValue)
    {
        Symbol sym = Symbol.create(basename+propName) ;
        Object oldObj = context.get(sym) ;
        return oldObj ;
    }
View Full Code Here


            String symbolName = frags[0];
            String value = frags[1];

            // Make it a long name.
            symbolName = MappingRegistry.mapPrefixName( symbolName );
            Symbol symbol = Symbol.create( symbolName );
            context.set( symbol, value );
        }
       
        ARQ.getContext().putAll(context) ;
    }
View Full Code Here

    public static Syntax make(String uri)
    {
        if ( uri == null )
            return null ;
       
        Symbol sym = Symbol.create(uri) ;
       
        if ( sym.equals(syntaxARQ) )         return syntaxARQ ;
       
        if ( sym.equals(syntaxSPARQL) )      return syntaxSPARQL ;
        if ( sym.equals(syntaxSPARQL_10) )   return syntaxSPARQL_10 ;
        if ( sym.equals(syntaxSPARQL_11) )   return syntaxSPARQL_11 ;
        if ( sym.equals(syntaxAlgebra) )     return syntaxAlgebra ;
        return null ;
    }
View Full Code Here

        {
            QuerySolution soln = rs.next() ;
            String name = soln.getLiteral("name").getLexicalForm() ;
            String value = soln.getLiteral("value").getLexicalForm() // Works for numbers as well!
            name = MappingRegistry.mapPrefixName(name) ;
            Symbol symbol = Symbol.create(name) ;
            if ( "undef".equalsIgnoreCase(value) )
                context.remove(symbol) ;
            else
                context.set(symbol, value) ;
        }
View Full Code Here

            String symbolName = frags[0] ;
            String value = frags[1] ;

            // Make it a long name.
            symbolName = MappingRegistry.mapPrefixName(symbolName) ;
            Symbol symbol = Symbol.create(symbolName) ;
            context.set(symbol, value) ;
        }
       
        ARQ.getContext().putAll(context) ;
    }
View Full Code Here

   
    public void verbose(IndentedWriter out)
    {
        for ( Iterator<Symbol> iter = context.keys().iterator() ; iter.hasNext() ; )
        {
            Symbol symbol = iter.next();
            String value = context.getAsString(symbol) ;
            out.println(symbol+" -> "+value) ;
        }
    }
View Full Code Here

    public static Syntax make(String uri)
    {
        if ( uri == null )
            return null ;
       
        Symbol sym = Symbol.create(uri) ;
       
        if ( sym.equals(syntaxARQ) )         return syntaxARQ ;
       
        if ( sym.equals(syntaxSPARQL) )      return syntaxSPARQL ;
        if ( sym.equals(syntaxSPARQL_10) )   return syntaxSPARQL_10 ;
        if ( sym.equals(syntaxSPARQL_11) )   return syntaxSPARQL_11 ;
        if ( sym.equals(syntaxAlgebra) )     return syntaxAlgebra ;
        return null ;
    }
View Full Code Here

                if ( ! keyStr.startsWith(SystemTDB.symbolNamespace) )
                    continue ;
               
                Object value = properties.get(key) ;
               
                Symbol symbol = Symbol.create(keyStr) ;
               
                context.set(symbol, value) ;
            }
        }
        return context ;
View Full Code Here

    public Object open(Assembler a, Resource root, Mode mode)
    {
        Resource r = getResourceValue(root, pSetting ) ;
        String k = getAsStringValue(r, pName) ;
        String v = getAsStringValue(r, pValue) ;
        Symbol symbol = Symbol.create(k) ;
        ARQ.getContext().set(symbol, v) ;
        return r ;
    }
View Full Code Here

    { RDFDataMgr.read(model, url, RDFLanguages.nameToLang(hintlang)) ; }

    @Override
    public Object setProperty(String propName, Object propValue)
    {
        Symbol sym = Symbol.create(base+propName) ;
        Object oldObj = context.get(sym) ;
        return oldObj ;
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.util.Symbol

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.