com.imsweb.validation.edits.seer.SeerRuntimeEdits.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of validation-edits-seer Show documentation
Show all versions of validation-edits-seer Show documentation
Java implemenation of the SEER edits.
package com.imsweb.validation.edits.seer
import com.imsweb.validation.ValidationXmlUtils
import com.imsweb.validation.entities.Validator
import com.imsweb.validation.runtime.*
import groovy.transform.CompileStatic
@CompileStatic
class SeerRuntimeEdits implements RuntimeEdits {
public static Validator loadValidator() {
try {
return ValidationXmlUtils.loadValidatorFromXml(getXmlUrl(), new SeerRuntimeEdits())
}
catch (IOException e) {
throw new RuntimeException("Unable to load validator", e)
}
}
public static URL getXmlUrl() {
return Thread.currentThread().getContextClassLoader().getResource("edits/seer/seer-edits.xml")
}
@Override
public CompiledRules getCompiledRules() {
return new SeerCompiledRules()
}
@Override
public ParsedProperties getParsedProperties() {
return new SeerParsedProperties()
}
@Override
public ParsedContexts getParsedContexts() {
return new SeerParsedContexts()
}
@Override
public ParsedLookups getParsedLookups() {
return new SeerParsedLookups()
}
}