/** * Return one of the prefixes mapped to a Namespace URI. * * <p>If more than one prefix is currently mapped to the same * URI, this method will make an arbitrary selection; if you * want all of the prefixes, use the {@link #getPrefixes} * method instead.</p> * * <p><strong>Note:</strong> this will never return the empty (default) prefix; * to check for a default prefix, use the {@link #getURI getURI} * method with an argument of "".</p> * * @param uri The Namespace URI. * @return One of the prefixes currently mapped to the URI supplied, * or null if none is mapped or if the URI is assigned to * the default Namespace. * @see #getPrefixes(java.lang.String) * @see #getURI */ public String getPrefix(String uri) { return currentContext.getPrefix(uri); }
/** * Return one of the prefixes mapped to a Namespace URI. * * <p>If more than one prefix is currently mapped to the same * URI, this method will make an arbitrary selection; if you * want all of the prefixes, use the {@link #getPrefixes} * method instead.</p> * * <p><strong>Note:</strong> this will never return the empty (default) prefix; * to check for a default prefix, use the {@link #getURI getURI} * method with an argument of "".</p> * * @param uri The Namespace URI. * @return One of the prefixes currently mapped to the URI supplied, * or null if none is mapped or if the URI is assigned to * the default Namespace. * @see #getPrefixes(java.lang.String) * @see #getURI */ public String getPrefix(String uri) { return currentContext.getPrefix(uri); }
/** * Return one of the prefixes mapped to a Namespace URI. * * <p>If more than one prefix is currently mapped to the same * URI, this method will make an arbitrary selection; if you * want all of the prefixes, use the {@link #getPrefixes} * method instead.</p> * * <p><strong>Note:</strong> this will never return the empty (default) prefix; * to check for a default prefix, use the {@link #getURI getURI} * method with an argument of "".</p> * * @param uri The Namespace URI. * @return One of the prefixes currently mapped to the URI supplied, * or null if none is mapped or if the URI is assigned to * the default Namespace. * @see #getPrefixes(java.lang.String) * @see #getURI */ public String getPrefix(String uri) { return currentContext.getPrefix(uri); }