Tabnine Logo
PrefixMapping2.getLocalPrefixMapping
Code IndexAdd Tabnine to your IDE (free)

How to use
getLocalPrefixMapping
method
in
org.apache.jena.sparql.util.PrefixMapping2

Best Java code snippets using org.apache.jena.sparql.util.PrefixMapping2.getLocalPrefixMapping (Showing top 8 results out of 315)

origin: dice-group/NLIWOD

  @Override
  public String toString() {
    return "LocalMapping: " + super.getLocalPrefixMapping().toString();
  }
}
origin: apache/jena

/** Clear the local prefix map, but leave the immutable global one alone */
@Override
public PrefixMapping clearNsPrefixMap() {
  getLocalPrefixMapping().clearNsPrefixMap() ;
  return this ;
}
origin: dice-group/NLIWOD

@Override
public PrefixMapping removeNsPrefix(final String prefix) {
  super.getLocalPrefixMapping().removeNsPrefix(prefix);
  return this;
}
origin: dice-group/NLIWOD

@Override
public String getNsPrefixURI(final String prefix) {
  String s = super.getLocalPrefixMapping().getNsPrefixURI(prefix);
  if (s != null) {
    return s;
  }
  PrefixMapping pmapGlobal = super.getGlobalPrefixMapping();
  s = pmapGlobal.getNsPrefixURI(prefix);
  if (s != null) {
    super.getLocalPrefixMapping().setNsPrefix(prefix, s);
    return s;
  }
  return null;
}
origin: dice-group/NLIWOD

@Override
public String getNsURIPrefix(final String uri) {
  String s = super.getLocalPrefixMapping().getNsURIPrefix(uri);
  if (s != null) {
    return s;
  }
  PrefixMapping pmapGlobal = super.getGlobalPrefixMapping();
  if (pmapGlobal == null) {
    return null;
  }
  if (pmapGlobal != null) {
    s = pmapGlobal.getNsURIPrefix(uri);
  }
  super.getLocalPrefixMapping().setNsPrefix(s, uri);
  return null;
}
origin: dice-group/NLIWOD

@Override
public String expandPrefix(final String prefixed) {
  String s = super.getLocalPrefixMapping().expandPrefix(prefixed);
  PrefixMapping pmapGlobal = super.getGlobalPrefixMapping();
  if (pmapGlobal == null) {
    return s;
  }
  if (s == null || s.equals(prefixed)) {
    if (pmapGlobal != null) {
      s = pmapGlobal.expandPrefix(prefixed);
    }
    if (s != null) {
      int colon = prefixed.indexOf(':');
      String prefix = prefixed.substring(0, colon);
      String uri = pmapGlobal.getNsPrefixURI(prefix);
      super.getLocalPrefixMapping().setNsPrefix(prefix, uri);
    }
  }
  return s;
}
origin: dice-group/NLIWOD

/** @see org.apache.jena.shared.PrefixMapping#shortForm(java.lang.String) */
@Override
public String shortForm(final String uri) {
  PrefixMapping pmapLocal = super.getLocalPrefixMapping();
  PrefixMapping pmapGlobal = super.getGlobalPrefixMapping();
  String s = pmapLocal.shortForm(uri);
  if (pmapGlobal == null) {
    return s;
  }
  if (s == null || s.equals(uri)) {
    s = pmapGlobal.shortForm(uri);
    if (s != null && !s.equals(uri)) {
      boolean b = false;
      try {
        b = (boolean) checkValidPrefixMethod.invoke(null, s);
      } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
      if (b) {
        String prefix = s.substring(0, s.indexOf(":"));
        pmapLocal.setNsPrefix(prefix, pmapGlobal.getNsPrefixURI(prefix));
      }
    }
  }
  return s;
}
origin: dice-group/NLIWOD

/** @see org.apache.jena.shared.PrefixMapping#qnameFor(java.lang.String) */
@Override
public String qnameFor(final String uri) {
  PrefixMapping pmapLocal = super.getLocalPrefixMapping();
  PrefixMapping pmapGlobal = super.getGlobalPrefixMapping();
  String s = pmapLocal.qnameFor(uri);
  if (s != null) {
    return s;
  }
  if (pmapGlobal != null) {
    s = pmapGlobal.qnameFor(uri);
    if (s != null) {
      boolean b = false;
      try {
        b = (boolean) checkValidPrefixMethod.invoke(null, s);
      } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
      if (b) {
        String prefix = s.substring(0, s.indexOf(":"));
        pmapLocal.setNsPrefix(prefix, pmapGlobal.getNsPrefixURI(prefix));
      }
    }
  }
  return s;
}
org.apache.jena.sparql.utilPrefixMapping2getLocalPrefixMapping

Popular methods of PrefixMapping2

  • <init>
  • getNsPrefixMap
  • setNsPrefix
  • getGlobalPrefixMapping
  • getNsPrefixURI
  • getNsURIPrefix

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • onRequestPermissionsResult (Fragment)
  • notifyDataSetChanged (ArrayAdapter)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • JLabel (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • CodeWhisperer alternatives
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