Package org.codehaus.mojo.xml.validation
Class ValidationSet
java.lang.Object
org.codehaus.mojo.xml.validation.ValidationSet
An instance of this class is used to specify a set of files, which are validated against a common schema.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDir()
Returns a directory, which is scanned for files to validate.String[]
Returns patterns of files, which are being excluded from the validation set.String[]
Returns patterns of files, which are being included into the validation set.Returns the schemas public ID.Returns the schema language.Returns the schemas system ID.boolean
Returns, whether Maven's default excludes are being ignored.boolean
If the documents are being validated for wellformedness only: Returns, whether the parser should be validating.boolean
Returns, whether the validator should create xinclude aware XML parsers for reading XML documents.void
Sets a directory, which is scanned for files to validate.void
setExcludes
(String[] pExcludes) Sets patterns of files, which are being excluded from the validation set.void
setIncludes
(String[] pIncludes) Sets patterns of files, which are being included into the validation set.void
setPublicId
(String pPublicId) Sets the schemas public ID.void
setSchemaLanguage
(String pSchemaLanguage) Sets the schema language.void
setSkipDefaultExcludes
(boolean pSkipDefaultExcludes) Sets, whether Maven's default excludes are being ignored.void
setSystemId
(String pSystemId) Sets the schemas system ID.void
setValidating
(boolean pValidating) If the documents are being validated for wellformedness only: Sets, whether the parser should be validating.void
setXincludeAware
(boolean pXIncludeAware) Sets, whether the validator should create xinclude aware XML parsers for reading XML documents.
-
Constructor Details
-
ValidationSet
public ValidationSet()
-
-
Method Details
-
getDir
Returns a directory, which is scanned for files to validate.- Returns:
- The directory to scan.
-
getExcludes
Returns patterns of files, which are being excluded from the validation set.- Returns:
- Patters of excluded files.
-
getIncludes
Returns patterns of files, which are being included into the validation set.- Returns:
- Patters of included files.
-
getPublicId
Returns the schemas public ID. May be null, if the schema is loaded through its system ID or if the documents are being validated for wellformedness only.- Returns:
- The schemas public ID, if available, or null.
-
getSchemaLanguage
Returns the schema language. May be null, if the documents are being validated for wellformedness only, or if the default schema language (W3C XML Schema) is being used. See http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/validation/SchemaFactory.html for possible values.- Returns:
- The schema language, if available, or null.
-
getSystemId
Returns the schemas system ID. May be null, if the schema is loaded through its public ID or if the documents are being validated for wellformedness only.- Returns:
- The schemas system ID, if available, or null.
-
isSkipDefaultExcludes
public boolean isSkipDefaultExcludes()Returns, whether Maven's default excludes are being ignored. Defaults to false (Default excludes are being used).- Returns:
- Whether to ignore Maven's default excludes, or not. (Default=false, thus by default those excludes are in place.)
-
isValidating
public boolean isValidating()If the documents are being validated for wellformedness only: Returns, whether the parser should be validating. (In other words: Whether documents must contain a document type or xml schema declaration.) The property is ignored otherwise. The default value is false.- Returns:
- Whether documents are being validated, or not.
-
setDir
Sets a directory, which is scanned for files to validate.- Parameters:
pDir
- The directory to scan.
-
setExcludes
Sets patterns of files, which are being excluded from the validation set.- Parameters:
pExcludes
- Patters of excluded files.
-
setIncludes
Sets patterns of files, which are being included into the validation set.- Parameters:
pIncludes
- Patters of excluded files.
-
setPublicId
Sets the schemas public ID. May be null, if the schema is loaded through its system ID or if the documents are being validated for wellformedness only.- Parameters:
pPublicId
- The schemas public Id, if available, or null.
-
setSchemaLanguage
Sets the schema language. May be null, if the documents are being validated for wellformedness only, or if the default schema language (W3C XML Schema) is being used. See http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/validation/SchemaFactory.html for possible values.- Parameters:
pSchemaLanguage
- The schema language, if available, or null.
-
setSkipDefaultExcludes
public void setSkipDefaultExcludes(boolean pSkipDefaultExcludes) Sets, whether Maven's default excludes are being ignored. Defaults to false (Default excludes are being used).- Parameters:
pSkipDefaultExcludes
- Sets, whether to apply Maven's default ecxludes (false, default), or not (true).
-
setSystemId
Sets the schemas system ID. May be null, if the schema is loaded through its public ID or if the documents are being validated for wellformedness only.- Parameters:
pSystemId
- The schemas system ID, if available, or null.
-
setValidating
public void setValidating(boolean pValidating) If the documents are being validated for wellformedness only: Sets, whether the parser should be validating. (In other words: Whether documents must contain a document type or xml schema declaration.) The property is ignored otherwise. The default value is false.- Parameters:
pValidating
- Whether documents are being validated (true), or not (false, default).
-
isXincludeAware
public boolean isXincludeAware()Returns, whether the validator should create xinclude aware XML parsers for reading XML documents. The default value is false.- Returns:
- Whether XML parsers should be xinclude aware (true), or not (false, default).
-
setXincludeAware
public void setXincludeAware(boolean pXIncludeAware) Sets, whether the validator should create xinclude aware XML parsers for reading XML documents. The default value is false.- Parameters:
pXIncludeAware
- Whether XML parsers should be xinclude aware (true), or not (false, default).
-