Package com.regnosys.rosetta.validation
Class RosettaSimpleValidator
java.lang.Object
org.eclipse.xtext.validation.AbstractInjectableValidator
org.eclipse.xtext.validation.AbstractDeclarativeValidator
com.regnosys.rosetta.validation.RosettaSimpleValidator
- All Implemented Interfaces:
org.eclipse.emf.ecore.EValidator,org.eclipse.xtext.validation.ValidationMessageAcceptor
public class RosettaSimpleValidator
extends org.eclipse.xtext.validation.AbstractDeclarativeValidator
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classNested classes/interfaces inherited from class org.eclipse.xtext.validation.AbstractDeclarativeValidator
org.eclipse.xtext.validation.AbstractDeclarativeValidator.MethodWrapper, org.eclipse.xtext.validation.AbstractDeclarativeValidator.State, org.eclipse.xtext.validation.AbstractDeclarativeValidator.StateAccessNested classes/interfaces inherited from interface org.eclipse.emf.ecore.EValidator
org.eclipse.emf.ecore.EValidator.Descriptor, org.eclipse.emf.ecore.EValidator.PatternMatcher, org.eclipse.emf.ecore.EValidator.Registry, org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider, org.eclipse.emf.ecore.EValidator.ValidationDelegate -
Field Summary
Fields inherited from class org.eclipse.xtext.validation.AbstractInjectableValidator
CURRENT_LANGUAGE_NAME, ISSUE_SEVERITIESFields inherited from interface org.eclipse.emf.ecore.EValidator
MARKER, RELATED_URIS_ATTRIBUTE, URI_ATTRIBUTEFields inherited from interface org.eclipse.xtext.validation.ValidationMessageAcceptor
INSIGNIFICANT_INDEX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanprotected CharSequencecardinality(Attribute attr) voidvoidvoidvoidvoidcheckAttribute(Attribute ele) protected voidcheckAttributeCardinalityMatchSuper(Iterable<Attribute> attrFromClazzes, Iterable<Attribute> attrFromSuperClasses, String name) voidcheckAttributeNameStartsWithLowerCase(Attribute attribute) voidCheck all report attribute type and cardinality match the associated reporting rulesvoidcheckAttributes(Data clazz) voidvoidcheckClassNameStartsWithCapital(Data classe) voidvoidvoidvoidcheckConditionName(Condition condition) voidvoidvoidvoidvoidcheckDispatch(Function ele) voidcheckEnumerationNameStartsWithCapital(RosettaEnumeration enumeration) voidcheckEnumValuesAreUnique(RosettaEnumeration enumeration) voidvoidvoidvoidvoidvoidcheckForLocation(Attribute attribute, AnnotationQualifier checked) voidvoidvoidvoidcheckFunctionNameStartsWithCapital(Function enumeration) voidvoidvoidvoidcheckImport(RosettaModel model) voidvoidvoidvoidvoidcheckMappingDefaultCase(RosettaMapping element) voidcheckMappingSetToCase(RosettaMapping element) voidvoidcheckMergeSynonymAttributeCardinality(Attribute attribute) voidvoidvoidvoidprotected voidcheckOverridingTypeAttributeMustHaveSameOrExtendedTypeAsParent(Iterable<Attribute> attrFromClazzes, Iterable<Attribute> attrFromSuperClasses, String name) voidvoidvoidvoidcheckPatternAndFormat(Attribute attribute) voidvoidcheckPatternOnEnum(RosettaEnumSynonym synonym) voidvoidvoidvoidcheckRuleSource(RosettaReport report) voidvoidvoidvoidvoidprotected voidcheckTypeAttributeMustHaveSameTypeAsParent(Iterable<Attribute> attrFromClazzes, Iterable<Attribute> attrFromSuperClasses, String name) voidcheckTypeExpectation(org.eclipse.emf.ecore.EObject owner) voidvoidvoidbooleanprotected org.eclipse.xtext.validation.AbstractDeclarativeValidator.MethodWrappercreateMethodWrapper(org.eclipse.xtext.validation.AbstractDeclarativeValidator instanceToUse, Method method) voidvoidgetContainerType(RosettaMapping element) org.eclipse.emf.ecore.EObjectgetEnclosingCodeBlock(org.eclipse.emf.ecore.EObject obj) Returns the object that directly encloses the given object with parentheses or brackets, or the first encountered root element.protected List<org.eclipse.emf.ecore.EPackage>protected voidhandleExceptionDuringValidation(Throwable targetException) booleanbooleanbooleanvoidvoidregister(org.eclipse.xtext.validation.EValidatorRegistrar registrar) voidvoidMethods inherited from class org.eclipse.xtext.validation.AbstractDeclarativeValidator
acceptError, acceptError, acceptInfo, acceptInfo, acceptWarning, acceptWarning, addIssue, addIssue, addIssue, addIssue, addIssue, addIssueToState, checkDone, checkIsFromCurrentlyCheckedResource, createDiagnostic, createDiagnostic, error, error, error, error, error, error, error, error, getCancelIndicator, getChain, getCheckMode, getContext, getCurrentMethod, getCurrentObject, getIssueSeverities, getMessageAcceptor, guard, info, info, info, info, info, info, info, info, internalValidate, isIgnored, newInstance, setInjector, setMessageAcceptor, toDiagnosticSeverity, warning, warning, warning, warning, warning, warning, warning, warningMethods inherited from class org.eclipse.xtext.validation.AbstractInjectableValidator
getCurrentLanguage, isLanguageSpecific, isResponsible, validate, validate, validate
-
Constructor Details
-
RosettaSimpleValidator
public RosettaSimpleValidator()
-
-
Method Details
-
getEPackages
- Overrides:
getEPackagesin classorg.eclipse.xtext.validation.AbstractInjectableValidator
-
register
public void register(org.eclipse.xtext.validation.EValidatorRegistrar registrar) - Overrides:
registerin classorg.eclipse.xtext.validation.AbstractInjectableValidator
-
handleExceptionDuringValidation
- Overrides:
handleExceptionDuringValidationin classorg.eclipse.xtext.validation.AbstractDeclarativeValidator- Throws:
RuntimeException
-
createMethodWrapper
protected org.eclipse.xtext.validation.AbstractDeclarativeValidator.MethodWrapper createMethodWrapper(org.eclipse.xtext.validation.AbstractDeclarativeValidator instanceToUse, Method method) - Overrides:
createMethodWrapperin classorg.eclipse.xtext.validation.AbstractDeclarativeValidator
-
ruleMustHaveInputTypeDeclared
-
deprecatedMap
-
unnecesarrySquareBracketsCheck
-
hasSquareBrackets
-
areSquareBracketsMandatory
-
mandatoryThenCheck
-
isThenMandatory
-
ambiguousFunctionalOperation
-
isNestedFunctionalOperation
-
containsNestedFunctionalOperation
-
getEnclosingCodeBlock
public org.eclipse.emf.ecore.EObject getEnclosingCodeBlock(org.eclipse.emf.ecore.EObject obj) Returns the object that directly encloses the given object with parentheses or brackets, or the first encountered root element. -
checkParametrizedType
-
checkAnnotationSource
-
checkSynonymSource
-
checkRuleSource
-
checkRuleSource
-
deprecatedExtraneousSegment
-
checkGeneratedInputInContextWithImplicitVariable
-
checkImplicitVariableReferenceInContextWithoutImplicitVariable
public void checkImplicitVariableReferenceInContextWithoutImplicitVariable(RosettaImplicitVariable e) -
checkClassNameStartsWithCapital
-
checkConditionName
-
checkFeatureCallFeature
-
checkFunctionNameStartsWithCapital
-
checkEnumerationNameStartsWithCapital
-
checkAttributeNameStartsWithLowerCase
-
checkTypeExpectation
public void checkTypeExpectation(org.eclipse.emf.ecore.EObject owner) -
checkAttributes
-
checkTypeAttributeMustHaveSameTypeAsParent
-
checkOverridingTypeAttributeMustHaveSameOrExtendedTypeAsParent
-
checkAttributeCardinalityMatchSuper
-
cardinality
-
checkEnumValuesAreUnique
-
checkFeatureNamesAreUnique
-
checkFunctionElementNamesAreUnique
-
checkClosureParameterNamesAreUnique
-
checkTypeNamesAreUnique
-
checkMappingSetToCase
-
getContainerType
-
checkMappingDefaultCase
-
checkSymbolReference
-
checkMergeSynonymAttributeCardinality
-
checkMergeSynonymAttributeCardinality
-
checkPatternAndFormat
-
checkPatternAndFormat
-
checkFormatNull
-
checkFormatValid
-
checkPatternNull
-
checkPatternValid
-
checkPatternOnEnum
-
checkAttributeRuleReference
Check all report attribute type and cardinality match the associated reporting rules -
checkExpressionCardinality
-
checkBinaryParamsRightTypes
-
checkDefaultOperationMatchingCardinality
-
checkFuncDispatchAttr
-
checkAttribute
-
checkDispatch
-
checkConditionDontUseOutput
-
checkAssignAnAlias
-
checkConstructorExpression
-
checkListLiteral
-
checkSynonyMapPath
-
checkSynonyValuePath
-
checkCountOpArgument
-
checkParseOpArgument
-
checkToStringOpArgument
-
checkFunctionPrefix
-
checkMetadataAnnotation
-
checkForLocation
-
checkCreationAnnotation
-
checkQualificationAnnotation
-
checkOnlyExistsPathsHaveCommonParent
-
checkUnaryOperation
-
checkInlineFunction
-
checkMandatoryFunctionalOperation
-
checkUnaryFunctionalOperation
-
checkFilterOperation
-
checkMapOperation
-
checkFlattenOperation
-
checkReduceOperation
-
checkNumberReducerOperation
-
checkComparingFunctionalOperation
-
checkAsKeyOperation
-
checkImport
-
checkOutputOperation
-
checkAlias
-