congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
PrefixMapping2.getGlobalPrefixMapping
Code IndexAdd Tabnine to your IDE (free)

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

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

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;
}
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

@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;
}
org.apache.jena.sparql.utilPrefixMapping2getGlobalPrefixMapping

Popular methods of PrefixMapping2

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

Popular in Java

  • Finding current android device location
  • getContentResolver (Context)
  • putExtra (Intent)
  • startActivity (Activity)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JCheckBox (javax.swing)
  • JTable (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top Vim 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