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

org.eclipse.uml2.uml.internal.operations.ActivityGroupOperations Maven / Gradle / Ivy

There is a newer version: 5.0.0-v20140602-0749
Show newest version
/*
 * Copyright (c) 2005, 2011 IBM Corporation, CEA, and others.
 * All rights reserved.   This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   IBM - initial API and implementation
 *   Kenn Hussey (CEA) - 327039, 351774
 *
 */
package org.eclipse.uml2.uml.internal.operations;

import java.util.Map;

import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.DiagnosticChain;

import org.eclipse.uml2.uml.ActivityGroup;

import org.eclipse.uml2.uml.util.UMLValidator;

/**
 * 
 * A static utility class that provides operations related to 'Activity Group' model objects.
 * 
 *
 * 

* The following operations are supported: *

    *
  • {@link org.eclipse.uml2.uml.ActivityGroup#validateGroupOwned(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) Validate Group Owned}
  • *
  • {@link org.eclipse.uml2.uml.ActivityGroup#validateNotContained(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) Validate Not Contained}
  • *
  • {@link org.eclipse.uml2.uml.ActivityGroup#validateNodesAndEdges(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) Validate Nodes And Edges}
  • *
*

* * @generated */ public class ActivityGroupOperations extends NamedElementOperations { /** * * * @generated */ protected ActivityGroupOperations() { super(); } /** * * * * All nodes and edges of the group must be in the same activity as the group. * true * @param activityGroup The receiving 'Activity Group' model object. * @param diagnostics The chain of diagnostics to which problems are to be appended. * @param context The cache of context-specific information. * * @generated */ public static boolean validateNodesAndEdges(ActivityGroup activityGroup, DiagnosticChain diagnostics, Map context) { // TODO: implement this method // -> specify the condition that violates the invariant // -> verify the details of the diagnostic, including severity and message // Ensure that you remove @generated or mark it @generated NOT if (false) { if (diagnostics != null) { diagnostics .add(new BasicDiagnostic( Diagnostic.ERROR, UMLValidator.DIAGNOSTIC_SOURCE, UMLValidator.ACTIVITY_GROUP__NODES_AND_EDGES, org.eclipse.emf.ecore.plugin.EcorePlugin.INSTANCE .getString( "_UI_GenericInvariant_diagnostic", new Object[]{"validateNodesAndEdges", org.eclipse.emf.ecore.util.EObjectValidator.getObjectLabel(activityGroup, context)}), //$NON-NLS-1$ //$NON-NLS-2$ new Object[]{activityGroup})); } return false; } return true; } /** * * * * No node or edge in a group may be contained by its subgroups or its containing groups, transitively. * true * @param activityGroup The receiving 'Activity Group' model object. * @param diagnostics The chain of diagnostics to which problems are to be appended. * @param context The cache of context-specific information. * * @generated */ public static boolean validateNotContained(ActivityGroup activityGroup, DiagnosticChain diagnostics, Map context) { // TODO: implement this method // -> specify the condition that violates the invariant // -> verify the details of the diagnostic, including severity and message // Ensure that you remove @generated or mark it @generated NOT if (false) { if (diagnostics != null) { diagnostics .add(new BasicDiagnostic( Diagnostic.ERROR, UMLValidator.DIAGNOSTIC_SOURCE, UMLValidator.ACTIVITY_GROUP__NOT_CONTAINED, org.eclipse.emf.ecore.plugin.EcorePlugin.INSTANCE .getString( "_UI_GenericInvariant_diagnostic", new Object[]{"validateNotContained", org.eclipse.emf.ecore.util.EObjectValidator.getObjectLabel(activityGroup, context)}), //$NON-NLS-1$ //$NON-NLS-2$ new Object[]{activityGroup})); } return false; } return true; } /** * * * * Groups may only be owned by activities or groups. * true * @param activityGroup The receiving 'Activity Group' model object. * @param diagnostics The chain of diagnostics to which problems are to be appended. * @param context The cache of context-specific information. * * @generated */ public static boolean validateGroupOwned(ActivityGroup activityGroup, DiagnosticChain diagnostics, Map context) { // TODO: implement this method // -> specify the condition that violates the invariant // -> verify the details of the diagnostic, including severity and message // Ensure that you remove @generated or mark it @generated NOT if (false) { if (diagnostics != null) { diagnostics .add(new BasicDiagnostic( Diagnostic.ERROR, UMLValidator.DIAGNOSTIC_SOURCE, UMLValidator.ACTIVITY_GROUP__GROUP_OWNED, org.eclipse.emf.ecore.plugin.EcorePlugin.INSTANCE .getString( "_UI_GenericInvariant_diagnostic", new Object[]{"validateGroupOwned", org.eclipse.emf.ecore.util.EObjectValidator.getObjectLabel(activityGroup, context)}), //$NON-NLS-1$ //$NON-NLS-2$ new Object[]{activityGroup})); } return false; } return true; } } // ActivityGroupOperations




© 2015 - 2024 Weber Informatics LLC | Privacy Policy