2727import static javax .ws .rs .core .Response .status ;
2828import static org .slf4j .LoggerFactory .getLogger ;
2929import static org .trellisldp .api .TrellisUtils .toQuad ;
30+ import static org .trellisldp .http .impl .HttpUtils .ldpResourceTypes ;
3031import static org .trellisldp .http .impl .HttpUtils .skolemizeQuads ;
3132import static org .trellisldp .http .impl .HttpUtils .skolemizeTriples ;
3233
@@ -187,7 +188,7 @@ protected void readEntityIntoDataset(final IRI graphName, final RDFSyntax syntax
187188 protected CompletionStage <Void > emitEvent (final IRI identifier , final IRI activityType , final IRI resourceType ) {
188189 // Always notify about updates for the resource in question
189190 getServices ().getEventService ().emit (new SimpleEvent (getUrl (identifier ), getSession ().getAgent (),
190- asList (PROV .Activity , activityType ), asList (resourceType )));
191+ asList (PROV .Activity , activityType ), ldpResourceTypes (resourceType ). collect ( toList () )));
191192 // If this was an update and the parent is an ldp:IndirectContainer,
192193 // notify about the member resource (if it exists)
193194 if (AS .Update .equals (activityType ) && LDP .IndirectContainer .equals (getParentModel ())) {
@@ -199,7 +200,8 @@ protected CompletionStage<Void> emitEvent(final IRI identifier, final IRI activi
199200 final IRI id = getParentIdentifier ();
200201 if (HttpUtils .isContainer (model )) {
201202 getServices ().getEventService ().emit (new SimpleEvent (getUrl (id ),
202- getSession ().getAgent (), asList (PROV .Activity , AS .Update ), asList (model )));
203+ getSession ().getAgent (), asList (PROV .Activity , AS .Update ),
204+ ldpResourceTypes (model ).collect (toList ())));
203205 // If the parent's membership resource is different than the parent itself,
204206 // notify about that membership resource, too (if it exists)
205207 if (!Objects .equals (id , getParentMembershipResource ())) {
@@ -313,7 +315,7 @@ private CompletionStage<Void> emitMembershipUpdateEvent() {
313315 if (nonNull (res .getIdentifier ())) {
314316 getServices ().getEventService ().emit (new SimpleEvent (getUrl (res .getIdentifier ()),
315317 getSession ().getAgent (), asList (PROV .Activity , AS .Update ),
316- asList (res .getInteractionModel ())));
318+ ldpResourceTypes (res .getInteractionModel ()). collect ( toList ())));
317319 }
318320 }).toCompletableFuture ());
319321 }
0 commit comments