src/main/java/ch/bfh/ti/i4mi/mag/pmir/MessageHeaderUriSelector.java
/**
     * @param object bundle
     * @return true if eventUri is present in the MessageHeader.eventUri
     */
@param object bundle
@return true if eventUri is present in the MessageHeader.eventUri
@param object bundle @return true if eventUri is present in the MessageHeader . eventUri
@Override
    public boolean test(Object object) {
        Bundle bundle = (Bundle) object;
        if (bundle!=null && bundle.getEntryFirstRep()!=null && bundle.getEntryFirstRep().getResource().getResourceType()!=null) {
            if ("MessageHeader".equals(bundle.getEntryFirstRep().getResource().getResourceType().name())) {
                MessageHeader messageHeader = (MessageHeader) bundle.getEntryFirstRep().getResource();
                return eventUri.equals(messageHeader.getEventUriType().asStringValue());
            }
        }
        return false;
    }
@ Override public boolean test ( Object object ) { Bundle bundle = ( Bundle ) object ; if ( bundle != null && bundle . getEntryFirstRep ( ) != null && bundle . getEntryFirstRep ( ) . getResource ( ) . getResourceType ( ) != null ) { if ( "MessageHeader" . equals ( bundle . getEntryFirstRep ( ) . getResource ( ) . getResourceType ( ) . name ( ) ) ) { MessageHeader messageHeader = ( MessageHeader ) bundle . getEntryFirstRep ( ) . getResource ( ) ; return eventUri . equals ( messageHeader . getEventUriType ( ) . asStringValue ( ) ) ; } } return false ; }
@param object bundle
 @return true if eventUri is present in the MessageHeader.eventUri
@param object bundle @return true if eventUri is present in the MessageHeader . eventUri