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

com.imsweb.validation.edits.seer.SeerRuntimeEdits.groovy Maven / Gradle / Ivy

There is a newer version: 024-13
Show newest version
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()
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy