Open rhdunn opened 1 month ago
Technically, you don't need these specific types, except if you need new attributes, like these in ProductCollection
.
If I just have a Collection then it could contain anything (as hasPart/isPartOf relationships). What I want is to say e.g. "this collection can only contain images" or "this collection can only contain books".
Do you have a concrete application in mind, i.e. an existing system that would ingest schema.org data with that constraint?
I don't have a system that ingests the content but do have one that I'm working on (a library management style application) that uses these constraints in the way I describe which can generate schema.org metadata.
So far
Collection
only has a genericProductCollection
subtype for products being sold. Comparing with other parts of the hierarchy:CreativeWorkSeries
has a lot of subtypes for books, movies, comics, newspapers, podcasts, radio shows, TV shows, and video games;CollectionPage > MediaGallery
has subtypes for image and video galleries;MediaObject
has subytpes for 3D models, audio, data, image, legislation, music video, text, and video objects.It would make sense to mirror the
Collection
andCollectionPage
hierarchies (where aCollectionPage
is effectively a view of aCollection
) and extend them to contain only specific types:MediaGallery
and a newMediaCollection
subtype to have*Gallery
and*Collection
variants for variousMediaObject
types --3DModel*
,Audio*
,Image*
,Legislation*
,MusicVideo*
,Text*
, andVideo*
.Collection
andCollectionPage
to have*Collection
and*CollectionPage
variants of theCreativeWorkSeries
subtypes for general (unordered) collections of these types of work --BookCollection(Page)? > AudiobookCollection(Page)?
,MovieCollection(Page)?
,ComicCollection(Page)?
,PodcastCollection(Page)?
,RadioCollection(Page)?
,VideoGameCollection(Page)?
.My use case is that I have an application managing creative works (images, audio, etc.) and want to restrict the parts of a collection to specific subtypes, e.g. to have an
ImageCollection
contain parts of typeImageObject
,Drawing
, etc. but notPlay
orMusicRecording
. This helps with things like searching for parts to add to a collection, like can be done when e.g. searching for parts to add to aBookSeries
orPodcastSeason
.