src/main/java/org/wymiwyg/commons/util/URI.java
public void setFragment(String p_fragment) throws MalformedURIException {
		if (p_fragment == null) {
			m_fragment = null;
		} else if (!isGenericURI()) {
			throw new MalformedURIException("Fragment can only be set for a generic URI!");
		} else if (getPath() == null) {
			throw new MalformedURIException("Fragment cannot be set when path is null!");
		} else if (!isURIString(p_fragment)) {
			throw new MalformedURIException("Fragment contains invalid character!");
		} else {
			m_fragment = p_fragment;
		}
	}
public void setFragment(String p_fragment) throws MalformedURIException {
		if (p_fragment == null) {
			m_fragment = null;
		} else if (!isGenericURI()) {
			throw new MalformedURIException("Fragment can only be set for a generic URI!");
		} else if (getPath() == null) {
			throw new MalformedURIException("Fragment cannot be set when path is null!");
		} else if (!isURIString(p_fragment)) {
			throw new MalformedURIException("Fragment contains invalid character!");
		} else {
			m_fragment = p_fragment;
		}
	}
public void setFragment ( String p_fragment ) throws MalformedURIException { if ( p_fragment == null ) { m_fragment = null ; } else if ( ! isGenericURI ( ) ) { throw new MalformedURIException ( "Fragment can only be set for a generic URI!" ) ; } else if ( getPath ( ) == null ) { throw new MalformedURIException ( "Fragment cannot be set when path is null!" ) ; } else if ( ! isURIString ( p_fragment ) ) { throw new MalformedURIException ( "Fragment contains invalid character!" ) ; } else { m_fragment = p_fragment ; } }
Set the fragment for this URI. A non-null value is valid only
if this is a URI conforming to the generic URI syntax and
the path value is not null.

@param p_fragment the fragment for this URI

@exception MalformedURIException if p_fragment is not null and this
URI does not conform to the generic
URI syntax or if the path is null
Set the fragment for this URI . A non - null value is valid only if this is a URI conforming to the generic URI syntax and the path value is not null .