Package net.sourceforge.jnlp
Class ParserSettings
java.lang.Object
net.sourceforge.jnlp.ParserSettings
Contains settings to be used by the Parser while parsing JNLP files.
Immutable and therefore thread-safe.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new ParserSettings with the defautl parser settingsParserSettings
(boolean strict, boolean extensionAllowed, boolean malformedXmlAllowed) Create a new ParserSettings object -
Method Summary
Modifier and TypeMethodDescriptionstatic ParserSettings
boolean
boolean
boolean
isStrict()
static void
setGlobalParserSettings
(ParserSettings parserSettings) Set the global ParserSettings to match the given settings.static ParserSettings
setGlobalParserSettingsFromOptionParser
(net.sourceforge.jnlp.util.optionparser.OptionParser optionParser)
-
Constructor Details
-
ParserSettings
public ParserSettings()Create a new ParserSettings with the defautl parser settings -
ParserSettings
public ParserSettings(boolean strict, boolean extensionAllowed, boolean malformedXmlAllowed) Create a new ParserSettings object- Parameters:
strict
- true if parser should be stricextensionAllowed
- true if extensions are allowedmalformedXmlAllowed
- true if xml sanitizer should be used
-
-
Method Details
-
isExtensionAllowed
public boolean isExtensionAllowed()- Returns:
- true if extensions to the spec are allowed
-
isMalformedXmlAllowed
public boolean isMalformedXmlAllowed()- Returns:
- true if parsing malformed xml is allowed
-
isStrict
public boolean isStrict()- Returns:
- true if strict parsing mode is to be used
-
getGlobalParserSettings
- Returns:
- the global parser settings in use.
-
setGlobalParserSettings
Set the global ParserSettings to match the given settings.- Parameters:
parserSettings
- to be used
-
setGlobalParserSettingsFromOptionParser
public static ParserSettings setGlobalParserSettingsFromOptionParser(net.sourceforge.jnlp.util.optionparser.OptionParser optionParser) - Parameters:
optionParser
- to be read as source for globaPArserSettings- Returns:
- the ParserSettings to be used according to arguments specified at boot on the command line. These settings are also stored so they can be retrieved at a later time.
-