Top Description Fields Constructors Methods
org.jabref.logic.layout.format

public Class HTMLChars

extends Object
implements ParamLayoutFormatter
Class Inheritance
All Implemented Interfaces
org.jabref.logic.layout.ParamLayoutFormatter, org.jabref.logic.layout.LayoutFormatter
Imports
java.util.Map, .Objects, java.util.regex.Pattern, org.jabref.logic.layout.ParamLayoutFormatter, org.jabref.logic.util.strings.HTMLUnicodeConversionMaps, org.jabref.model.strings.StringUtil

This formatter escapes characters so that they are suitable for HTML.

Field Summary

Modifier and TypeField and Description
private static final Map<String, String>
private static final Pattern
HTML_ENTITY_PATTERN

This regex matches '&' that DO NOT BEGIN an HTML entity.

private boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
format(String
The text to layout.
inField
)

Implements org.jabref.logic.layout.LayoutFormatter.format.

Failure Mode:

Formatters should be robust in the sense that they always return some relevant string.

private String
getHTMLTag(String latexCommand)

private String
public void
setArgument(String
A String argument.
arg
)

Implements org.jabref.logic.layout.ParamLayoutFormatter.setArgument.

Method for setting the argument of this formatter.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

HTML_CHARSback to summary
private static final Map<String, String> HTML_CHARS
HTML_ENTITY_PATTERNback to summary
private static final Pattern HTML_ENTITY_PATTERN

This regex matches '&' that DO NOT BEGIN an HTML entity.

&amp; Not Matched
&#34; Not Matched
&Hey Matched

keepCurlyBracesback to summary
private boolean keepCurlyBraces

Constructor Detail

HTMLCharsback to summary
public HTMLChars()

Method Detail

formatback to summary
public String format(String inField)

Implements org.jabref.logic.layout.LayoutFormatter.format.

Doc from org.jabref.logic.layout.LayoutFormatter.format.

Failure Mode:

Formatters should be robust in the sense that they always return some relevant string.

If the formatter can detect an invalid input it should return the original string otherwise it may simply return a wrong output.

Parameters
inField:String

The text to layout.

Returns:String

The layouted text.

Annotations
@Override
getHTMLTagback to summary
private String getHTMLTag(String latexCommand)
normalizedFieldback to summary
private String normalizedField(String inField)
setArgumentback to summary
public void setArgument(String arg)

Implements org.jabref.logic.layout.ParamLayoutFormatter.setArgument.

Doc from org.jabref.logic.layout.ParamLayoutFormatter.setArgument.

Method for setting the argument of this formatter.

Parameters
arg:String

A String argument.

Annotations
@Override