@NotThreadSafe public class PSPreprocessor extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_KEEP_DIAGNOSTICS |
static boolean |
DEFAULT_KEEP_EMPTY_PATTERNS |
static boolean |
DEFAULT_KEEP_EMPTY_SCHEMA |
static boolean |
DEFAULT_KEEP_REPORTS |
static boolean |
DEFAULT_KEEP_TITLES |
Constructor and Description |
---|
PSPreprocessor(IPSQueryBinding aQueryBinding) |
Modifier and Type | Method and Description |
---|---|
static PSPreprocessor |
createPreprocessorWithoutInformationLoss(IPSQueryBinding aQueryBinding) |
PSSchema |
getAsMinimalSchema(PSSchema aSchema)
Convert the passed schema to a minimal schema.
|
PSSchema |
getAsPreprocessedSchema(PSSchema aSchema)
Convert the passed schema to a pre-processed schema.
|
PSSchema |
getForcedPreprocessedSchema(PSSchema aSchema)
Convert the passed schema to a pre-processed schema independent if it is
already minimal or not.
|
IPSQueryBinding |
getQueryBinding() |
boolean |
isKeepDiagnostics() |
boolean |
isKeepEmptyPatterns() |
boolean |
isKeepEmptySchema() |
boolean |
isKeepReports() |
boolean |
isKeepTitles() |
PSPreprocessor |
setKeepDiagnostics(boolean bKeepDiagnostics) |
PSPreprocessor |
setKeepEmptyPatterns(boolean bKeepEmptyPatterns) |
PSPreprocessor |
setKeepEmptySchema(boolean bKeepEmptySchema)
Should schema objects without a pattern be kept?
|
PSPreprocessor |
setKeepReports(boolean bKeepReports) |
PSPreprocessor |
setKeepTitles(boolean bKeepTitles) |
String |
toString() |
public static final boolean DEFAULT_KEEP_TITLES
public static final boolean DEFAULT_KEEP_DIAGNOSTICS
public static final boolean DEFAULT_KEEP_REPORTS
public static final boolean DEFAULT_KEEP_EMPTY_PATTERNS
public static final boolean DEFAULT_KEEP_EMPTY_SCHEMA
public PSPreprocessor(@Nonnull IPSQueryBinding aQueryBinding)
@Nonnull public IPSQueryBinding getQueryBinding()
null
!public boolean isKeepTitles()
true
if <title>-elements should be kept. Default
is false.@Nonnull public PSPreprocessor setKeepTitles(boolean bKeepTitles)
public boolean isKeepDiagnostics()
true
if <diagnostics>-elements should be kept.
Default is false.@Nonnull public PSPreprocessor setKeepDiagnostics(boolean bKeepDiagnostics)
public boolean isKeepReports()
true
if <report>-elements should be kept.
Default is false.@Nonnull public PSPreprocessor setKeepReports(boolean bKeepReports)
public boolean isKeepEmptyPatterns()
true
if <pattern>-elements without a rule should
be kept. Default is true.@Nonnull public PSPreprocessor setKeepEmptyPatterns(boolean bKeepEmptyPatterns)
public boolean isKeepEmptySchema()
true
if <schema>-elements without a pattern
should be kept. Default is true.@Nonnull public PSPreprocessor setKeepEmptySchema(boolean bKeepEmptySchema)
false
if setKeepEmptyPatterns(boolean)
is also
set to false, because otherwise patterns without rules are kept.bKeepEmptySchema
- true
to keep them, false
to discard them.@Nullable public PSSchema getAsMinimalSchema(@Nonnull PSSchema aSchema) throws SchematronPreprocessException
aSchema
- The schema to be made minimal. May not be null
null
if the original schema is
not yet minimal and isKeepEmptySchema()
is set to
false
.SchematronPreprocessException
- In case a preprocessing error occurs@Nullable public PSSchema getAsPreprocessedSchema(@Nonnull PSSchema aSchema) throws SchematronPreprocessException
aSchema
- The schema to pre-process. May not be null
null
if the
original schema is not yet pre-processed and
isKeepEmptySchema()
is set to false
.SchematronPreprocessException
- In case a preprocessing error occurs@Nullable public PSSchema getForcedPreprocessedSchema(@Nonnull PSSchema aSchema) throws SchematronPreprocessException
aSchema
- The schema to be made minimal. May not be null
null
if the
original schema is not yet minimal and isKeepEmptySchema()
is set to false
.SchematronPreprocessException
- In case a preprocessing error occurs@Nonnull public static PSPreprocessor createPreprocessorWithoutInformationLoss(@Nonnull IPSQueryBinding aQueryBinding)
Copyright © 2014–2017 Philip Helger. All rights reserved.