Prints the short form of the predicate (by omitting the complete URI and
replacing it by a prefix name).
766172
private static String getAbbreviatedName(String uri, PrefixManager pm, boolean insideQuotes) {
        return pm.getShortForm(uri, insideQuotes);
    }
599704
private static String getProperPrefixURI(String prefixUri) {
		if (!prefixUri.endsWith("#")) {
			if (!prefixUri.endsWith("/")) {
				String defaultSeparator = EntityCreationPreferences.getDefaultSeparator();
				if (!prefixUri.endsWith(defaultSeparator))  {
					prefixUri += defaultSeparator;
				}
			}
		}
		return prefixUri;
	}
940090
private String queryPlaceholder(int length) {
        StringBuilder sb = new StringBuilder(length * 2 + 1);
        sb.append("(?");
        for (int i = 1; i < length; i++) {
            sb.append(",?");
        }
        sb.append(")");
        return sb.toString();
    }
1369425
private void writePrefixDeclaration(BufferedWriter writer) throws IOException {
        final ImmutableMap<String, String> prefixMap = ppMapping.getMetadata().getPrefixManager().getPrefixMap();

        if (prefixMap.size() == 0) {
            return; // do nothing if there is no prefixes to write
        }

        writer.write(OntopNativeMappingParser.PREFIX_DECLARATION_TAG);
        writer.write("\n");
        for (String prefix : prefixMap.keySet()) {
            String uri = prefixMap.get(prefix);
            writer.write(prefix + (prefix.length() >= 9 ? "\t" : "\t\t") + uri + "\n");
        }
        writer.write("\n");
    }
775156
private StringBuffer toQueryPrefixNoSelect(String t) {

        StringBuffer sb = new StringBuffer(255);

        return sb.append(t).append(whereTrue);
    }
426996
public static String shortenUrl( URI uri )
    {
        return uri.getScheme() + "://" + uri.getHost() + uri.getPath();
    }
1050356
def to_string_short(self):
        
        if hasattr(self, 'constrained_by') and len(self.constrained_by) > 0:
            return "* {:>30}: {}".format(self.uniquetwig_trunc, self.get_quantity() if hasattr(self, 'quantity') else self.get_value())
        else:
            return "{:>32}: {}".format(self.uniquetwig_trunc, self.get_quantity() if hasattr(self, 'quantity') else self.get_value())
154797
String getSuffix(URI uri) {

        String fragment = uri.getFragment();
        if (fragment != null) {
            fragment = "#" + fragment;
        } else {
            fragment = "";
        }

        String query = uri.getRawQuery();
        if (query != null) {
            query = "?" + query;
        } else {
            query = "";
        }
        return query.concat(fragment);
    }
1039514
public static String print(short version) {
        int major=(version & MAJOR_MASK) >> MAJOR_SHIFT;
        int minor=(version & MINOR_MASK) >> MINOR_SHIFT;
        int micro=(version & MICRO_MASK);
        return major + "." + minor + "." + micro;
    }
545482
private void beforeName() throws IOException {
    int context = peek();
    if (context == NONEMPTY_OBJECT) { // first in object
      out.write(',');
    } else if (context != EMPTY_OBJECT) { // not in an object!
      throw new IllegalStateException("Nesting problem.");
    }
    newline();
    replaceTop(DANGLING_NAME);
  }
89921
def short_str(self):
        
        if self.version is None and self.url is None:
            return ''
        return '%s <%s>' % (self.version, self.url)
850928
def _prepend_name_prefix(self, name):
        """"""
        if not self.name_prefix:
            return name
        base = self.name_prefix
        if base[0] != '/':
            base = '/' + base
        if name[0] != '/':
            name = '/' + name
        return base + name
1126849
private static String formURI(String base, String append) {
        base = stripTrailingSlash(base);
        append = stripStartingSlash(append);
        if (append.startsWith("..")) {
            final String[] parts = append.split("/");
            for (final String part : parts) {
                if ("..".equals(part)) {
                    final int last = base.lastIndexOf("/");
                    if (last != -1) {
                        base = base.substring(0, last);
                        append = append.substring(3, append.length());
                    } else {
                        break;
                    }
                }
            }
        }
        return base + "/" + append;
    }
1175980
def print_context_names(ctx, param, value):
    """"""
    if not value or ctx.resilient_parsing:
        return
    click.echo('\n'.join(_context_names()))
    ctx.exit()
