public static Constraint isHuman ( ) { return new OR ( new MappedConst ( new Field ( "SequenceEntityReference/organism/displayName" , Field . Operation . INTERSECT , "Homo sapiens" ) , 0 ) , new MappedConst ( new Field ( "PhysicalEntity/entityReference/organism/displayName" , Field . Operation . INTERSECT , "Homo sapiens" ) , 0 ) ) ; }
Makes sure the EntityReference or the PhysicalEntity belongs to human . Please note that this check depends on the display name of the related BioSource object to be Homo sapiens . If that is not the case the constraint won t work .