Package de.consist.bmu.rule
Class RuleFactory
- java.lang.Object
-
- de.consist.bmu.rule.RuleFactory
-
public final class RuleFactory extends java.lang.Object
Die Factory zum Laden und Speichern von Regeldefinitionen und zum erzeugen von Regelsaetzen.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RuleFactory.RuleConfig
Enumersation der Konfigurationsvarianten.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RuleSet
createRuleSet(RuleSetDef ruleSetDef)
Instanziiert aus der RuleSetDefinition ein ausführbares RuleSet.RuleSetDef
getDefaultRuleSetDef()
FXSConfig
getFXSConfig()
java.io.File
getFxsSchemaBaseDir()
FXSSchemaValidator
getFXSSchemaValidator()
static RuleFactory
getInstance()
RuleFactory.RuleConfig
getRuleConfig()
static java.lang.String
getTechDoc(java.lang.String name)
void
loadFXSConfig(java.io.File fxsConfigFile, java.io.File schemaBaseDir)
RuleSetDef
loadRuleSetDef(RuleFactory.RuleConfig ruleConfig)
RuleSetDef
loadRuleSetDef(java.io.File ruleSetDefFile)
RuleSetDef
loadRuleSetDef(java.io.InputStream is)
RuleSetResult
loadRuleSetResult(java.io.InputStream is)
void
saveRuleSetDef(java.io.File ruleSetFile, RuleSetDef ruleSetDef)
void
saveRuleSetDef(java.io.OutputStream os, RuleSetDef ruleSetDef)
void
saveRuleSetResult(java.io.OutputStream os, RuleSetResult ruleSetResult)
-
-
-
Method Detail
-
loadFXSConfig
public void loadFXSConfig(java.io.File fxsConfigFile, java.io.File schemaBaseDir) throws BMUException
- Throws:
BMUException
-
getFXSConfig
public FXSConfig getFXSConfig()
-
getFXSSchemaValidator
public FXSSchemaValidator getFXSSchemaValidator()
-
getFxsSchemaBaseDir
public java.io.File getFxsSchemaBaseDir()
-
getInstance
public static RuleFactory getInstance() throws BMUException
- Returns:
- RuleFactory
- Throws:
BMUException
- BMUException
-
loadRuleSetDef
public RuleSetDef loadRuleSetDef(java.io.File ruleSetDefFile) throws BMUException
- Parameters:
ruleSetDefFile
- File mit Regeldefinitionen- Returns:
- RuleSetDef
- Throws:
BMUException
- BMUException
-
loadRuleSetDef
public RuleSetDef loadRuleSetDef(RuleFactory.RuleConfig ruleConfig) throws BMUException
- Parameters:
ruleConfig
- RuleConfig- Returns:
- RuleSetDef
- Throws:
BMUException
- BMUException
-
getRuleConfig
public RuleFactory.RuleConfig getRuleConfig()
- Returns:
- RuleConfig
-
getDefaultRuleSetDef
public RuleSetDef getDefaultRuleSetDef() throws BMUException
- Returns:
- RuleSetDef
- Throws:
BMUException
- BMUException
-
loadRuleSetDef
public RuleSetDef loadRuleSetDef(java.io.InputStream is) throws BMUException
- Parameters:
is
- InputStream mit Regeldefinitionen- Returns:
- RuleSetDef
- Throws:
BMUException
- BMUException
-
saveRuleSetDef
public void saveRuleSetDef(java.io.File ruleSetFile, RuleSetDef ruleSetDef) throws BMUException
- Parameters:
ruleSetFile
- Die Datei zum Speichern der RegeldefinitionenruleSetDef
- Die Regeldefinitionen- Throws:
BMUException
- BMUException
-
saveRuleSetDef
public void saveRuleSetDef(java.io.OutputStream os, RuleSetDef ruleSetDef) throws BMUException
- Parameters:
os
- Der OutputStream zum Speichern der RegeldefinitionenruleSetDef
- Die Regeldefinitionen- Throws:
BMUException
- BMUException
-
saveRuleSetResult
public void saveRuleSetResult(java.io.OutputStream os, RuleSetResult ruleSetResult) throws BMUException
- Parameters:
os
- Der OutputStream zum Speichern der RegeldefinitionenruleSetResult
- Das Pruefergebnis- Throws:
BMUException
- BMUException
-
loadRuleSetResult
public RuleSetResult loadRuleSetResult(java.io.InputStream is) throws BMUException
- Parameters:
is
- InputStream mit Regelergebnissen- Returns:
- RuleSetResult
- Throws:
BMUException
- BMUException
-
createRuleSet
public RuleSet createRuleSet(RuleSetDef ruleSetDef) throws BMUException
Instanziiert aus der RuleSetDefinition ein ausführbares RuleSet. Ist das RuleSet wiederverwendbar? Hier könnte man ja auch deaktivierte Regeln überspringen?!- Parameters:
ruleSetDef
- Die Regeldefinitionen- Returns:
- RuleSet
- Throws:
BMUException
- BMUException
-
getTechDoc
public static java.lang.String getTechDoc(java.lang.String name) throws BMUException
- Parameters:
name
- Name der Regel- Returns:
- Die technische Dokumentation der Pruefregelimplementierung
- Throws:
BMUException
- BMUException
-
-