001: package org.andromda.metafacades.emf.uml2;
002:
003: import org.eclipse.uml2.PseudostateKind;
004:
005: /**
006: * MetafacadeLogic implementation for
007: * org.andromda.metafacades.uml.PseudostateFacade.
008: *
009: * @see org.andromda.metafacades.uml.PseudostateFacade
010: */
011: public class PseudostateFacadeLogicImpl extends PseudostateFacadeLogic {
012: public PseudostateFacadeLogicImpl(
013: final org.eclipse.uml2.Pseudostate metaObject,
014: final String context) {
015: super (metaObject, context);
016: }
017:
018: /**
019: * @see org.andromda.metafacades.uml.PseudostateFacade#isChoice()
020: */
021: protected boolean handleIsChoice() {
022: return this .metaObject.getKind().getValue() == (PseudostateKind.CHOICE);
023: }
024:
025: /**
026: * @see org.andromda.metafacades.uml.PseudostateFacade#isDecisionPoint()
027: */
028: protected boolean handleIsDecisionPoint() {
029: return (this .isChoice() || this .isJunction())
030: && this .metaObject.getOutgoings().size() > 1;
031: }
032:
033: /**
034: * @see org.andromda.metafacades.uml.PseudostateFacade#isMergePoint()
035: */
036: protected boolean handleIsMergePoint() {
037: return (this .isChoice() || this .isJunction())
038: && this .metaObject.getIncomings().size() > 1;
039: }
040:
041: /**
042: * @see org.andromda.metafacades.uml.PseudostateFacade#isDeepHistory()
043: */
044: protected boolean handleIsDeepHistory() {
045: return this .metaObject.getKind().getValue() == (PseudostateKind.DEEP_HISTORY);
046: }
047:
048: /**
049: * @see org.andromda.metafacades.uml.PseudostateFacade#isFork()
050: */
051: protected boolean handleIsFork() {
052: return this .metaObject.getKind().getValue() == (PseudostateKind.FORK);
053: }
054:
055: /**
056: * @see org.andromda.metafacades.uml.PseudostateFacade#isInitialState()
057: */
058: protected boolean handleIsInitialState() {
059: return this .metaObject.getKind().getValue() == (PseudostateKind.INITIAL);
060: }
061:
062: /**
063: * @see org.andromda.metafacades.uml.PseudostateFacade#isJoin()
064: */
065: protected boolean handleIsJoin() {
066: return this .metaObject.getKind().getValue() == (PseudostateKind.JOIN);
067: }
068:
069: /**
070: * @see org.andromda.metafacades.uml.PseudostateFacade#isJunction()
071: */
072: protected boolean handleIsJunction() {
073: return this .metaObject.getKind().getValue() == (PseudostateKind.JUNCTION);
074: }
075:
076: /**
077: * @see org.andromda.metafacades.uml.PseudostateFacade#isShallowHistory()
078: */
079: protected boolean handleIsShallowHistory() {
080: return this .metaObject.getKind().getValue() == (PseudostateKind.SHALLOW_HISTORY);
081: }
082:
083: /**
084: * @see org.andromda.metafacades.uml.PseudostateFacade#isSplit()
085: */
086: protected boolean handleIsSplit() {
087: return (this .isJoin() || this .isFork())
088: && this .metaObject.getOutgoings().size() > 1;
089: }
090:
091: /**
092: * @see org.andromda.metafacades.uml.PseudostateFacade#isCollect()
093: */
094: protected boolean handleIsCollect() {
095: return (this .isJoin() || this .isFork())
096: && this .metaObject.getIncomings().size() > 1;
097: }
098:
099: public Object getValidationOwner() {
100: return this.getStateMachine();
101: }
102: }
|