Java 类org.eclipse.emf.common.util.DiagnosticChain 实例源码

项目:time4sys    文件:GqamValidator.java   
/**
 * Validates the notOnAnyTask constraint of '<em>Delay</em>'.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validateDelay_notOnAnyTask(Delay delay, DiagnosticChain diagnostics, Map<Object, Object> context) {
    // TODO implement the constraint
    // -> specify the condition that violates the constraint
    // -> verify the diagnostic details, including severity, code, and message
    // Ensure that you remove @generated or mark it @generated NOT
    if (false) {
        if (diagnostics != null) {
            diagnostics.add
                (createDiagnostic
                    (Diagnostic.ERROR,
                     DIAGNOSTIC_SOURCE,
                     0,
                     "_UI_GenericConstraint_diagnostic",
                     new Object[] { "notOnAnyTask", getObjectLabel(delay, context) },
                     new Object[] { delay },
                     context));
        }
        return false;
    }
    return true;
}
项目:OCCI-Studio    文件:InfrastructureValidator.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validateStorage(Storage storage, DiagnosticChain diagnostics, Map<Object, Object> context) {
    if (!validate_NoCircularContainment(storage, diagnostics, context)) return false;
    boolean result = validate_EveryMultiplicityConforms(storage, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryDataValueConforms(storage, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(storage, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(storage, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryProxyResolves(storage, diagnostics, context);
    if (result || diagnostics != null) result &= validate_UniqueID(storage, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryKeyUnique(storage, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(storage, diagnostics, context);
    if (result || diagnostics != null) result &= occiValidator.validateEntity_IdUnique(storage, diagnostics, context);
    if (result || diagnostics != null) result &= occiValidator.validateEntity_AttributesNameUnique(storage, diagnostics, context);
    if (result || diagnostics != null) result &= occiValidator.validateEntity_KindCompatibleWithOneAppliesOfEachMixin(storage, diagnostics, context);
    if (result || diagnostics != null) result &= occiValidator.validateResource_ResourceKindIsInParent(storage, diagnostics, context);
    return result;
}
项目:TOSCA-Studio    文件:ToscaValidator.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validateTosca_relationships_hostedon(Tosca_relationships_hostedon tosca_relationships_hostedon, DiagnosticChain diagnostics, Map<Object, Object> context) {
    if (!validate_NoCircularContainment(tosca_relationships_hostedon, diagnostics, context)) return false;
    boolean result = validate_EveryMultiplicityConforms(tosca_relationships_hostedon, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryDataValueConforms(tosca_relationships_hostedon, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(tosca_relationships_hostedon, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(tosca_relationships_hostedon, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryProxyResolves(tosca_relationships_hostedon, diagnostics, context);
    if (result || diagnostics != null) result &= validate_UniqueID(tosca_relationships_hostedon, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryKeyUnique(tosca_relationships_hostedon, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(tosca_relationships_hostedon, diagnostics, context);
    if (result || diagnostics != null) result &= validateTosca_relationships_root_appliesConstraint(tosca_relationships_hostedon, diagnostics, context);
    if (result || diagnostics != null) result &= validateTosca_relationships_hostedon_SourceMustBeDatabaseAndTargetMustBeDBMS(tosca_relationships_hostedon, diagnostics, context);
    if (result || diagnostics != null) result &= validateTosca_relationships_hostedon_SourceMustBeWebServerAndTargetMustBeWebApplication(tosca_relationships_hostedon, diagnostics, context);
    if (result || diagnostics != null) result &= validateTosca_relationships_hostedon_SourceMustBeContainerApplicationAndTargetMustBeContainerRuntime(tosca_relationships_hostedon, diagnostics, context);
    if (result || diagnostics != null) result &= validateTosca_relationships_hostedon_SourceMustBeSoftwareComponentAndTargetMustBeCompute(tosca_relationships_hostedon, diagnostics, context);
    return result;
}
项目:neoscada    文件:ExecComponentsValidator.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validatePingCheck ( PingCheck pingCheck, DiagnosticChain diagnostics, Map<Object, Object> context )
{
    if ( !validate_NoCircularContainment ( pingCheck, diagnostics, context ) )
        return false;
    boolean result = validate_EveryMultiplicityConforms ( pingCheck, diagnostics, context );
    if ( result || diagnostics != null )
        result &= validate_EveryDataValueConforms ( pingCheck, diagnostics, context );
    if ( result || diagnostics != null )
        result &= validate_EveryReferenceIsContained ( pingCheck, diagnostics, context );
    if ( result || diagnostics != null )
        result &= validate_EveryBidirectionalReferenceIsPaired ( pingCheck, diagnostics, context );
    if ( result || diagnostics != null )
        result &= validate_EveryProxyResolves ( pingCheck, diagnostics, context );
    if ( result || diagnostics != null )
        result &= validate_UniqueID ( pingCheck, diagnostics, context );
    if ( result || diagnostics != null )
        result &= validate_EveryKeyUnique ( pingCheck, diagnostics, context );
    if ( result || diagnostics != null )
        result &= validate_EveryMapEntryUnique ( pingCheck, diagnostics, context );
    if ( result || diagnostics != null )
        result &= validateExecJob_hasExecDriver ( pingCheck, diagnostics, context );
    return result;
}
项目:n4js    文件:PrePostDiagnostician.java   
private boolean preValidate(EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context) {
    if (eObject.eContainer() == null && !(eObject instanceof ValidationMarker)) {
        PreValidation pre = ValidationFactory.eINSTANCE.createPreValidation();
        pre.setDelegateResource(eObject.eResource());
        boolean result = super.validate(pre, diagnostics, context);
        if (!(result || diagnostics != null)) {
            return result;
        }
    }
    return true;
}
项目:OCCI-Studio    文件:SlaValidator.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validateAgreement_term(Agreement_term agreement_term, DiagnosticChain diagnostics, Map<Object, Object> context) {
    if (!validate_NoCircularContainment(agreement_term, diagnostics, context)) return false;
    boolean result = validate_EveryMultiplicityConforms(agreement_term, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryDataValueConforms(agreement_term, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(agreement_term, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(agreement_term, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryProxyResolves(agreement_term, diagnostics, context);
    if (result || diagnostics != null) result &= validate_UniqueID(agreement_term, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryKeyUnique(agreement_term, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(agreement_term, diagnostics, context);
    if (result || diagnostics != null) result &= validateAgreement_term_appliesConstraint(agreement_term, diagnostics, context);
    return result;
}
项目:OCCI-Studio    文件:CrtpValidator.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validateSmall(Small small, DiagnosticChain diagnostics, Map<Object, Object> context) {
    if (!validate_NoCircularContainment(small, diagnostics, context)) return false;
    boolean result = validate_EveryMultiplicityConforms(small, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryDataValueConforms(small, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(small, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(small, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryProxyResolves(small, diagnostics, context);
    if (result || diagnostics != null) result &= validate_UniqueID(small, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryKeyUnique(small, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(small, diagnostics, context);
    if (result || diagnostics != null) result &= validateSmall_appliesConstraint(small, diagnostics, context);
    return result;
}
项目:OCCI-Studio    文件:ActionImpl.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
@SuppressWarnings("unchecked")
public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
    switch (operationID) {
        case OCCIPackage.ACTION___CONTAINED_ACTION__DIAGNOSTICCHAIN_MAP:
            return containedAction((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1));
        case OCCIPackage.ACTION___CORRECT_SCHEME__DIAGNOSTICCHAIN_MAP:
            return CorrectScheme((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1));
    }
    return super.eInvoke(operationID, arguments);
}
项目:TOSCA-Studio    文件:Tosca_nodes_objectstorageImpl.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean appliesConstraint(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
    /**
     *
     * inv appliesConstraint:
     *   let
     *     severity : Integer[1] = 'Tosca_nodes_objectstorage::appliesConstraint'.getSeverity()
     *   in
     *     if severity <= 0
     *     then true
     *     else
     *       let
     *         result : occi::Boolean[1] = self.entity.oclIsKindOf(infrastructure::Storage)
     *       in
     *         'Tosca_nodes_objectstorage::appliesConstraint'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)
     *     endif
     */
    final /*@NonInvalid*/ Executor executor = PivotUtilInternal.getExecutor(this);
    final /*@NonInvalid*/ IdResolver idResolver = executor.getIdResolver();
    final /*@NonInvalid*/ IntegerValue severity_0 = CGStringGetSeverityOperation.INSTANCE.evaluate(executor, ToscaTables.STR_Tosca_nodes_objectstorage_c_c_appliesConstraint);
    final /*@NonInvalid*/ boolean le = OclComparableLessThanEqualOperation.INSTANCE.evaluate(executor, severity_0, ToscaTables.INT_0).booleanValue();
    /*@NonInvalid*/ boolean symbol_0;
    if (le) {
        symbol_0 = ValueUtil.TRUE_VALUE;
    }
    else {
        final /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_infrastructure_c_c_Storage = idResolver.getClass(ToscaTables.CLSSid_Storage, null);
        final /*@NonInvalid*/ Entity entity = this.getEntity();
        final /*@NonInvalid*/ boolean result = OclAnyOclIsKindOfOperation.INSTANCE.evaluate(executor, entity, TYP_infrastructure_c_c_Storage).booleanValue();
        final /*@NonInvalid*/ boolean logDiagnostic = CGStringLogDiagnosticOperation.INSTANCE.evaluate(executor, TypeId.BOOLEAN, ToscaTables.STR_Tosca_nodes_objectstorage_c_c_appliesConstraint, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, ToscaTables.INT_0).booleanValue();
        symbol_0 = logDiagnostic;
    }
    return Boolean.TRUE == symbol_0;
}
项目:TOSCA-Studio    文件:ToscaValidator.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validateTosca_nodes_loadbalancer(Tosca_nodes_loadbalancer tosca_nodes_loadbalancer, DiagnosticChain diagnostics, Map<Object, Object> context) {
    if (!validate_NoCircularContainment(tosca_nodes_loadbalancer, diagnostics, context)) return false;
    boolean result = validate_EveryMultiplicityConforms(tosca_nodes_loadbalancer, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryDataValueConforms(tosca_nodes_loadbalancer, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(tosca_nodes_loadbalancer, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(tosca_nodes_loadbalancer, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryProxyResolves(tosca_nodes_loadbalancer, diagnostics, context);
    if (result || diagnostics != null) result &= validate_UniqueID(tosca_nodes_loadbalancer, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryKeyUnique(tosca_nodes_loadbalancer, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(tosca_nodes_loadbalancer, diagnostics, context);
    if (result || diagnostics != null) result &= validateTosca_nodes_root_appliesConstraint(tosca_nodes_loadbalancer, diagnostics, context);
    return result;
}
项目:OCCI-Studio    文件:IpnetworkinterfaceImpl.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
@SuppressWarnings("unchecked")
public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
    switch (operationID) {
        case InfrastructurePackage.IPNETWORKINTERFACE___APPLIES_CONSTRAINT__DIAGNOSTICCHAIN_MAP:
            return appliesConstraint((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1));
        case InfrastructurePackage.IPNETWORKINTERFACE___IP_ADRESSES_MUST_BE_UNIQUE__DIAGNOSTICCHAIN_MAP:
            return IPAdressesMustBeUnique((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1));
    }
    return super.eInvoke(operationID, arguments);
}
项目:OCCI-Studio    文件:DatabaselinkImpl.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
@SuppressWarnings("unchecked")
public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
    switch (operationID) {
        case PlatformPackage.DATABASELINK___APPLIES_CONSTRAINT__DIAGNOSTICCHAIN_MAP:
            return appliesConstraint((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1));
    }
    return super.eInvoke(operationID, arguments);
}
项目:OCCI-Studio    文件:AttributeImpl.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
@SuppressWarnings("unchecked")
public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
    switch (operationID) {
        case OCCIPackage.ATTRIBUTE___DEFAULT_VALUE_MUST_BE_INSTANCE_OF_TYPE__DIAGNOSTICCHAIN_MAP:
            return DefaultValueMustBeInstanceOfType((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1));
    }
    return super.eInvoke(operationID, arguments);
}
项目:TOSCA-Studio    文件:Tosca_relationships_attachestoImpl.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean SourceMustBeComputeAndTargetMustBeBlockStorage(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
    /**
     * inv SourceMustBeComputeAndTargetMustBeBlockStorage: true
     */
    return ValueUtil.TRUE_VALUE;
}
项目:TOSCA-Studio    文件:Tosca_nodes_computeImpl.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean SourceMustBeSoftwareComponent(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
    /**
     * inv SourceMustBeSoftwareComponent: true
     */
    return ValueUtil.TRUE_VALUE;
}
项目:OCCI-Studio    文件:InfrastructureValidator.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validateIpnetwork(Ipnetwork ipnetwork, DiagnosticChain diagnostics, Map<Object, Object> context) {
    if (!validate_NoCircularContainment(ipnetwork, diagnostics, context)) return false;
    boolean result = validate_EveryMultiplicityConforms(ipnetwork, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryDataValueConforms(ipnetwork, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(ipnetwork, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(ipnetwork, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryProxyResolves(ipnetwork, diagnostics, context);
    if (result || diagnostics != null) result &= validate_UniqueID(ipnetwork, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryKeyUnique(ipnetwork, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(ipnetwork, diagnostics, context);
    if (result || diagnostics != null) result &= validateIpnetwork_appliesConstraint(ipnetwork, diagnostics, context);
    return result;
}
项目:TOSCA-Studio    文件:Tosca_relationships_rootImpl.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
@SuppressWarnings("unchecked")
public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
    switch (operationID) {
        case ToscaPackage.TOSCA_RELATIONSHIPS_ROOT___APPLIES_CONSTRAINT__DIAGNOSTICCHAIN_MAP:
            return appliesConstraint((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1));
    }
    return super.eInvoke(operationID, arguments);
}
项目:OCCI-Studio    文件:ArrayTypeImpl.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
@SuppressWarnings("unchecked")
public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
    switch (operationID) {
        case OCCIPackage.ARRAY_TYPE___TYPE_DIFFERENT_CONTAINER__DIAGNOSTICCHAIN_MAP:
            return TypeDifferentContainer((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1));
    }
    return super.eInvoke(operationID, arguments);
}
项目:xmontiarc    文件:XmontiarcValidator.java   
/**
 * Validates the AtomicOrComposed constraint of '<em>Component Type</em>'.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validateComponentType_AtomicOrComposed(ComponentType componentType, DiagnosticChain diagnostics, Map<Object, Object> context) {
    return
        validate
            (XmontiarcPackage.Literals.COMPONENT_TYPE,
             componentType,
             diagnostics,
             context,
             "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot",
             "AtomicOrComposed",
             COMPONENT_TYPE__ATOMIC_OR_COMPOSED__EEXPRESSION,
             Diagnostic.ERROR,
             DIAGNOSTIC_SOURCE,
             0);
}
项目:OCCI-Studio    文件:NetworkinterfaceImpl.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean targetConstraint(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
    /**
     *
     * inv targetConstraint:
     *   let
     *     severity : Integer[1] = 'Networkinterface::targetConstraint'.getSeverity()
     *   in
     *     if severity <= 0
     *     then true
     *     else
     *       let result : occi::Boolean[1] = self.target.oclIsKindOf(Network)
     *       in
     *         'Networkinterface::targetConstraint'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)
     *     endif
     */
    final /*@NonInvalid*/ Executor executor = PivotUtilInternal.getExecutor(this);
    final /*@NonInvalid*/ IdResolver idResolver = executor.getIdResolver();
    final /*@NonInvalid*/ IntegerValue severity_0 = CGStringGetSeverityOperation.INSTANCE.evaluate(executor, InfrastructureTables.STR_Networkinterface_c_c_targetConstraint);
    final /*@NonInvalid*/ boolean le = OclComparableLessThanEqualOperation.INSTANCE.evaluate(executor, severity_0, InfrastructureTables.INT_0).booleanValue();
    /*@NonInvalid*/ boolean symbol_0;
    if (le) {
        symbol_0 = ValueUtil.TRUE_VALUE;
    }
    else {
        final /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_infrastructure_c_c_Network_0 = idResolver.getClass(InfrastructureTables.CLSSid_Network, null);
        final /*@NonInvalid*/ Resource target = this.getTarget();
        final /*@NonInvalid*/ boolean result = OclAnyOclIsKindOfOperation.INSTANCE.evaluate(executor, target, TYP_infrastructure_c_c_Network_0).booleanValue();
        final /*@NonInvalid*/ boolean logDiagnostic = CGStringLogDiagnosticOperation.INSTANCE.evaluate(executor, TypeId.BOOLEAN, InfrastructureTables.STR_Networkinterface_c_c_targetConstraint, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, InfrastructureTables.INT_0).booleanValue();
        symbol_0 = logDiagnostic;
    }
    return Boolean.TRUE == symbol_0;
}
项目:OCCI-Studio    文件:RecordFieldImpl.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated NOT
 */
public boolean TypeDifferentContainer(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
    /**
     *
     * inv TypeDifferentContainer:
     *   let
     *     severity : Integer[1] = 'RecordField::TypeDifferentContainer'.getSeverity()
     *   in
     *     if severity <= 0
     *     then true
     *     else
     *       let result : Boolean[1] = self.type <> self.oclContainer
     *       in
     *         'RecordField::TypeDifferentContainer'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)
     *     endif
     */
    final /*@NonInvalid*/ Executor executor = PivotUtilInternal.getExecutor(this);
    final /*@NonInvalid*/ IntegerValue severity_0 = CGStringGetSeverityOperation.INSTANCE.evaluate(executor, OCCITables.STR_RecordField_c_c_TypeDifferentContainer);
    final /*@NonInvalid*/ boolean le = OclComparableLessThanEqualOperation.INSTANCE.evaluate(executor, severity_0, OCCITables.INT_0).booleanValue();
    /*@NonInvalid*/ boolean symbol_0;
    if (le) {
        symbol_0 = ValueUtil.TRUE_VALUE;
    }
    else {
        final /*@NonInvalid*/ DataType type = this.getType();
        final /*@NonInvalid*/ Object oclContainer = this.eContainer();
        final /*@NonInvalid*/ boolean result = !type.equals(oclContainer);
        final /*@NonInvalid*/ boolean logDiagnostic = CGStringLogDiagnosticOperation.INSTANCE.evaluate(executor, TypeId.BOOLEAN, OCCITables.STR_RecordField_c_c_TypeDifferentContainer, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, OCCITables.INT_0).booleanValue();
        symbol_0 = logDiagnostic;
    }
    return Boolean.TRUE == symbol_0;
}
项目:TOSCA-Studio    文件:ToscaValidator.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validateTosca_relationships_attachesto(Tosca_relationships_attachesto tosca_relationships_attachesto, DiagnosticChain diagnostics, Map<Object, Object> context) {
    if (!validate_NoCircularContainment(tosca_relationships_attachesto, diagnostics, context)) return false;
    boolean result = validate_EveryMultiplicityConforms(tosca_relationships_attachesto, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryDataValueConforms(tosca_relationships_attachesto, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(tosca_relationships_attachesto, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(tosca_relationships_attachesto, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryProxyResolves(tosca_relationships_attachesto, diagnostics, context);
    if (result || diagnostics != null) result &= validate_UniqueID(tosca_relationships_attachesto, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryKeyUnique(tosca_relationships_attachesto, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(tosca_relationships_attachesto, diagnostics, context);
    if (result || diagnostics != null) result &= validateTosca_relationships_attachesto_appliesConstraint(tosca_relationships_attachesto, diagnostics, context);
    if (result || diagnostics != null) result &= validateTosca_relationships_attachesto_SourceMustBeComputeAndTargetMustBeBlockStorage(tosca_relationships_attachesto, diagnostics, context);
    return result;
}
项目:xmontiarc    文件:CdValidator.java   
/**
 * Validates the AttributeNameBeginsLowerCase constraint of '<em>CD Attribute</em>'.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validateCDAttribute_AttributeNameBeginsLowerCase(CDAttribute cdAttribute, DiagnosticChain diagnostics, Map<Object, Object> context) {
    return
        validate
            (CdPackage.Literals.CD_ATTRIBUTE,
             cdAttribute,
             diagnostics,
             context,
             "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot",
             "AttributeNameBeginsLowerCase",
             CD_ATTRIBUTE__ATTRIBUTE_NAME_BEGINS_LOWER_CASE__EEXPRESSION,
             Diagnostic.ERROR,
             DIAGNOSTIC_SOURCE,
             0);
}
项目:OCCI-Studio    文件:DatabaselinkImpl.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean appliesConstraint(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
    /**
     *
     * inv appliesConstraint:
     *   let severity : Integer[1] = 'Databaselink::appliesConstraint'.getSeverity()
     *   in
     *     if severity <= 0
     *     then true
     *     else
     *       let
     *         result : occi::Boolean[1] = self.entity.oclIsKindOf(Componentlink)
     *       in
     *         'Databaselink::appliesConstraint'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)
     *     endif
     */
    final /*@NonInvalid*/ Executor executor = PivotUtilInternal.getExecutor(this);
    final /*@NonInvalid*/ IdResolver idResolver = executor.getIdResolver();
    final /*@NonInvalid*/ IntegerValue severity_0 = CGStringGetSeverityOperation.INSTANCE.evaluate(executor, PlatformTables.STR_Databaselink_c_c_appliesConstraint);
    final /*@NonInvalid*/ boolean le = OclComparableLessThanEqualOperation.INSTANCE.evaluate(executor, severity_0, PlatformTables.INT_0).booleanValue();
    /*@NonInvalid*/ boolean symbol_0;
    if (le) {
        symbol_0 = ValueUtil.TRUE_VALUE;
    }
    else {
        final /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_platform_c_c_Componentlink = idResolver.getClass(PlatformTables.CLSSid_Componentlink, null);
        final /*@NonInvalid*/ Entity entity = this.getEntity();
        final /*@NonInvalid*/ boolean result = OclAnyOclIsKindOfOperation.INSTANCE.evaluate(executor, entity, TYP_platform_c_c_Componentlink).booleanValue();
        final /*@NonInvalid*/ boolean logDiagnostic = CGStringLogDiagnosticOperation.INSTANCE.evaluate(executor, TypeId.BOOLEAN, PlatformTables.STR_Databaselink_c_c_appliesConstraint, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, PlatformTables.INT_0).booleanValue();
        symbol_0 = logDiagnostic;
    }
    return Boolean.TRUE == symbol_0;
}
项目:OCCI-Studio    文件:Mem_smallImpl.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
@SuppressWarnings("unchecked")
public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
    switch (operationID) {
        case CrtpPackage.MEM_SMALL___APPLIES_CONSTRAINT__DIAGNOSTICCHAIN_MAP:
            return appliesConstraint((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1));
    }
    return super.eInvoke(operationID, arguments);
}
项目:neoscada    文件:ConfigurationValidator.java   
/**
 * Validates the Min constraint of '<em>Column Number Type</em>'.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validateColumnNumberType_Min ( int columnNumberType, DiagnosticChain diagnostics, Map<Object, Object> context )
{
    boolean result = columnNumberType >= COLUMN_NUMBER_TYPE__MIN__VALUE;
    if ( !result && diagnostics != null )
        reportMinViolation ( ConfigurationPackage.Literals.COLUMN_NUMBER_TYPE, columnNumberType, COLUMN_NUMBER_TYPE__MIN__VALUE, true, diagnostics, context );
    return result;
}
项目:TOSCA-Studio    文件:Tosca_nodes_dbmsImpl.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
@SuppressWarnings("unchecked")
public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
    switch (operationID) {
        case ToscaPackage.TOSCA_NODES_DBMS___SOURCE_MUST_BE_DATABASE__DIAGNOSTICCHAIN_MAP:
            return SourceMustBeDatabase((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1));
    }
    return super.eInvoke(operationID, arguments);
}
项目:OCCI-Studio    文件:SlaValidator.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validateAgreement_tpl(Agreement_tpl agreement_tpl, DiagnosticChain diagnostics, Map<Object, Object> context) {
    if (!validate_NoCircularContainment(agreement_tpl, diagnostics, context)) return false;
    boolean result = validate_EveryMultiplicityConforms(agreement_tpl, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryDataValueConforms(agreement_tpl, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(agreement_tpl, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(agreement_tpl, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryProxyResolves(agreement_tpl, diagnostics, context);
    if (result || diagnostics != null) result &= validate_UniqueID(agreement_tpl, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryKeyUnique(agreement_tpl, diagnostics, context);
    if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(agreement_tpl, diagnostics, context);
    if (result || diagnostics != null) result &= validateAgreement_tpl_appliesConstraint(agreement_tpl, diagnostics, context);
    return result;
}
项目:Saturn    文件:TypesValidator.java   
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public boolean validateSaturnStatusEnum(SaturnStatusEnum saturnStatusEnum, DiagnosticChain diagnostics,
    Map<Object, Object> context)
{
  return true;
}
项目:Saturn    文件:TypesValidator.java   
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public boolean validateColumn(Column column, DiagnosticChain diagnostics, Map<Object, Object> context)
{
  return validate_EveryDefaultConstraint(column, diagnostics, context);
}
项目:Saturn    文件:TypesValidator.java   
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public boolean validateModulesEnumObject(ModulesEnum modulesEnumObject, DiagnosticChain diagnostics,
    Map<Object, Object> context)
{
  return true;
}
项目:rest-modeling-framework    文件:AbstractRamlValidator.java   
@Override
public boolean validate(EDataType eDataType, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) {
    return true;
}
项目:Saturn    文件:MqModuleValidator.java   
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public boolean validateDocumentRoot(DocumentRoot documentRoot, DiagnosticChain diagnostics,
    Map<Object, Object> context)
{
  return validate_EveryDefaultConstraint(documentRoot, diagnostics, context);
}
项目:Saturn    文件:TypesValidator.java   
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public boolean validateAbstractListener(AbstractListener abstractListener, DiagnosticChain diagnostics,
    Map<Object, Object> context)
{
  return validate_EveryDefaultConstraint(abstractListener, diagnostics, context);
}
项目:neoscada    文件:ConfigurationValidator.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validatePeriodType ( int periodType, DiagnosticChain diagnostics, Map<Object, Object> context )
{
    boolean result = validatePeriodType_Min ( periodType, diagnostics, context );
    return result;
}
项目:Saturn    文件:MqModuleValidator.java   
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public boolean validateInputMessageType(InputMessageType inputMessageType, DiagnosticChain diagnostics,
    Map<Object, Object> context)
{
  return true;
}
项目:OCCI-Studio    文件:TypeImpl.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean ActionTermUnicity(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
    /**
     *
     * inv ActionTermUnicity:
     *   let severity : Integer[1] = 'Type::ActionTermUnicity'.getSeverity()
     *   in
     *     if severity <= 0
     *     then true
     *     else
     *       let result : Boolean[1] = actions->isUnique(term)
     *       in
     *         'Type::ActionTermUnicity'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)
     *     endif
     */
    final /*@NonInvalid*/ Executor executor = PivotUtilInternal.getExecutor(this);
    final /*@NonInvalid*/ IdResolver idResolver = executor.getIdResolver();
    final /*@NonInvalid*/ IntegerValue severity_0 = CGStringGetSeverityOperation.INSTANCE.evaluate(executor, OCCITables.STR_Type_c_c_ActionTermUnicity);
    final /*@NonInvalid*/ boolean le = OclComparableLessThanEqualOperation.INSTANCE.evaluate(executor, severity_0, OCCITables.INT_0).booleanValue();
    /*@NonInvalid*/ boolean symbol_0;
    if (le) {
        symbol_0 = ValueUtil.TRUE_VALUE;
    }
    else {
        final /*@NonInvalid*/ List<Action> actions = this.getActions();
        final /*@NonInvalid*/ OrderedSetValue BOXED_actions = idResolver.createOrderedSetOfAll(OCCITables.ORD_CLSSid_Action, actions);
        /*@Thrown*/ SetValue.Accumulator accumulator = ValueUtil.createSetAccumulatorValue(OCCITables.ORD_CLSSid_Action);
        /*@NonNull*/ Iterator<Object> ITERATOR__1 = BOXED_actions.iterator();
        /*@NonInvalid*/ boolean result;
        while (true) {
            if (!ITERATOR__1.hasNext()) {
                result = ValueUtil.TRUE_VALUE;
                break;
            }
            /*@NonInvalid*/ Action _1 = (Action)ITERATOR__1.next();
            /**
             * term
             */
            final /*@NonInvalid*/ String term = _1.getTerm();
            //
            if (accumulator.includes(term) == ValueUtil.TRUE_VALUE) {
                result = ValueUtil.FALSE_VALUE;         // Abort after second find
                break;
            }
            else {
                accumulator.add(term);
            }
        }
        final /*@NonInvalid*/ boolean logDiagnostic = CGStringLogDiagnosticOperation.INSTANCE.evaluate(executor, TypeId.BOOLEAN, OCCITables.STR_Type_c_c_ActionTermUnicity, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, OCCITables.INT_0).booleanValue();
        symbol_0 = logDiagnostic;
    }
    return Boolean.TRUE == symbol_0;
}
项目:Saturn    文件:MqModuleValidator.java   
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public boolean validateMQClearOperation(MQClearOperation mqClearOperation, DiagnosticChain diagnostics,
    Map<Object, Object> context)
{
  return validate_EveryDefaultConstraint(mqClearOperation, diagnostics, context);
}
项目:Saturn    文件:TypesValidator.java   
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public boolean validateNamedResourceDefinition(NamedResourceDefinition namedResourceDefinition,
    DiagnosticChain diagnostics, Map<Object, Object> context)
{
  return validate_EveryDefaultConstraint(namedResourceDefinition, diagnostics, context);
}
项目:OCCI-Studio    文件:FSMImpl.java   
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean containedAttribute(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
    /**
     *
     * inv containedAttribute:
     *   let severity : Integer[1] = 'FSM::containedAttribute'.getSeverity()
     *   in
     *     if severity <= 0
     *     then true
     *     else
     *       let
     *         result : Boolean[1] = self.oclContainer()
     *         .oclAsType(Type)
     *         .attributes->includes(self.attribute)
     *       in
     *         'FSM::containedAttribute'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)
     *     endif
     */
    final /*@NonInvalid*/ Executor executor = PivotUtilInternal.getExecutor(this);
    final /*@NonInvalid*/ IdResolver idResolver = executor.getIdResolver();
    final /*@NonInvalid*/ IntegerValue severity_0 = CGStringGetSeverityOperation.INSTANCE.evaluate(executor, OCCITables.STR_FSM_c_c_containedAttribute);
    final /*@NonInvalid*/ boolean le = OclComparableLessThanEqualOperation.INSTANCE.evaluate(executor, severity_0, OCCITables.INT_0).booleanValue();
    /*@NonInvalid*/ boolean symbol_0;
    if (le) {
        symbol_0 = ValueUtil.TRUE_VALUE;
    }
    else {
        /*@Caught*/ /*@NonNull*/ Object CAUGHT_result;
        try {
            final /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_occi_c_c_Type = idResolver.getClass(OCCITables.CLSSid_Type, null);
            final /*@NonInvalid*/ Object oclContainer = ClassifierOclContainerOperation.INSTANCE.evaluate(executor, this);
            final /*@Thrown*/ Type oclAsType = ClassUtil.nonNullState((Type)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, oclContainer, TYP_occi_c_c_Type));
            final /*@Thrown*/ List<Attribute> attributes = oclAsType.getAttributes();
            final /*@Thrown*/ OrderedSetValue BOXED_attributes = idResolver.createOrderedSetOfAll(OCCITables.ORD_CLSSid_Attribute, attributes);
            final /*@NonInvalid*/ Attribute attribute = this.getAttribute();
            final /*@Thrown*/ boolean result = CollectionIncludesOperation.INSTANCE.evaluate(BOXED_attributes, attribute).booleanValue();
            CAUGHT_result = result;
        }
        catch (Exception e) {
            CAUGHT_result = ValueUtil.createInvalidValue(e);
        }
        final /*@NonInvalid*/ boolean logDiagnostic = CGStringLogDiagnosticOperation.INSTANCE.evaluate(executor, TypeId.BOOLEAN, OCCITables.STR_FSM_c_c_containedAttribute, this, (Object)null, diagnostics, context, (Object)null, severity_0, CAUGHT_result, OCCITables.INT_0).booleanValue();
        symbol_0 = logDiagnostic;
    }
    return Boolean.TRUE == symbol_0;
}