/** * Register a set of prefix to namespace mappings with the parser */ public void registerPrefixMap(Map<String, String> map) { prefixMapping.setNsPrefixes(map); }
/** @see com.hp.hpl.jena.shared.PrefixMapping#setNsPrefixes(com.hp.hpl.jena.shared.PrefixMapping) */ @Override public PrefixMapping setNsPrefixes(PrefixMapping other) { pmapLocal.setNsPrefixes(other) ; return this ; }
/** @see com.hp.hpl.jena.shared.PrefixMapping#setNsPrefixes(java.util.Map) */ @Override public PrefixMapping setNsPrefixes(Map<String, String> map) { pmapLocal.setNsPrefixes(map) ; return this; }
/** @see com.hp.hpl.jena.shared.PrefixMapping#setNsPrefixes(java.util.Map) */ public PrefixMapping setNsPrefixes(Map<String, String> map) { pmapLocal.setNsPrefixes(map) ; return this; }
/** @see com.hp.hpl.jena.shared.PrefixMapping#setNsPrefixes(com.hp.hpl.jena.shared.PrefixMapping) */ public PrefixMapping setNsPrefixes(PrefixMapping other) { pmapLocal.setNsPrefixes(other) ; return this ; }
/** * Register a set of new prefix/namespace mapping which will be used to shorten * the print strings for resources in known namespaces. */ public static void registerPrefixMap(Map<String, String> map) { prefixMapping.setNsPrefixes( map ); }
@Override public PrefixMapping setNsPrefixes(PrefixMapping other) { return this.prefixes.setNsPrefixes(other); }
@Override public PrefixMapping setNsPrefixes(Map<String, String> map) { return this.prefixes.setNsPrefixes(map); }
@Override public PrefixMapping setNsPrefixes( PrefixMapping pm ) { getPrefixMapping().setNsPrefixes( pm ); return this; }
@Override public PrefixMapping setNsPrefixes( Map<String, String> map ) { getPrefixMapping().setNsPrefixes( map ); return this; }
/** * Set the default prefix mappings. */ protected void setDefaultPrefixMappings() { m_prefixMap.setNsPrefixes( PrefixMapping.Standard ); // PrefixMapping.Standard includes dc:, which OntModels traditionally haven't included m_prefixMap.removeNsPrefix( "dc" ); }
public JSONPropertyNaming(PrefixMapping given) { this.pm = PrefixMapping.Factory.create() .setNsPrefixes( given ) // .withDefaultMappings( Prefixes.various ) ; }
/** When the graph is constructed, copy the prefix mappings of both components into this prefix mapping. The prefix mapping doesn't change afterwards with the components, which might be regarded as a bug. */ public Dyadic( Graph L, Graph R ) { this.L = L; this.R = R; getPrefixMapping() .setNsPrefixes( L.getPrefixMapping() ) .setNsPrefixes( R.getPrefixMapping() ) ; }
/** Add the bindings in the map to our own. This will fail with a ClassCastException if any key or value is not a String; we make no guarantees about order or completeness if this happens. It will fail with an IllegalPrefixException if any prefix is illegal; similar provisos apply. @param other the Map whose bindings we are to add to this. */ @Override public PrefixMapping setNsPrefixes( Map<String, String> other ) { checkUnlocked(); getBaseMapping().setNsPrefixes( other ); return this; }
public Prologue copy() { PrefixMapping prefixMap = new PrefixMappingImpl() ; prefixMap.setNsPrefixes(this.prefixMap) ; return new Prologue(prefixMap, resolver.getBaseIRI()) ; }
public Prologue copy() { PrefixMapping prefixMap = new PrefixMappingImpl() ; prefixMap.setNsPrefixes(this.prefixMap) ; return new Prologue(prefixMap, resolver.getBaseIRI()) ; }
@Override protected PrefixMapping createPrefixMapping() { PrefixMapping pmap = new PrefixMappingImpl() ; for ( Node gn : graphs ) { if ( ! gn.isURI() ) continue ; Graph g = dataset.getGraph(gn) ; PrefixMapping pmapNamedGraph = g.getPrefixMapping() ; pmap.setNsPrefixes(pmapNamedGraph) ; } return pmap ; }
private static void includePrefixesFor( Assembler a, Resource root, PrefixMapping result, Property includeUsing ) { for (StmtIterator it = root.listProperties( includeUsing ); it.hasNext();) { Statement s = it.nextStatement(); PrefixMapping sub = (PrefixMapping) a.open( getResource( s ) ); result.setNsPrefixes( sub ); } }
private PrefixMapping prefixes( APIResultSet rs ) { return PrefixMapping.Factory.create() .setNsPrefixes(rs.getMergedModel()) .setNsPrefixes( PrefixMapping.Extended ) .setNsPrefix( "terms", "http://purl.org/dc/terms/" ) .setNsPrefix( "dum", "http://dummy/doc/schools" ) .setNsPrefix( "dumx", "http://dummy//doc/schools" ) ; }
/** Answer the full model of <code>m</code>, with all its imports included and with the necessary properties added from the JA schema. However, if the magic footprint triple (ja:this, rdf:type, ja:Expanded) is present in the model, it is returned unchanged. Imports are managed by <code>im</code>. */ public static Model fullModel( ImportManager im, Model m ) { return m.contains( JA.This, RDF.type, JA.Expanded ) ? m : (Model) ModelExpansion.withSchema( im.withImports( m ), JA.getSchema() ) .add( JA.This, RDF.type, JA.Expanded ) .setNsPrefixes( PrefixMapping.Extended ) .setNsPrefixes( m ) ; }