class AzResourceImpl extends AzAttributesImpl implements AzResource {

    static void addAttributesFromUriQuery( URI uri, Attributes attributes, boolean replace ) {
        if ( null == uri ) {
            throw new IllegalArgumentException( "Illegal null URI." );
        }
        if ( null == attributes ) {
            throw new IllegalArgumentException( "Illegal null Attributes." );
        }

        String query = uri.getRawQuery();
        if ( ( null != query ) && ( query.length() > 0 ) ) {
            String[] params = query.split( "&" );
            if ( ( null != params ) && ( params.length > 0 ) ) {
                for ( String nv : params ) {
                    if ( (null == nv) || (nv.length() <= 0) )  {
                        continue;
                    }

                    String name, value;
                    int equalsPos = nv.indexOf( "=" );
                    if ( -1 == equalsPos ) {
                        name = decodeURI( nv );
                        value = "";
                    } else {
                        name = decodeURI( nv.substring( 0, equalsPos ) );
                        value = decodeURI( nv.substring( equalsPos + 1 ) );
                    }

                    attributes.addAttribute( name, value, replace );
                }
            }
        }
    }

    public  AzResourceImpl( URI resource );

}