public static Pattern relatedProteinRefOfInter ( Class < ? extends Interaction > ... seedType ) { Pattern p = new Pattern ( Interaction . class , "Interaction" ) ; if ( seedType . length == 1 ) { p . add ( new Type ( seedType [ 0 ] ) , "Interaction" ) ; } else if ( seedType . length > 1 ) { MappedConst [ ] mc = new MappedConst [ seedType . length ] ; for ( int i = 0 ; i < mc . length ; i ++ ) { mc [ i ] = new MappedConst ( new Type ( seedType [ i ] ) , 0 ) ; } p . add ( new OR ( mc ) , "Interaction" ) ; } p . add ( new OR ( new MappedConst ( participant ( ) , 0 , 1 ) , new MappedConst ( new PathConstraint ( "Interaction/controlledOf*/controller:PhysicalEntity" ) , 0 , 1 ) ) , "Interaction" , "PE" ) ; p . add ( linkToSpecific ( ) , "PE" , "SPE" ) ; p . add ( peToER ( ) , "SPE" , "generic PR" ) ; p . add ( new Type ( ProteinReference . class ) , "generic PR" ) ; p . add ( linkedER ( false ) , "generic PR" , "PR" ) ; return p ; }
Finds ProteinsReference related to an interaction . If specific types of interactions are desired they should be sent as parameter otherwise leave the parameter empty .