com.imsweb.validation.edits.translated.npcr.NpcrTranslatedRuntimeEdits.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of validation-edits-npcr-translated Show documentation
Show all versions of validation-edits-npcr-translated Show documentation
Java implemenation of Genedits metafile edits.
The newest version!
package com.imsweb.validation.edits.translated.npcr
import com.imsweb.validation.ValidationXmlUtils
import com.imsweb.validation.entities.Validator
import com.imsweb.validation.runtime.*
import groovy.transform.CompileStatic
@CompileStatic
class NpcrTranslatedRuntimeEdits implements RuntimeEdits {
public static Validator loadValidator() {
try {
return ValidationXmlUtils.loadValidatorFromXml(getXmlUrl(), new NpcrTranslatedRuntimeEdits())
}
catch (IOException e) {
throw new RuntimeException("Unable to load validator", e)
}
}
public static URL getXmlUrl() {
return Thread.currentThread().getContextClassLoader().getResource("edits/translated/npcr/npcr-translated-edits.xml")
}
@Override
public CompiledRules getCompiledRules() {
return new NpcrTranslatedCompiledRules()
}
@Override
public ParsedProperties getParsedProperties() {
return new NpcrTranslatedParsedProperties()
}
@Override
public ParsedContexts getParsedContexts() {
return new NpcrTranslatedParsedContexts()
}
@Override
public ParsedLookups getParsedLookups() {
return new NpcrTranslatedParsedLookups()
}
}