Package com.hp.hpl.jena.shared

Examples of com.hp.hpl.jena.shared.PrefixMapping


    public Prologue sub(String base) { return sub(null, base) ; }
   
    public Prologue sub(PrefixMapping newMappings, String base)
    {
        // New prefix mappings
        PrefixMapping ext = getPrefixMapping() ;
        if ( newMappings != null )
            ext = new PrefixMapping2(ext, newMappings) ;
        // New base.
        IRIResolver r = resolver ;
        if ( base != null )
View Full Code Here


    {
        try {
            if ( dataset != null )
            {
                // Load the models prefixes first
                PrefixMapping m = dataset.getDefaultModel() ;
                model.setNsPrefixes(m) ;
            }
            // Then add the queries (just the declared mappings)
            // so the query declarations override the data sources.
            model.setNsPrefixes(query.getPrefixMapping()) ;
View Full Code Here

            return ;
        }
       
        if ( isPrefix )
        {
            PrefixMapping newMappings = BuilderPrefixMapping.build(item) ;
            prologue = prologue.sub(newMappings) ;
            // Remember first prefix mapping seen.
            if( topMap == null )
                topMap = newMappings ;
            return ;
View Full Code Here

         default implementation will display all the triples exposed by the graph (ie
         including reification triples if it is Standard).
    */
    public static String toString( String prefix, Graph that )
        {
        PrefixMapping pm = that.getPrefixMapping();
    StringBuffer b = new StringBuffer( prefix + " {" );
    int count = 0;
    String gap = "";
    ClosableIterator<Triple> it = GraphUtil.findAll( that );
    while (it.hasNext() && count < TOSTRING_TRIPLE_LIMIT)
View Full Code Here

        this.resolver = other.resolver ;
    }

    public Prologue copy()
    {
        PrefixMapping prefixMap = new PrefixMappingImpl() ;
        prefixMap.setNsPrefixes(this.prefixMap) ;
        return new Prologue(prefixMap, resolver.getBaseIRI()) ;
    }
View Full Code Here

    public Prologue sub(String base) { return sub(null, base) ; }
   
    public Prologue sub(PrefixMapping newMappings, String base)
    {
        // New prefix mappings
        PrefixMapping ext = getPrefixMapping() ;
        if ( newMappings != null )
            ext = new PrefixMapping2(ext, newMappings) ;
        // New base.
        IRIResolver r = resolver ;
        if ( base != null )
View Full Code Here

    /** Return a PrefixMapping for a named graph */
    @Override
    public PrefixMapping getPrefixMapping(String graphName)
    {
        PrefixMapping pm = new GraphPrefixesProjection(graphName, this) ;
        // Force into cache.
        // See JENA-81
        pm.getNsPrefixMap() ;
        return pm ;
    }
View Full Code Here

public class BuilderPrefixMapping
{
    public static PrefixMapping build(Item elt)
    {
        PrefixMapping pmap = new PrefixMappingImpl() ;
        build(pmap, elt) ;
        return pmap ;
    }
View Full Code Here

public class AssemblerUtils
{
    // Wrappers for reading things form a file - assumes one of the thing per file.
    public static PrefixMapping readPrefixMapping(String file)
    {
        PrefixMapping pm = (PrefixMapping)AssemblerUtils.build(file, JA.PrefixMapping) ;
        return pm ;
    }
View Full Code Here

    {
        try {
            if ( dataset != null )
            {
                // Load the models prefixes first
                PrefixMapping m = dataset.getDefaultModel() ;
                model.setNsPrefixes(m) ;
            }
            // Then add the queries (just the declared mappings)
            // so the query declarations override the data sources.
            model.setNsPrefixes(query.getPrefixMapping()) ;
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.shared.PrefixMapping

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.