Class MimeTypesReader

  • All Implemented Interfaces:
    MimeTypesReaderMetKeys, ContentHandler, DTDHandler, EntityResolver, ErrorHandler

    public class MimeTypesReader
    extends DefaultHandler
    implements MimeTypesReaderMetKeys
    A reader for XML files compliant with the freedesktop MIME-info DTD.
      <!DOCTYPE mime-info [
        <!ELEMENT mime-info (mime-type)+>
        <!ATTLIST mime-info xmlns CDATA #FIXED "http://www.freedesktop.org/standards/shared-mime-info">
     
        <!ELEMENT mime-type (comment|acronym|expanded-acronym|glob|magic|root-XML|alias|sub-class-of)*>
        <!ATTLIST mime-type type CDATA #REQUIRED>
     
        <!-- a comment describing a document with the respective MIME type. Example: "WMV video" -->
        <!ELEMENT _comment (#PCDATA)>
        <!ATTLIST _comment xml:lang CDATA #IMPLIED>
     
        <!-- a comment describing a the respective unexpanded MIME type acronym. Example: "WMV" -->
        <!ELEMENT acronym (#PCDATA)>
        <!ATTLIST acronym xml:lang CDATA #IMPLIED>
     
        <!-- a comment describing a the respective unexpanded MIME type acronym. Example: "Windows Media Video" -->
        <!ELEMENT expanded-acronym (#PCDATA)>
        <!ATTLIST expanded-acronym xml:lang CDATA #IMPLIED>
     
        <!ELEMENT glob EMPTY>
        <!ATTLIST glob pattern CDATA #REQUIRED>
        <!ATTLIST glob isregex CDATA #IMPLIED>
     
        <!ELEMENT magic (match)+>
        <!ATTLIST magic priority CDATA #IMPLIED>
     
        <!ELEMENT match (match)*>
        <!ATTLIST match offset CDATA #REQUIRED>
        <!ATTLIST match type (string|big16|big32|little16|little32|host16|host32|byte) #REQUIRED>
        <!ATTLIST match value CDATA #REQUIRED>
        <!ATTLIST match mask CDATA #IMPLIED>
     
        <!ELEMENT root-XML EMPTY>
        <!ATTLIST root-XML
              namespaceURI CDATA #REQUIRED
              localName CDATA #REQUIRED>
     
        <!ELEMENT alias EMPTY>
        <!ATTLIST alias
              type CDATA #REQUIRED>
     
       <!ELEMENT sub-class-of EMPTY>
       <!ATTLIST sub-class-of
             type CDATA #REQUIRED>
      ]>
     
    In addition to the standard fields, this will also read two Tika specific fields: - link - uti
    See Also:
    http://freedesktop.org/wiki/Standards_2fshared_2dmime_2dinfo_2dspec