Skip to content

Commit

Permalink
Revert "Add pseudo-type PublicKey for actor types"
Browse files Browse the repository at this point in the history
This reverts commit 9b139af.
  • Loading branch information
zauberstuhl committed Sep 16, 2019
1 parent 85d191b commit 4db4275
Show file tree
Hide file tree
Showing 45 changed files with 0 additions and 1,851 deletions.
119 changes: 0 additions & 119 deletions astool/activitystreams.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -1731,14 +1731,6 @@
"disjointWith": [],
"name": "Tombstone",
"url": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tombstone"
},
{
"id": "https://www.w3.org/ns/activitystreams#PublicKey",
"type": "owl:Class",
"notes": "A public key represents a public cryptographical key for a user",
"disjointWith": [],
"name": "PublicKey",
"url": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-publicKey"
}
]
},
Expand Down Expand Up @@ -1774,11 +1766,6 @@
"type": "owl:Class",
"url": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-link",
"name": "Link"
},
{
"type": "owl:Class",
"url": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-publicKey",
"name": "PublicKey"
}
]
},
Expand Down Expand Up @@ -1818,11 +1805,6 @@
"type": "owl:Class",
"url": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-link",
"name": "Link"
},
{
"type": "owl:Class",
"url": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-publicKey",
"name": "PublicKey"
}
]
},
Expand Down Expand Up @@ -5450,107 +5432,6 @@
},
"name": "preferredUsername",
"url": "https://www.w3.org/TR/activitypub/#preferredUsername"
},
{
"id": "https://www.w3.org/TR/activitypub/#publicKey",
"type": [
"rdf:Property",
"owl:FunctionalProperty"
],
"notes": "The public key for an ActivityStreams actor",
"domain": {
"type": "owl:Class",
"unionOf": [
{
"type": "owl:Class",
"url": "https://www.w3.org/ns/activitystreams#Application",
"name": "Application"
},
{
"type": "owl:Class",
"url": "https://www.w3.org/ns/activitystreams#Group",
"name": "Group"
},
{
"type": "owl:Class",
"url": "https://www.w3.org/ns/activitystreams#Organization",
"name": "Organization"
},
{
"type": "owl:Class",
"url": "https://www.w3.org/ns/activitystreams#Person",
"name": "Person"
},
{
"type": "owl:Class",
"url": "https://www.w3.org/ns/activitystreams#Service",
"name": "Service"
}
]
},
"isDefinedBy": "https://www.w3.org/TR/activitypub/#publicKey",
"range": {
"type": "owl:Class",
"unionOf": [
{
"type": "owl:Class",
"url": "https://www.w3.org/ns/activitystreams#PublicKey",
"name": "PublicKey"
}
]
},
"name": "publicKey",
"url": "https://www.w3.org/TR/activitypub/#publicKey"
},
{
"id": "https://www.w3.org/TR/activitypub/#owner",
"type": [
"rdf:Property",
"owl:FunctionalProperty"
],
"notes": "The owner of the public key for an ActivityStreams actor",
"domain": {
"type": "owl:Class",
"unionOf": [
{
"type": "owl:Class",
"url": "https://www.w3.org/ns/activitystreams#PublicKey",
"name": "PublicKey"
}
]
},
"isDefinedBy": "https://www.w3.org/TR/activitypub/#owner",
"range": {
"type": "owl:Class",
"unionOf": "xsd:anyURI"
},
"name": "owner",
"url": "https://www.w3.org/TR/activitypub/#owner"
},
{
"id": "https://www.w3.org/TR/activitypub/#publicKeyPem",
"type": [
"rdf:Property",
"owl:FunctionalProperty"
],
"notes": "The public key PEM encoded data for an ActivityStreams actor",
"domain": {
"type": "owl:Class",
"unionOf": [
{
"type": "owl:Class",
"url": "https://www.w3.org/ns/activitystreams#PublicKey",
"name": "PublicKey"
}
]
},
"isDefinedBy": "https://www.w3.org/TR/activitypub/#publicKeyPem",
"range": {
"type": "owl:Class",
"unionOf": "xsd:string"
},
"name": "publicKeyPem",
"url": "https://www.w3.org/TR/activitypub/#publicKeyPem"
}
]
}
Expand Down
12 changes: 0 additions & 12 deletions streams/gen_consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@ var ActivityStreamsPlaceName string = "Place"
// ActivityStreamsProfileName is the string literal of the name for the Profile type in the ActivityStreams vocabulary.
var ActivityStreamsProfileName string = "Profile"

// ActivityStreamsPublicKeyName is the string literal of the name for the PublicKey type in the ActivityStreams vocabulary.
var ActivityStreamsPublicKeyName string = "PublicKey"

