org.isda.cdm.meta.StringRepMeta Maven / Gradle / Ivy
package org.isda.cdm.meta;
import com.rosetta.model.lib.annotations.RosettaMeta;
import com.rosetta.model.lib.meta.RosettaMetaData;
import com.rosetta.model.lib.qualify.QualifyFunctionFactory;
import com.rosetta.model.lib.qualify.QualifyResult;
import com.rosetta.model.lib.validation.Validator;
import com.rosetta.model.lib.validation.ValidatorFactory;
import com.rosetta.model.lib.validation.ValidatorWithArg;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.function.Function;
import org.isda.cdm.StringRep;
import org.isda.cdm.validation.StringRepTypeFormatValidator;
import org.isda.cdm.validation.StringRepValidator;
import org.isda.cdm.validation.exists.StringRepOnlyExistsValidator;
/**
* @version test
*/
@RosettaMeta(model=StringRep.class)
public class StringRepMeta implements RosettaMetaData {
@Override
public List> dataRules(ValidatorFactory factory) {
return Arrays.asList(
factory.create(org.isda.cdm.validation.datarule.StringRepForChildClass.class)
);
}
@Override
public List> getQualifyFunctions(QualifyFunctionFactory factory) {
return Collections.emptyList();
}
@Override
public Validator super StringRep> validator() {
return new StringRepValidator();
}
@Override
public Validator super StringRep> typeFormatValidator() {
return new StringRepTypeFormatValidator();
}
@Override
public ValidatorWithArg super StringRep, Set> onlyExistsValidator() {
return new StringRepOnlyExistsValidator();
}
}