/** * Remove a registered prefix from the table of known short forms */ public static void removePrefix(String prefix) { prefixMapping.removeNsPrefix(prefix); }
@Override public PrefixMapping removeNsPrefix(String prefix) { return this.prefixes.removeNsPrefix(prefix); }
/** * Remove a set of prefix mappings from the table of known short forms */ public static void removePrefixMap(Map<String, String> map) { for(Iterator<String> i = map.keySet().iterator(); i.hasNext(); ) { prefixMapping.removeNsPrefix( i.next() ); } }
/** @see com.hp.hpl.jena.shared.PrefixMapping#removeNsPrefix(java.lang.String) */ public PrefixMapping removeNsPrefix(String prefix) { pmapLocal.removeNsPrefix(prefix) ; if ( pmapGlobal != null && pmapGlobal.getNsPrefixURI(prefix) != null ) throw new UnsupportedOperationException("PrefixMapping2: prefix '"+prefix+"' in the immutable 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" ); }
@Override public PrefixMapping removeNsPrefix( String prefix ) { getPrefixMapping().removeNsPrefix( prefix ); return this; }
/** @see com.hp.hpl.jena.shared.PrefixMapping#removeNsPrefix(java.lang.String) */ @Override public PrefixMapping removeNsPrefix(String prefix) { pmapLocal.removeNsPrefix(prefix) ; if ( pmapGlobal != null && pmapGlobal.getNsPrefixURI(prefix) != null ) throw new UnsupportedOperationException("PrefixMapping2: prefix '"+prefix+"' in the immutable map") ; return this ; }
@Override public PrefixMapping removeNsPrefix( String prefix ) { checkUnlocked(); getBaseMapping().removeNsPrefix( prefix ); return this; }
/** Set a prefix for this query */ public void setPrefix(String prefix, String expansion) { try { // Removal may involve regeneration of the reverse mapping // so only do if needed. String oldExpansion = prefixMap.getNsPrefixURI(prefix) ; if ( Lib.equal(oldExpansion, expansion) ) return ; if ( oldExpansion != null ) prefixMap.removeNsPrefix(prefix) ; prefixMap.setNsPrefix(prefix, expansion) ; } catch (PrefixMapping.IllegalPrefixException ex) { Log.warn(this, "Illegal prefix mapping(ignored): "+prefix+"=>"+expansion) ; } }
/** Set a prefix for this query */ public void setPrefix(String prefix, String expansion) { try { // Removal may involve regeneration of the reverse mapping // so only do if needed. String oldExpansion = prefixMap.getNsPrefixURI(prefix) ; if ( Lib.equal(oldExpansion, expansion) ) return ; if ( oldExpansion != null ) prefixMap.removeNsPrefix(prefix) ; prefixMap.setNsPrefix(prefix, expansion) ; } catch (PrefixMapping.IllegalPrefixException ex) { Log.warn(this, "Illegal prefix mapping(ignored): "+prefix+"=>"+expansion) ; } }