// ActivityStreamsQuestionName is the string literal of the name for the Question type in the ActivityStreams vocabulary.
var ActivityStreamsQuestionName string = "Question"

Expand Down Expand Up @@ -312,9 +309,6 @@ var ActivityStreamsOriginPropertyName string = "origin"
// ActivityStreamsOutboxPropertyName is the string literal of the name for the outbox property in the ActivityStreams vocabulary.
var ActivityStreamsOutboxPropertyName string = "outbox"

// ActivityStreamsOwnerPropertyName is the string literal of the name for the owner property in the ActivityStreams vocabulary.
var ActivityStreamsOwnerPropertyName string = "owner"

// ActivityStreamsPartOfPropertyName is the string literal of the name for the partOf property in the ActivityStreams vocabulary.
var ActivityStreamsPartOfPropertyName string = "partOf"

Expand All @@ -330,12 +324,6 @@ var ActivityStreamsPrevPropertyName string = "prev"
// ActivityStreamsPreviewPropertyName is the string literal of the name for the preview property in the ActivityStreams vocabulary.
var ActivityStreamsPreviewPropertyName string = "preview"

// ActivityStreamsPublicKeyPropertyName is the string literal of the name for the publicKey property in the ActivityStreams vocabulary.
var ActivityStreamsPublicKeyPropertyName string = "publicKey"

// ActivityStreamsPublicKeyPemPropertyName is the string literal of the name for the publicKeyPem property in the ActivityStreams vocabulary.
var ActivityStreamsPublicKeyPemPropertyName string = "publicKeyPem"

// ActivityStreamsPublishedPropertyName is the string literal of the name for the published property in the ActivityStreams vocabulary.
var ActivityStreamsPublishedPropertyName string = "published"

