/** * Remove a registered prefix from the table of known short forms */ public static void removePrefix(String prefix) { prefixMapping.removeNsPrefix(prefix); }
/** * Remove a registered prefix from the table of known short forms */ public static void removePrefix(String prefix) { prefixMapping.removeNsPrefix(prefix); }
/** * Remove a set of prefix mappings from the table of known short forms */ public static void removePrefixMap(Map<String, String> map) { for ( String s : map.keySet() ) { prefixMapping.removeNsPrefix( s ); } }
/** * Remove a set of prefix mappings from the table of known short forms */ public static void removePrefixMap(Map<String, String> map) { for ( String s : map.keySet() ) { prefixMapping.removeNsPrefix( s ); } }
/** * 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" ); }
/** @see org.apache.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 Model removeNsPrefix( String prefix ) { getPrefixMapping().removeNsPrefix( prefix ); 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 Model removeNsPrefix( String prefix ) { getPrefixMapping().removeNsPrefix( prefix ); return this; }
@Override public PrefixMapping removeNsPrefix( String prefix ) { checkUnlocked(); getBaseMapping().removeNsPrefix( prefix ); return this; }
@Override public PrefixMapping removeNsPrefix( String prefix ) { checkUnlocked(); getBaseMapping().removeNsPrefix( prefix ); return this; }
@Override public SecuredPrefixMapping removeNsPrefix(final String prefix) throws UpdateDeniedException, AuthenticationRequiredException { checkUpdate(); holder.getBaseItem().removeNsPrefix(prefix); return holder.getSecuredItem(); }
@Override protected void remove(String prefix) { dps().getPrefixMapping().removeNsPrefix(prefix); super.remove(prefix); }
@BeforeClass public static void beforeClass() { original = SSE.getPrefixMapRead() ; PrefixMapping pmaptest = new PrefixMappingImpl() .setNsPrefixes(original) .removeNsPrefix("") .removeNsPrefix("ex") ; }
private void removeTarqlPrefix() { if (tarql.NS.equals(result.getPrologue().getPrefix("tarql"))) { PrefixMapping prefixes = new PrefixMappingImpl(); prefixes.setNsPrefixes(result.getPrologue().getPrefixMapping()); prefixes.removeNsPrefix("tarql"); result.getPrologue().setPrefixMapping(prefixes); } } }
protected static void stripNamespacesAndBase(Query q) { Map<String, String> prefixes = q.getPrefixMapping().getNsPrefixMap(); for (String prefix : prefixes.keySet()) { q.getPrefixMapping().removeNsPrefix(prefix); } q.setBaseURI((String)null); } }
public void testSecondPrefixDeletedUncoversPreviousMap() { PrefixMapping A = getMapping(); A.setNsPrefix( "x", crispURI ); A.setNsPrefix( "y", crispURI ); A.removeNsPrefix( "y" ); assertEquals( "x", A.getNsURIPrefix( crispURI ) ); }
public void testReturnsSelf() { PrefixMapping A = getMapping(); assertSame( A, A.setNsPrefix( "crisp", crispURI ) ); assertSame( A, A.setNsPrefixes( A ) ); assertSame( A, A.setNsPrefixes( new HashMap<String, String>() ) ); assertSame( A, A.removeNsPrefix( "rhubarb" ) ); }
public void testRemovePrefix() { String hURI = "http://test.remove.prefixes/prefix#"; String bURI = "http://other.test.remove.prefixes/prefix#"; PrefixMapping A = getMapping(); A.setNsPrefix( "hr", hURI ); A.setNsPrefix( "br", bURI ); A.removeNsPrefix( "hr" ); assertEquals( null, A.getNsPrefixURI( "hr" ) ); assertEquals( bURI, A.getNsPrefixURI( "br" ) ); }
public void testRemovePrefix() { String hURI = "http://test.remove.prefixes/prefix#"; String bURI = "http://other.test.remove.prefixes/prefix#"; PrefixMapping A = getMapping(); A.setNsPrefix( "hr", hURI ); A.setNsPrefix( "br", bURI ); A.removeNsPrefix( "hr" ); assertEquals( null, A.getNsPrefixURI( "hr" ) ); assertEquals( bURI, A.getNsPrefixURI( "br" ) ); }