Package org.openjena.riot.system

Examples of org.openjena.riot.system.PrefixMap


   
    static ParserProfile profile()
    {
        // TODO
        // Don't do anything with IRIs.
        Prologue prologue = new Prologue(new PrefixMap(), IRIResolver.createNoResolve()) ;
        ErrorHandler handler = ErrorHandlerFactory.getDefaultErrorHandler() ;
        ParserProfile profile = new ParserProfileBase(prologue, handler) ;
        profile.setLabelToNode(LabelToNode.createUseLabelAsGiven()) ;
        // Include safe bNode labels.
        return profile ;
View Full Code Here


{
    static IRIFactory factory = IRIFactory.iriImplementation() ;
   
    @Test public void prefixMap1()
    {
        PrefixMap pmap = new PrefixMap() ;
        add(pmap, "", "http://example/") ;
        String x = pmap.expand("", "x") ;
        assertEquals("http://example/x", x) ;
    }
View Full Code Here

        assertEquals("http://example/x", x) ;
    }

    @Test public void prefixMap2()
    {
        PrefixMap pmap = new PrefixMap() ;
        add(pmap, "ex", "http://example/") ;
        String x = pmap.expand("", "x") ;
        assertNull(x) ;
    }
View Full Code Here

        assertNull(x) ;
    }
   
    @Test public void prefixMap3()
    {
        PrefixMap pmap = new PrefixMap() ;
        add(pmap, "ex", "http://example/") ;
        add(pmap, "ex", "http://elsewhere/ns#") ;
        String x = pmap.expand("ex", "x") ;
        assertEquals("http://elsewhere/ns#x", x) ;
    }
View Full Code Here

   
    private static void printIRI(Writer out, String iriStr, Prologue prologue)
    {
        if ( prologue != null )
        {
            PrefixMap pmap = prologue.getPrefixMap() ;
            if pmap != null )
            {
                String pname = prefixFor(iriStr, pmap) ;
                if ( pname != null )
                {
View Full Code Here

   
   public NodeFormatterTTL(String baseIRI , PrefixMap prefixMap) //OutputPolicy outputPolicy)
   {
       super(false) ;
       if ( prefixMap == null )
           prefixMap = new PrefixMap() ;
       this.prefixMap = prefixMap ;
       this.baseIRI = baseIRI ;
   }
View Full Code Here

   
    static ParserProfile profile()
    {
        // TODO
        // Don't do anything with IRIs.
        Prologue prologue = new Prologue(new PrefixMap(), IRIResolver.createNoResolve()) ;
        ErrorHandler handler = ErrorHandlerFactory.errorHandlerStd ;
        ParserProfile profile = new ParserProfileBase(prologue, handler) ;
        profile.setLabelToNode(LabelToNode.createUseLabelAsGiven()) ;
        // Include safe bNode labels.
        return profile ;
View Full Code Here

   
   public NodeFormatterTTL(String baseIRI , PrefixMap prefixMap) //OutputPolicy outputPolicy)
   {
       super(false) ;
       if ( prefixMap == null )
           prefixMap = new PrefixMap() ;
       this.prefixMap = prefixMap ;
       this.baseIRI = baseIRI ;
   }
View Full Code Here

   
    private static void printIRI(Writer out, String iriStr, Prologue prologue)
    {
        if ( prologue != null )
        {
            PrefixMap pmap = prologue.getPrefixMap() ;
            if pmap != null )
            {
                String pname = prefixFor(iriStr, pmap) ;
                if ( pname != null )
                {
View Full Code Here

   
    static ParserProfile profile()
    {
        // TODO
        // Don't do anything with IRIs.
        Prologue prologue = new Prologue(new PrefixMap(), IRIResolver.createNoResolve()) ;
        ErrorHandler handler = ErrorHandlerFactory.errorHandlerStd ;
        ParserProfile profile = new ParserProfileBase(prologue, handler) ;
        profile.setLabelToNode(LabelToNode.createUseLabelAsGiven()) ;
        // Include safe bNode labels.
        return profile ;
View Full Code Here

TOP

Related Classes of org.openjena.riot.system.PrefixMap

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.