Returns a normalized rfs prefix.<p>

Replacing macros and normalizing the path.<p>

@param rfsPrefix the prefix to normalize

@return the normalized rfs prefix
978056
protected String normalizeRfsPrefix(String rfsPrefix) {

        String result = insertContextStrings(rfsPrefix);
        if (!isValidURL(result)) {
            result = CmsFileUtil.normalizePath(result, '/');
        }
        if (CmsResource.isFolder(result)) {
            // ensure prefix does NOT end with a folder '/'
            result = result.substring(0, result.length() - 1);
        }
        return result;
    }
711290
public EndpointInfoBuilder regexPathPrefix(String regexPathPrefix) {
        requireNonNull(regexPathPrefix, "regexPathPrefix");
        checkState(fragment == null, "regexPathPrefix cannot be set with fragment: %s", fragment);
        this.regexPathPrefix = regexPathPrefix;
        return this;
    }
1016308
public static Properties getSubProperties (
        Properties source, String prefix, String defaultsPrefix)
    {
        // first load up the defaults
        Properties defs = new Properties();
        extractSubProperties(source, defs, defaultsPrefix);

        // now load up the desired properties
        Properties dest = new Properties(defs);
        extractSubProperties(source, dest, prefix);

        return dest;
    }
422603
@Override
  public String getPrefix(String namespaceURI) {
    // per javax.xml.namespace.NamespaceContext doc
    if (namespaceURI == null)
      throw new IllegalArgumentException("Cannot find prefix for null namespace URI");
    if (XMLConstants.XML_NS_URI.equals(namespaceURI))
      return XMLConstants.XML_NS_PREFIX;
    if (XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(namespaceURI))
      return XMLConstants.XMLNS_ATTRIBUTE;

    for (Map.Entry<String, String> entry: bindings.entrySet()) {
      if (namespaceURI.equals(entry.getValue()))
        return entry.getKey();
    }

    return null;
  }
991856
public static String getPrefixFromXMLNSDecl(String attRawName)
  {

    int index = attRawName.indexOf(':');

    return (index >= 0) ? attRawName.substring(index + 1) : "";
  }
448412
public static String normalizeURLPath(final String urlPath) {
        String urlPathNormalized = urlPath;
        if (!urlPathNormalized.startsWith("jrt:") && !urlPathNormalized.startsWith("http://")
                && !urlPathNormalized.startsWith("https://")) {
            // Any URL with the "jar:" prefix must have "/" after any "!"
            urlPathNormalized = urlPathNormalized.replace("/!", "!").replace("!/", "!").replace("!", "!/");
            // Prepend "jar:file:"
            if (!urlPathNormalized.startsWith("file:") && !urlPathNormalized.startsWith("jar:")) {
                urlPathNormalized = "file:" + urlPathNormalized;
            }
            if (urlPathNormalized.contains("!") && !urlPathNormalized.startsWith("jar:")) {
                urlPathNormalized = "jar:" + urlPathNormalized;
            }
        }
        return encodePath(urlPathNormalized);
    }
272849
String extractPrefixAndReturnRest(String theString) {
		int offset = 0;
		while (true) {
			if (theString.length() == offset) {
				break;
			} else {
				char nextChar = theString.charAt(offset);
				if (nextChar == '-' || Character.isDigit(nextChar)) {
					break;
				}
			}
			offset++;
		}

		String prefix = theString.substring(0, offset);
		if (!isBlank(prefix)) {
		
			myPrefix = ParamPrefixEnum.forValue(prefix);
	
			if (myPrefix == null) {
				switch (prefix) {
				case ">=":
					myPrefix = ParamPrefixEnum.GREATERTHAN_OR_EQUALS;
					break;
				case ">":
					myPrefix = ParamPrefixEnum.GREATERTHAN;
					break;
				case "<=":
					myPrefix = ParamPrefixEnum.LESSTHAN_OR_EQUALS;
					break;
				case "<":
					myPrefix = ParamPrefixEnum.LESSTHAN;
					break;
				case "~":
					myPrefix = ParamPrefixEnum.APPROXIMATE;
					break;
				default :
					ourLog.warn("Invalid prefix being ignored: {}", prefix);
					break;
				}
				
				if (myPrefix != null) {
					ourLog.warn("Date parameter has legacy prefix '{}' which has been removed from FHIR. This should be replaced with '{}'", prefix, myPrefix);
				}
				
			}
			
		}
		
		return theString.substring(offset);
	}
