Package 

Class MimeTypeContext

  • All Implemented Interfaces:
    io.github.asperan.mimeinfo.context.Context

    
    public final class MimeTypeContext
     implements Context<MimeTypeSpecs>
                        

    The context of MimeTypes.

    • Constructor Detail

      • MimeTypeContext

        MimeTypeContext(MimeTypeSpecs.Type.MimeClass typeClass, String typeName)
        Parameters:
        typeClass - The class of the Mime type.
        typeName - The name of the type.
    • Method Detail

      • glob

         final Unit glob(String pattern, UByte weight)

        Add a glob object to the MimeType.

        Parameters:
        pattern - The pattern of the glob.
        weight - The weight of the glob.
      • comment

         final Unit comment(String value, String xmlLang)

        Add a comment element to the MimeType.

        Parameters:
        value - The comment.
        xmlLang - The xml language specification.
      • magic

         final MimeTypeSpecs.Builder magic(Function1<MimeMagicContext, Unit> configuration)

        Add a magic element to the MimeType.

        Parameters:
        configuration - The configuration of the Magic element.
      • alias

         final Unit alias(String type)

        Add an alias to the mimetype.

        Parameters:
        type - the type alias.
      • subclassOf

         final Unit subclassOf(String type)

        Add a super class to the mimetype.

        Parameters:
        type - The parent type.
      • acronym

         final Unit acronym(String value, String xmlLang)

        Add an acronym to the mimetype.

        Parameters:
        value - The value of the acronym.
        xmlLang - The xml language specification.
      • expandedAcronym

         final Unit expandedAcronym(String value, String xmlLang)

        Add an expanded acronym to the mimetype.

        Parameters:
        value - The value of the expanded acronym.
        xmlLang - The xml language specification.
      • icon

         final Unit icon(String name)

        Set the icon for the mimetype.

        Parameters:
        name - The name of the icon.
      • genericIcon

         final Unit genericIcon(String name)

        Set the generic icon for the mimetype.

        Parameters:
        name - The name of the generic icon.
      • rootXml

         final Unit rootXml(String namespaceUri, String localName)

        Set the root XML for the mimetype.

        Parameters:
        namespaceUri - The namespace URI of the root XML.
        localName - The localname of the root XML.
      • treemagic

         final MimeTypeSpecs.Builder treemagic(Function1<MimeTreeMagicContext, Unit> configuration)

        Add a treemagic to the mimetype.

        Parameters:
        configuration - The configuration of the tree magic.
      • build

         MimeTypeSpecs build()

        Build the object of the context.