Tabnine Logo
PrefixMapping.removeNsPrefix
Code IndexAdd Tabnine to your IDE (free)

How to use
removeNsPrefix
method
in
com.hp.hpl.jena.shared.PrefixMapping

Best Java code snippets using com.hp.hpl.jena.shared.PrefixMapping.removeNsPrefix (Showing top 10 results out of 315)

origin: org.apache.clerezza.ext/org.apache.jena.jena-core

/**
 * Remove a registered prefix from the table of known short forms
 */
public static void removePrefix(String prefix) {
  prefixMapping.removeNsPrefix(prefix);
}

origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
public PrefixMapping removeNsPrefix(String prefix) {
  return this.prefixes.removeNsPrefix(prefix);
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

/**
 * 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() );
  }
}

origin: com.hp.hpl.jena/arq

/** @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 ;
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

/**
 * 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" );
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

@Override
public PrefixMapping removeNsPrefix( String prefix )
{
  getPrefixMapping().removeNsPrefix( prefix );
  return this;
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

/** @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 ;
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

@Override public PrefixMapping removeNsPrefix( String prefix )
  {
  checkUnlocked();
  getBaseMapping().removeNsPrefix( prefix );
  return this;
  }
  
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

/** 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) ;
  }
}   
origin: com.hp.hpl.jena/arq

/** 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) ;
  }
}   
com.hp.hpl.jena.sharedPrefixMappingremoveNsPrefix

Javadoc

Remove any existing maplet with the given prefix name and answer this mapping. If the prefix is the empty string, then this removes the default namespace. If the prefix is not a legal prefix string, or is not present in the mapping, nothing happens.

The reverse URI-to-prefix mapping is updated, but if there are multiple prefixes for the removed URI it is unspecified which of them will be chosen.

Popular methods of PrefixMapping

  • getNsPrefixMap
    Return a copy of the internal mapping from names to URI strings. Updating this copy will have no eff
  • setNsPrefix
    Specify the prefix name for a URI prefix string. Any existing use of that prefix name is overwritten
  • getNsPrefixURI
    Get the URI bound to a specific prefix, null if there isn't one.
  • setNsPrefixes
    Copies the prefix mapping from other into this. Illegal prefix mappings are detected. Existing binds
  • getNsURIPrefix
    Answer the prefix for the given URI, or null if there isn't one. If there is more than one, one of t
  • qnameFor
    Answer a qname with the expansion of the given uri, or null if no such qname can be constructed usin
  • expandPrefix
    Expand the uri using the prefix mappings if possible. If prefixed has the form Foo:Bar, and Foo is a
  • samePrefixMappingAs
    Answer true iff this prefix-mappings are equal, that is, map the same prefixes to the same URIs; sam
  • shortForm
    Compress the URI using the prefix mappings if possible. If there is a prefix mapping Name -> URIStar
  • lock
    Lock the PrefixMapping so that changes can no longer be made to it. Primarily intended to lock Stand
  • withDefaultMappings
    Update this PrefixMapping with the bindings in map, only adding those (p, u) pairs for which neither
  • withDefaultMappings

Popular in Java

  • Creating JSON documents from java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • getSupportFragmentManager (FragmentActivity)
  • findViewById (Activity)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now