Expand Down
9 changes: 0 additions & 9 deletions streams/gen_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,10 @@ import (
propertyordereditems "github.com/go-fed/activity/streams/impl/activitystreams/property_ordereditems"
propertyorigin "github.com/go-fed/activity/streams/impl/activitystreams/property_origin"
propertyoutbox "github.com/go-fed/activity/streams/impl/activitystreams/property_outbox"
propertyowner "github.com/go-fed/activity/streams/impl/activitystreams/property_owner"
propertypartof "github.com/go-fed/activity/streams/impl/activitystreams/property_partof"
propertypreferredusername "github.com/go-fed/activity/streams/impl/activitystreams/property_preferredusername"
propertyprev "github.com/go-fed/activity/streams/impl/activitystreams/property_prev"
propertypreview "github.com/go-fed/activity/streams/impl/activitystreams/property_preview"
propertypublickey "github.com/go-fed/activity/streams/impl/activitystreams/property_publickey"
propertypublickeypem "github.com/go-fed/activity/streams/impl/activitystreams/property_publickeypem"
propertypublished "github.com/go-fed/activity/streams/impl/activitystreams/property_published"
propertyradius "github.com/go-fed/activity/streams/impl/activitystreams/property_radius"
propertyrel "github.com/go-fed/activity/streams/impl/activitystreams/property_rel"
Expand Down Expand Up @@ -116,7 +113,6 @@ import (
typeperson "github.com/go-fed/activity/streams/impl/activitystreams/type_person"
typeplace "github.com/go-fed/activity/streams/impl/activitystreams/type_place"
typeprofile "github.com/go-fed/activity/streams/impl/activitystreams/type_profile"
typepublickey "github.com/go-fed/activity/streams/impl/activitystreams/type_publickey"
typequestion "github.com/go-fed/activity/streams/impl/activitystreams/type_question"
typeread "github.com/go-fed/activity/streams/impl/activitystreams/type_read"
typereject "github.com/go-fed/activity/streams/impl/activitystreams/type_reject"
Expand Down Expand Up @@ -193,13 +189,10 @@ func init() {
propertyordereditems.SetManager(mgr)
propertyorigin.SetManager(mgr)
propertyoutbox.SetManager(mgr)
propertyowner.SetManager(mgr)
propertypartof.SetManager(mgr)
propertypreferredusername.SetManager(mgr)
propertyprev.SetManager(mgr)
propertypreview.SetManager(mgr)
propertypublickey.SetManager(mgr)
propertypublickeypem.SetManager(mgr)
propertypublished.SetManager(mgr)
propertyradius.SetManager(mgr)
propertyrel.SetManager(mgr)
Expand Down Expand Up @@ -261,7 +254,6 @@ func init() {
typeperson.SetManager(mgr)
typeplace.SetManager(mgr)
typeprofile.SetManager(mgr)
typepublickey.SetManager(mgr)
typequestion.SetManager(mgr)
typeread.SetManager(mgr)
typereject.SetManager(mgr)
Expand Down Expand Up @@ -316,7 +308,6 @@ func init() {
typeperson.SetTypePropertyConstructor(NewActivityStreamsTypeProperty)
typeplace.SetTypePropertyConstructor(NewActivityStreamsTypeProperty)
typeprofile.SetTypePropertyConstructor(NewActivityStreamsTypeProperty)
typepublickey.SetTypePropertyConstructor(NewActivityStreamsTypeProperty)
typequestion.SetTypePropertyConstructor(NewActivityStreamsTypeProperty)
typeread.SetTypePropertyConstructor(NewActivityStreamsTypeProperty)
typereject.SetTypePropertyConstructor(NewActivityStreamsTypeProperty)
Expand Down
13 changes: 0 additions & 13 deletions streams/gen_json_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ func NewJSONResolver(callbacks ...interface{}) (*JSONResolver, error) {
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsProfile) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsPublicKey) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsQuestion) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsRead) error:
Expand Down Expand Up @@ -662,17 +660,6 @@ func (this JSONResolver) Resolve(ctx context.Context, m map[string]interface{})
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"PublicKey" {
v, err := mgr.DeserializePublicKeyActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsPublicKey) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Question" {
v, err := mgr.DeserializeQuestionActivityStreams()(m, aliasMap)
if err != nil {
Expand Down
56 changes: 0 additions & 56 deletions streams/gen_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,10 @@ import (
propertyordereditems "github.com/go-fed/activity/streams/impl/activitystreams/property_ordereditems"
propertyorigin "github.com/go-fed/activity/streams/impl/activitystreams/property_origin"
propertyoutbox "github.com/go-fed/activity/streams/impl/activitystreams/property_outbox"
propertyowner "github.com/go-fed/activity/streams/impl/activitystreams/property_owner"
propertypartof "github.com/go-fed/activity/streams/impl/activitystreams/property_partof"
propertypreferredusername "github.com/go-fed/activity/streams/impl/activitystreams/property_preferredusername"
propertyprev "github.com/go-fed/activity/streams/impl/activitystreams/property_prev"
propertypreview "github.com/go-fed/activity/streams/impl/activitystreams/property_preview"
propertypublickey "github.com/go-fed/activity/streams/impl/activitystreams/property_publickey"
propertypublickeypem "github.com/go-fed/activity/streams/impl/activitystreams/property_publickeypem"
propertypublished "github.com/go-fed/activity/streams/impl/activitystreams/property_published"
propertyradius "github.com/go-fed/activity/streams/impl/activitystreams/property_radius"
propertyrel "github.com/go-fed/activity/streams/impl/activitystreams/property_rel"
Expand Down Expand Up @@ -116,7 +113,6 @@ import (
typeperson "github.com/go-fed/activity/streams/impl/activitystreams/type_person"
typeplace "github.com/go-fed/activity/streams/impl/activitystreams/type_place"
typeprofile "github.com/go-fed/activity/streams/impl/activitystreams/type_profile"
typepublickey "github.com/go-fed/activity/streams/impl/activitystreams/type_publickey"
typequestion "github.com/go-fed/activity/streams/impl/activitystreams/type_question"
typeread "github.com/go-fed/activity/streams/impl/activitystreams/type_read"
typereject "github.com/go-fed/activity/streams/impl/activitystreams/type_reject"
Expand Down Expand Up @@ -1219,19 +1215,6 @@ func (this Manager) DeserializeOutboxPropertyActivityStreams() func(map[string]i
}
}

// DeserializeOwnerPropertyActivityStreams returns the deserialization method for
// the "ActivityStreamsOwnerProperty" non-functional property in the
// vocabulary "ActivityStreams"
func (this Manager) DeserializeOwnerPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOwnerProperty, error) {
return func(m map[string]interface{}, aliasMap map[string]string) (vocab.ActivityStreamsOwnerProperty, error) {
i, err := propertyowner.DeserializeOwnerProperty(m, aliasMap)
if i == nil {
return nil, err
}
return i, err
}
}

// DeserializePageActivityStreams returns the deserialization method for the
// "ActivityStreamsPage" non-functional property in the vocabulary
// "ActivityStreams"
Expand Down Expand Up @@ -1336,45 +1319,6 @@ func (this Manager) DeserializeProfileActivityStreams() func(map[string]interfac
}
}

// DeserializePublicKeyActivityStreams returns the deserialization method for the
// "ActivityStreamsPublicKey" non-functional property in the vocabulary
// "ActivityStreams"
func (this Manager) DeserializePublicKeyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPublicKey, error) {
return func(m map[string]interface{}, aliasMap map[string]string) (vocab.ActivityStreamsPublicKey, error) {
i, err := typepublickey.DeserializePublicKey(m, aliasMap)
if i == nil {
return nil, err
}
return i, err
}
}

// DeserializePublicKeyPemPropertyActivityStreams returns the deserialization
// method for the "ActivityStreamsPublicKeyPemProperty" non-functional
// property in the vocabulary "ActivityStreams"
func (this Manager) DeserializePublicKeyPemPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPublicKeyPemProperty, error) {
return func(m map[string]interface{}, aliasMap map[string]string) (vocab.ActivityStreamsPublicKeyPemProperty, error) {
i, err := propertypublickeypem.DeserializePublicKeyPemProperty(m, aliasMap)
if i == nil {
return nil, err
}
return i, err
}
}

