public static Pattern stateChange ( Pattern p , String ctrlLabel ) { if ( p == null ) p = new Pattern ( Conversion . class , "Conversion" ) ; if ( ctrlLabel == null ) p . add ( new Participant ( RelType . INPUT ) , "Conversion" , "input PE" ) ; else p . add ( new Participant ( RelType . INPUT , true ) , ctrlLabel , "Conversion" , "input PE" ) ; p . add ( linkToSpecific ( ) , "input PE" , "input simple PE" ) ; p . add ( peToER ( ) , "input simple PE" , "changed generic ER" ) ; p . add ( new ConversionSide ( ConversionSide . Type . OTHER_SIDE ) , "input PE" , "Conversion" , "output PE" ) ; p . add ( equal ( false ) , "input PE" , "output PE" ) ; p . add ( linkToSpecific ( ) , "output PE" , "output simple PE" ) ; p . add ( peToER ( ) , "output simple PE" , "changed generic ER" ) ; p . add ( linkedER ( false ) , "changed generic ER" , "changed ER" ) ; return p ; }
Pattern for a Conversion has an input PhysicalEntity and another output PhysicalEntity that belongs to the same EntityReference .