Restore `Actor` type.
The Actor type was removed in #277.
The
Actortype currently serves as a base class for the five primary Actor types. It does not, however, define any actor specific properties and it would be highly unlikely for an implementation to use theActortype directly.
The same reasoning would also apply to Document although that type was not removed.
The Actor would be very useful for identifying custom actor types as an actor (using an as:type array). Currently, there is no way to do that unless the actor type is closely related to one of the five primary Actor types. I'm guessing the original thinking was based on single-value types instead of type arrays.
Example:
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://server.example/actors"
],
"type": ["example:ExampleActor", "Actor"],
"name": "Example actor"
}
Having the Actor type would allow a server to process a document like this more effectively.
I just reread the notes. I actually think this is pretty interesting, and wouldn't mind including it in a next version, especially since it doesn't have much impact. I agree that with multityping it's more useful.
However, I think there is an opportunity to straighten out the confusion with the ActivityPub actor type, which unfortunately uses the same name. ActivityPub actors do have properties, but do not have to be AS2 actor types.
I think if we include types around actors, we should do it for both, and maybe use a different term for the abstract one for AS2.
@steve-bate do you have a good example of when it would be useful to know that an object is an AS2 "actor" but not one of the 5 predefined types, distinct from an AP "actor"? I'm having a hard time coming up with one.
@steve-bate do you have a good example of when it would be useful to know that an object is an AS2 "actor" but not one of the 5 predefined types, distinct from an AP "actor"? I'm having a hard time coming up with one.
A few potential benefits include the ability to validate core actor data for extension types and to allow actor-related fallback behavior for unknown extensions.
When an implementation uses an extension type that overlaps with a core vocabulary type, the implementation must also specify the core vocabulary type.
For extension actor types like ex:MotionSensor or ex:CoffeeMachine, one could use as:Object as the core vocab type (since they don't extend one of the 5 predefined types), but I think it would make more sense to use as:Actor instead.
The lack of Actor type was also discussed in https://github.com/w3c/activitystreams/issues/633