// DeserializePublicKeyPropertyActivityStreams returns the deserialization method
// for the "ActivityStreamsPublicKeyProperty" non-functional property in the
// vocabulary "ActivityStreams"
func (this Manager) DeserializePublicKeyPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPublicKeyProperty, error) {
return func(m map[string]interface{}, aliasMap map[string]string) (vocab.ActivityStreamsPublicKeyProperty, error) {
i, err := propertypublickey.DeserializePublicKeyProperty(m, aliasMap)
if i == nil {
return nil, err
}
return i, err
}
}

// DeserializePublishedPropertyActivityStreams returns the deserialization method
// for the "ActivityStreamsPublishedProperty" non-functional property in the
// vocabulary "ActivityStreams"
Expand Down
7 changes: 0 additions & 7 deletions streams/gen_pkg_activitystreams_disjoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import (
typeperson "github.com/go-fed/activity/streams/impl/activitystreams/type_person"
typeplace "github.com/go-fed/activity/streams/impl/activitystreams/type_place"
typeprofile "github.com/go-fed/activity/streams/impl/activitystreams/type_profile"
typepublickey "github.com/go-fed/activity/streams/impl/activitystreams/type_publickey"
typequestion "github.com/go-fed/activity/streams/impl/activitystreams/type_question"
typeread "github.com/go-fed/activity/streams/impl/activitystreams/type_read"
typereject "github.com/go-fed/activity/streams/impl/activitystreams/type_reject"
Expand Down Expand Up @@ -299,12 +298,6 @@ func ActivityStreamsProfileIsDisjointWith(other vocab.Type) bool {
return typeprofile.ProfileIsDisjointWith(other)
}

// ActivityStreamsPublicKeyIsDisjointWith returns true if PublicKey is disjoint
// with the other's type.
func ActivityStreamsPublicKeyIsDisjointWith(other vocab.Type) bool {
return typepublickey.PublicKeyIsDisjointWith(other)
}

// ActivityStreamsQuestionIsDisjointWith returns true if Question is disjoint with
// the other's type.
func ActivityStreamsQuestionIsDisjointWith(other vocab.Type) bool {
Expand Down
8 changes: 0 additions & 8 deletions streams/gen_pkg_activitystreams_extendedby.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import (
typeperson "github.com/go-fed/activity/streams/impl/activitystreams/type_person"
typeplace "github.com/go-fed/activity/streams/impl/activitystreams/type_place"
typeprofile "github.com/go-fed/activity/streams/impl/activitystreams/type_profile"
typepublickey "github.com/go-fed/activity/streams/impl/activitystreams/type_publickey"
typequestion "github.com/go-fed/activity/streams/impl/activitystreams/type_question"
typeread "github.com/go-fed/activity/streams/impl/activitystreams/type_read"
typereject "github.com/go-fed/activity/streams/impl/activitystreams/type_reject"
Expand Down Expand Up @@ -339,13 +338,6 @@ func ActivityStreamsProfileIsExtendedBy(other vocab.Type) bool {
return typeprofile.ProfileIsExtendedBy(other)
}

// ActivityStreamsPublicKeyIsExtendedBy returns true if the other's type extends
// from PublicKey. Note that it returns false if the types are the same; see
// the "IsOrExtends" variant instead.
func ActivityStreamsPublicKeyIsExtendedBy(other vocab.Type) bool {
return typepublickey.PublicKeyIsExtendedBy(other)
}

// ActivityStreamsQuestionIsExtendedBy returns true if the other's type extends
// from Question. Note that it returns false if the types are the same; see
// the "IsOrExtends" variant instead.
Expand Down
Loading

0 comments on commit 4db4275

Please sign in to comment.