Class XMLValidationSettings
- java.lang.Object
-
- org.eclipse.lemminx.extensions.contentmodel.settings.XMLValidationSettings
-
- Direct Known Subclasses:
XMLValidationFilter,XMLValidationRootSettings
public class XMLValidationSettings extends Object
XML validation settings for a given file.
-
-
Constructor Summary
Constructors Constructor Description XMLValidationSettings()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)XMLNamespacesSettingsgetNamespaces()Returns the XML Namespaces validation settings.StringgetNoGrammar()static org.eclipse.lsp4j.DiagnosticSeveritygetNoGrammarSeverity(XMLValidationSettings validationSettings)Returns thenoGrammarseverity according the given settings andDiagnosticSeverity.Hintotherwise.XMLSchemaSettingsgetSchema()Returns the XML Schema validation settings.XMLXIncludeSettingsgetXInclude()Returns true if xi:include is to be validated and false otherwise.inthashCode()booleanisDisallowDocTypeDecl()Returns true if a fatal error is thrown if the incoming document contains a DOCTYPE declaration and false otherwise.booleanisEnabled()Returns true if the validation is enabled and false otherwise.booleanisRelatedInformation()booleanisResolveExternalEntities()Returns true if external entities must be resolved and false otherwise.XMLValidationSettingsmerge(XMLValidationSettings settings)voidsetCapabilities(org.eclipse.lsp4j.PublishDiagnosticsCapabilities publishDiagnostics)voidsetDisallowDocTypeDecl(boolean disallowDocTypeDecl)Set true if a fatal error is thrown if the incoming document contains a DOCTYPE declaration and false otherwise.voidsetEnabled(boolean enabled)Set true if the validation is enabled and false otherwise.voidsetNamespaces(XMLNamespacesSettings namespaces)Set the XML Namespaces validation settings.voidsetNoGrammar(String noGrammar)voidsetResolveExternalEntities(boolean resolveExternalEntities)Set true if external entities must be resolved and false otherwise.voidsetSchema(XMLSchemaSettings schema)Set the XML Schema validation settings.voidsetXInclude(XMLXIncludeSettings xInclude)Set true if xi:include is to be validated and false otherwise.
-
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
Returns true if the validation is enabled and false otherwise.- Returns:
- true if the validation is enabled and false otherwise.
-
setEnabled
public void setEnabled(boolean enabled)
Set true if the validation is enabled and false otherwise.- Parameters:
enabled- true if the validation is enabled and false otherwise.
-
getNamespaces
public XMLNamespacesSettings getNamespaces()
Returns the XML Namespaces validation settings.- Returns:
- the XML Namespaces validation settings.
-
setNamespaces
public void setNamespaces(XMLNamespacesSettings namespaces)
Set the XML Namespaces validation settings.- Parameters:
namespaces- the XML Namespaces validation settings.
-
getSchema
public XMLSchemaSettings getSchema()
Returns the XML Schema validation settings.- Returns:
- the XML Schema validation settings.
-
setSchema
public void setSchema(XMLSchemaSettings schema)
Set the XML Schema validation settings.- Parameters:
schema- the XML Schema validation settings.
-
setNoGrammar
public void setNoGrammar(String noGrammar)
-
getNoGrammar
public String getNoGrammar()
-
isDisallowDocTypeDecl
public boolean isDisallowDocTypeDecl()
Returns true if a fatal error is thrown if the incoming document contains a DOCTYPE declaration and false otherwise.- Returns:
- true if a fatal error is thrown if the incoming document contains a DOCTYPE declaration and false otherwise.
-
setDisallowDocTypeDecl
public void setDisallowDocTypeDecl(boolean disallowDocTypeDecl)
Set true if a fatal error is thrown if the incoming document contains a DOCTYPE declaration and false otherwise.- Parameters:
disallowDocTypeDecl- disallow DOCTYPE declaration.
-
isResolveExternalEntities
public boolean isResolveExternalEntities()
Returns true if external entities must be resolved and false otherwise.- Returns:
- true if external entities must be resolved and false otherwise.
-
setResolveExternalEntities
public void setResolveExternalEntities(boolean resolveExternalEntities)
Set true if external entities must be resolved and false otherwise.- Parameters:
resolveExternalEntities- resolve external entities
-
getXInclude
public XMLXIncludeSettings getXInclude()
Returns true if xi:include is to be validated and false otherwise.- Returns:
- true if xi:include is to be validated and false otherwise.
-
setXInclude
public void setXInclude(XMLXIncludeSettings xInclude)
Set true if xi:include is to be validated and false otherwise.- Parameters:
xInclude- xi:include
-
getNoGrammarSeverity
public static org.eclipse.lsp4j.DiagnosticSeverity getNoGrammarSeverity(XMLValidationSettings validationSettings)
Returns thenoGrammarseverity according the given settings andDiagnosticSeverity.Hintotherwise.- Parameters:
validationSettings- the validation settings- Returns:
- the
noGrammarseverity according the given settings andDiagnosticSeverity.Hintotherwise.
-
merge
public XMLValidationSettings merge(XMLValidationSettings settings)
-
setCapabilities
public void setCapabilities(org.eclipse.lsp4j.PublishDiagnosticsCapabilities publishDiagnostics)
-
isRelatedInformation
public boolean isRelatedInformation()
-
-