Retrieves the activity instance identifier of an event, if set by this
extension's instance attribute.

@param event
Event to extract instance from.
@return The requested activity instance identifier.
163855
public String extractInstance(XEvent event) {
		XAttribute attribute = event.getAttributes().get(KEY_INSTANCE);
		if (attribute == null) {
			return null;
		} else {
			return ((XAttributeLiteral) attribute).getValue();
		}
	}
1230583
public static Element getTarget(DomEvent<?> event) {
		EventTarget target = event.getNativeEvent().getEventTarget();
		if (Element.is(target)) {
			return Element.as(target);
		}
		return null;
	}
1003267
public String getEvent_type() {
    if (Event_Type.featOkTst && ((Event_Type)jcasType).casFeat_event_type == null)
      jcasType.jcas.throwFeatMissing("event_type", "ch.epfl.bbp.uima.genia.Event");
    return jcasType.ll_cas.ll_getStringValue(addr, ((Event_Type)jcasType).casFeatCode_event_type);}
752829
private String getPatternFromEventType(Event event) {
        switch (event.getType()) {
            case MESSAGE:
                return event.getMessage().getText();
            case QUICK_REPLY:
                return event.getMessage().getQuickReply().getPayload();
            case POSTBACK:
                return event.getPostback().getPayload();
            default:
                return event.getMessage().getText();
        }
    }
458121
public static ActivityStreamMessage from(final Event event) {

        final ActivityStreamMessage msg = new ActivityStreamMessage();

        msg.id = event.getIdentifier().getIRIString();
        msg.type = event.getTypes().stream().map(IRI::getIRIString)
            .map(type -> type.startsWith(AS.URI) ? type.substring(AS.URI.length()) : type)
            .collect(toList());

        msg.published = event.getCreated().toString();

        final List<String> actors = event.getAgents().stream().map(IRI::getIRIString).collect(toList());
        msg.actor = actors.isEmpty() ? null : actors;

        event.getInbox().map(IRI::getIRIString).ifPresent(inbox -> msg.inbox = inbox);
        event.getTarget().map(IRI::getIRIString).ifPresent(target ->
            msg.object = new EventResource(target,
                    event.getTargetTypes().stream().map(IRI::getIRIString).collect(toList())));

        return msg;
    }
507338
public String extractResource(XEvent event) {
		XAttribute attribute = event.getAttributes().get(KEY_RESOURCE);
		if (attribute == null) {
			return null;
		} else {
			return ((XAttributeLiteral) attribute).getValue();
		}
	}
432427
protected EventLoggerEventHandler getEventHandler(ActivitiEvent event) {

		Class<? extends EventLoggerEventHandler> eventHandlerClass = null;
		if (event.getType().equals(ActivitiEventType.ENTITY_INITIALIZED)) {
			Object entity = ((ActivitiEntityEvent) event).getEntity();
			if (entity instanceof ExecutionEntity) {
				ExecutionEntity executionEntity = (ExecutionEntity) entity;
				if (executionEntity.getProcessInstanceId().equals(executionEntity.getId())) {
					eventHandlerClass = ProcessInstanceStartedEventHandler.class;
				}
			}
		} else if (event.getType().equals(ActivitiEventType.ENTITY_DELETED)) {
			Object entity = ((ActivitiEntityEvent) event).getEntity();
			if (entity instanceof ExecutionEntity) {
				ExecutionEntity executionEntity = (ExecutionEntity) entity;
				if (executionEntity.getProcessInstanceId().equals(executionEntity.getId())) {
					eventHandlerClass = ProcessInstanceEndedEventHandler.class;
				}
			}
		} else {
			// Default: dedicated mapper for the type
			eventHandlerClass = eventHandlers.get(event.getType());
		}
		
		if (eventHandlerClass != null) {
			return instantiateEventHandler(event, eventHandlerClass);
		}
		
		return null;
	}
72373
public ImageDescriptor image(SarlEvent event) {
		final JvmDeclaredType jvmElement = this.jvmModelAssociations.getInferredType(event);
		return this.images.forEvent(
				event.getVisibility(),
				this.adornments.get(jvmElement));
	}
631751
public function getEventHandle(IdentifierInterface $entity = null, $event = null)
    {
        // Concatenate identifier and event if it's not already done
        $event = $entity ? $entity->getIdentifier().'.'.$event : $event;
        $event = str_replace('rocketeer.', null, $event);

        return 'rocketeer.'.$event;
    }
