Changeset 7201


Ignore:
Timestamp:
10/11/18 19:04:35 (6 years ago)
Author:
Oliver Schonefeld
Message:
  • add convenience for checking for checking type
File:
1 edited

Legend:

Unmodified
Added
Removed
  • FCSSimpleClient/trunk/src/main/java/eu/clarin/sru/client/fcs/ClarinFCSEndpointDescription.java

    r6938 r7201  
    203203
    204204        /**
     205         * Convenience method to check if this DataView is of a certain MIME
     206         * type.
     207         *
     208         * @param type
     209         *            the MIME type to test against
     210         * @return <code>true</code> if the DataView is in the supplied MIME
     211         *         type, <code>false</code> otherwise
     212         * @throws NullPointerException
     213         *             if any required arguments are not supplied
     214         */
     215        public boolean isMimeType(String type) {
     216            if (type == null) {
     217                throw new NullPointerException("mimetype == null");
     218            }
     219            return (this.mimeType.equals(type));
     220        }
     221
     222
     223        /**
    205224         * Get the delivery policy for this data view.
    206225         *
Note: See TracChangeset for help on using the changeset viewer.