382868
def prefix_fragment(self, nid):
        
        sep=':'
        if nid.startswith('http'):
            if '#' in nid:
               sep='#'
            else:
                sep='/'
        parts = nid.split(sep)
        frag = parts.pop()
        prefix = sep.join(parts)
        return prefix, frag
952063
String prefix(String s) {
         return prefix(s, feedback.getPre(), feedback.getPost());
    }
1347472
private static void printUsage() {
		System.out.println();
		System.out.println("USAGE");
		System.out.println();
		System.out.println("\t[" + ARGUMENT_PREFIX + ARGUMENT_COMPRESS_FORMAT
				+ " compress_format] [" + ARGUMENT_PREFIX
				+ ARGUMENT_COMPRESS_QUALITY + " compress_quality] ["
				+ ARGUMENT_PREFIX + ARGUMENT_GOOGLE_TILES + "] ["
				+ ARGUMENT_PREFIX + ARGUMENT_BOUNDING_BOX
				+ " minLon,minLat,maxLon,maxLat] [" + ARGUMENT_PREFIX
				+ ARGUMENT_EPSG + " epsg] [" + ARGUMENT_PREFIX
				+ ARGUMENT_URL_EPSG + " url_epsg] [" + ARGUMENT_PREFIX
				+ ARGUMENT_TMS
				+ "] geopackage_file tile_table url min_zoom max_zoom");
		System.out.println();
		System.out.println("DESCRIPTION");
		System.out.println();
		System.out
				.println("\tGenerates tiles into a GeoPackage tile table by requesting them from a URL");
		System.out.println();
		System.out.println("ARGUMENTS");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_COMPRESS_FORMAT
				+ " compress_format");
		System.out
				.println("\t\tTile compression image format: png, jpg, jpeg (default is no compression, native format)");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_COMPRESS_QUALITY
				+ " compress_quality");
		System.out
				.println("\t\tTile compression image quality between 0.0 and 1.0 (not valid for png, default is 1.0)");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_GOOGLE_TILES);
		System.out
				.println("\t\tGenerate tiles in Google tile format (default is GeoPackage format with minimum bounds)");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_BOUNDING_BOX
				+ " minLon,minLat,maxLon,maxLat");
		System.out
				.println("\t\tOnly tiles overlapping the bounding box are requested (default is the world)");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_EPSG + " epsg");
		System.out
				.println("\t\tEPSG number of the provided bounding box (default is 4326, WGS 84)");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_URL_EPSG
				+ " url_epsg");
		System.out
				.println("\t\tEPSG number of the tiles provided by the URL (default is 3857, Web Mercator");
		System.out.println();
		System.out.println("\t" + ARGUMENT_PREFIX + ARGUMENT_TMS);
		System.out
				.println("\t\tRequest URL for x,y,z coordinates is in TMS format (default is standard XYZ)");
		System.out.println();
		System.out.println("\tgeopackage_file");
		System.out
				.println("\t\tpath to the GeoPackage file to create, or existing file to update");
		System.out.println();
		System.out.println("\ttile_table");
		System.out
				.println("\t\ttile table name within the GeoPackage file to create or update");
		System.out.println();
		System.out.println("\turl");
		System.out
				.println("\t\tURL with substitution variables for requesting tiles");
		System.out.println();
		System.out.println("\t\t{z}");
		System.out.println("\t\t\tz URL substitution variable for zoom level");
		System.out.println();
		System.out.println("\t\t{x}");
		System.out.println("\t\t\tx URL substitution variable");
		System.out.println();
		System.out.println("\t\t{y}");
		System.out.println("\t\t\ty URL substitution variable");
		System.out.println();
		System.out.println("\t\t{minLon}");
		System.out.println("\t\t\tMinimum longitude URL substitution variable");
		System.out.println();
		System.out.println("\t\t{minLat}");
		System.out.println("\t\t\tMinimum latitude URL substitution variable");
		System.out.println();
		System.out.println("\t\t{maxLon}");
		System.out.println("\t\t\tMaximum longitude URL substitution variable");
		System.out.println();
		System.out.println("\t\t{maxLat}");
		System.out.println("\t\t\tMaximum latitude URL substitution variable");
		System.out.println();
		System.out.println("\tmin_zoom");
		System.out.println("\t\tMinimum zoom level to request tiles for");
		System.out.println();
		System.out.println("\tmax_zoom");
		System.out.println("\t\tMaximum zoom level to request tiles for");
		System.out.println();
	}