946338
public function getEventClassName(string $event)
    {
        if (isset(self::$eventsMap[$event])) {
            return self::$eventsMap[$event];
        }

        $listeners = $this->eventDispatcher->getListeners($event);
        if (empty($listeners)) {
            return null;
        }

        foreach ($listeners as $listener) {
            if (!\is_array($listener) || 2 !== \count($listener)) {
                continue;
            }

            $reflectionMethod = new \ReflectionMethod($listener[0], $listener[1]);
            $args = $reflectionMethod->getParameters();
            if (!$args) {
                continue;
            }

            if (null !== $type = $args[0]->getType()) {
                return (string) $type;
            }
        }

        return null;
    }
879547
function( event ) {
				var target = event.target;
				return rcheckableType.test( target.type ) &&
					target.click && nodeName( target, "input" ) &&
					dataPriv.get( target, "click" ) ||
					nodeName( target, "a" );
			}
345392
public static String getTargetId(DomEvent<?> event) {
		Element element = getTarget(event);
		if (element != null) {
			return element.getId();
		}
		return null;
	}
340838
public int getEventInstanceId() {
    if (Event_Type.featOkTst && ((Event_Type)jcasType).casFeat_eventInstanceId == null)
      jcasType.jcas.throwFeatMissing("eventInstanceId", "de.unihd.dbs.uima.types.heideltime.Event");
    return jcasType.ll_cas.ll_getIntValue(addr, ((Event_Type)jcasType).casFeatCode_eventInstanceId);}
556873
private String getEventName() {
        String event = null;

        @SuppressWarnings("unchecked")
        Enumeration<String> e = request.getParameterNames();

        while (e.hasMoreElements()) {
            String originalKey = e.nextElement();
            String paramKey = StringUtil.toLowerCaseWithUnderscores(originalKey);

            if (paramKey.startsWith(DEFAULT_EVENT_PATTERN) && !StringUtil.isBlank(request.getParameter(originalKey))) {
                int startIndex = DEFAULT_EVENT_PATTERN.length();
                int endIndex = paramKey.length();

                // 支持<input type="image">
                if (paramKey.endsWith(IMAGE_BUTTON_SUFFIX_1)) {
                    endIndex -= IMAGE_BUTTON_SUFFIX_1.length();
                } else if (paramKey.endsWith(IMAGE_BUTTON_SUFFIX_2)) {
                    endIndex -= IMAGE_BUTTON_SUFFIX_2.length();
                } else if (paramKey.endsWith(IMAGE_BUTTON_SUFFIX_3)) {
                    endIndex -= IMAGE_BUTTON_SUFFIX_3.length();
                } else if (paramKey.endsWith(IMAGE_BUTTON_SUFFIX_4)) {
                    endIndex -= IMAGE_BUTTON_SUFFIX_4.length();
                }

                event = StringUtil.trimToNull(paramKey.substring(startIndex, endIndex));

                if (event != null) {
                    break;
                }
            }
        }

        return event;
    }
584114
private EventImpl getEventImpl(final String fullName) {
        if (!isInitialized) {
            return null;
        }

        // Check if subscribed
        EventImpl eventImpl = eventImplMap.get(fullName);

        // Check if subscription is out of time
        if (eventImpl != null && !eventImpl.isStillSubscribed()) {
            logger.debug("{} not subscribed any more", fullName);
            // System.out.println(fullName + "Not Subscribed any more");
            eventImplMap.remove(fullName);

            // if no subscribers, close sockets
            if (eventImplMap.isEmpty()) {
                logger.debug("no subscribers on server, closing resources");
                close();
            }
            eventImpl = null;
        }

        return eventImpl;
    }
913242
@Property(
            domainEvent = MemberNameDomainEvent.class
    )
    @PropertyLayout(typicalLength=ApplicationFeature.TYPICAL_LENGTH_MEMBER_NAME)
    @MemberOrder(name="Id", sequence = "2.4")
    public String getMemberName() {
        return getFeatureId().getMemberName();
    }
656107
def getEventFromUid(request, uid):
    
    events = []
    with suppress(ObjectDoesNotExist):
        events.append(SimpleEventPage.objects.get(uid=uid))
    with suppress(ObjectDoesNotExist):
        events.append(MultidayEventPage.objects.get(uid=uid))
    with suppress(ObjectDoesNotExist):
        events.append(RecurringEventPage.objects.get(uid=uid))
    # Exceptions do not have uids and are not returned by this function

    if len(events) == 1:
        if events[0].isAuthorized(request):
            return events[0]
        else:
            return None
    elif len(events) == 0:
        raise ObjectDoesNotExist("No event with uid={}".format(uid))
    else:
        raise MultipleObjectsReturned("Multiple events with uid={}".format(uid))