280689
private static String getRemovePrefixRegex() {

        if (m_removePrefixRegex == null) {
            m_removePrefixRegex = "^("
                + OpenCms.getStaticExportManager().getVfsPrefix()
                + ")?"
                + STATIC_RESOURCE_PREFIX
                + "(/v-?\\d+v/)?";
        }
        return m_removePrefixRegex;
    }
265044
public FunctionLibrary getLibraryForPrefix(String functionPrefix) {
        for (int i = 0; i < functionLibraries.size(); i++) {
            if (((FunctionLibrary)functionLibraries.get(i)).getPrefix().equals(functionPrefix)) {
                return (FunctionLibrary)functionLibraries.get(i);
            }
        }

        throw new NoSuchFunctionLibraryException("Can not find function library for prefix " + functionPrefix);
    }
658200
public String getPrefix(String namespaceURI)
   {
      String prefix = null;
      try
      {
         prefix = namespaceRegistry.getPrefix(namespaceURI);
      }
      catch (NamespaceException exc)
      {
         prefix = prefixes.get(namespaceURI);
      }
      catch (RepositoryException exc)
      {
         log.error(exc.getMessage(), exc);
      }
      return prefix;

   }
484939
private String getPrefix()
    {
        final String prefix;
        if (loader.isPresent())
        {
            prefix = loader.get().getPackage().getName().replace(Constant.DOT, File.separator);
        }
        else
        {
            prefix = resourcesDir;
        }
        return prefix;
    }
544075
public Name getPrefix(int index) {
		LinkedList newNames = new LinkedList();
		for (int i = 0; i < index; i++) {
			newNames.add(names.get(i));
		}

		return new DistinguishedName(newNames);
	}
172958
private String urlPrefix(URL url) {
        StringBuilder result = new StringBuilder();
        result.append(url.getProtocol());
        String[] splits = StringUtils.split(url.getHost(), '.');
        if (splits.length > 0) {
            for (String split : splits) {
                result.append(split);
            }
        }
        if (url.getPort() > -1) {
            result.append(Integer.toString(url.getPort()));
        }
        return result.toString();
    }
455629
public static String getURIFromAbbrev(final String abbreviation) {
        String[] parts = abbreviation.split(":");
        if (parts.length == 2) {
            return getNSFromPrefix(parts[0]) + parts[1];
        }
        throw new IllegalArgumentException("Undefined prefix in " + abbreviation);
    }
507504
public Name getSuffix(int index) {
		if (index > names.size()) {
			throw new ArrayIndexOutOfBoundsException();
		}

		LinkedList newNames = new LinkedList();
		for (int i = index; i < names.size(); i++) {
			newNames.add(names.get(i));
		}

		return new DistinguishedName(newNames);
	}
505097
public S tableNamePrefix(String tableNamePrefix) {
      attributes.attribute(TABLE_NAME_PREFIX).set(tableNamePrefix);
      return self();
   }
156011
@Override
	public String getURLPrefix(Map<String, String> variants) {

		if (null == this.urlPrefix)
			throw new IllegalStateException("The bundleDataHashCode must be set before accessing the url prefix.");

		if (variants != null && !variants.isEmpty()) {
			String key = getAvailableVariant(variants);
			if (StringUtils.isNotEmpty(key)) {
				return prefixMap.get(key) + "." + key + "/";
			}
		}
		return this.urlPrefix + "/";
	}