All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.imsweb.validation.edits.translated.npcr.NpcrTranslatedRuntimeEdits.groovy Maven / Gradle / Ivy

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()
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy