Package uk.ac.starlink.ttools.taplint
Class ContentTypeOptions
java.lang.Object
uk.ac.starlink.ttools.taplint.ContentTypeOptions
Defines a permitted class of MIME types.
- Since:
- 24 May 2016
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionContentTypeOptions
(uk.ac.starlink.util.ContentType[] permittedTypes) Constructor. -
Method Summary
-
Constructor Details
-
ContentTypeOptions
public ContentTypeOptions(uk.ac.starlink.util.ContentType[] permittedTypes) Constructor.- Parameters:
permittedTypes
- array of MIME type/subtype strings allowed
-
-
Method Details
-
checkType
Checks a declared Content-Type string against the permitted values for this object. Validation messages are reported in case of non-compliance.- Parameters:
reporter
- destination for validation messagesdeclaredTypeTxt
- Content-Type to assessurl
- source of content, used for report messages
-