Package sonia.scm.io

Interface ContentType


public interface ContentType
Detected type of content.
Since:
2.23.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns an optional with the programming language or empty if the content is not programming language.
    Returns the primary part of the content type (e.g.: text of text/plain).
    Returns the raw presentation of the content type (e.g.: text/plain).
    Returns the secondary part of the content type (e.g.: plain of text/plain).
    default Map<String,String>
    Returns a map of syntax modes such as codemirror, ace or prism.
    boolean
    Returns true if the content type is text based.
  • Method Details

    • getPrimary

      String getPrimary()
      Returns the primary part of the content type (e.g.: text of text/plain).
    • getSecondary

      String getSecondary()
      Returns the secondary part of the content type (e.g.: plain of text/plain).
    • getRaw

      String getRaw()
      Returns the raw presentation of the content type (e.g.: text/plain).
    • isText

      boolean isText()
      Returns true if the content type is text based.
    • getLanguage

      Optional<String> getLanguage()
      Returns an optional with the programming language or empty if the content is not programming language.
    • getSyntaxModes

      default Map<String,String> getSyntaxModes()
      Returns a map of syntax modes such as codemirror, ace or prism.
      Since:
      2.28.0