Package sonia.scm.io
Interface ContentType
public interface ContentType
Detected type of content.
- Since:
- 2.23.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns 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).getRaw()
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).Returns a map of syntax modes such as codemirror, ace or prism.boolean
isText()
Returnstrue
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()Returnstrue
if the content type is text based. -
getLanguage
Returns an optional with the programming language or empty if the content is not programming language. -
getSyntaxModes
Returns a map of syntax modes such as codemirror, ace or prism.- Since:
- 2.28.0
-