amagimedia / metadata

Metadata rdf, xml schemas
1 stars 0 forks source link

Introducing amg:coverageRestriction #64

Open shashi-banger opened 7 months ago

shashi-banger commented 7 months ago

Consider the example as shown below, of having multiple rights for the same service with different date ranges. Today we express the multiple rights for same service(platform or channel) as separate elements.

<rss xmlns:amg="http://www.amagi.com/amgrss/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:amgt="http://www.amagi.com/amgrss/transient/" xmlns:mediat="http://www.amagi.com/mrss/transient/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:amagi="http://www.amagi.com/rss/namespace">
    <!--Amagi RSS to Amagi Internal Feed-->
    <channel>
        <item amg:itemType="Episode">
            <amg:longDescription>Chef Andrew Zimmern prepares the ultimate shore lunch of fried walleye filets, served with a tangy homemade tartar sauce, coleslaw, and crispy fried potatoes. Next, chef grills bone-in elk chops with a simple mustard glaze over hardwood charcoal.</amg:longDescription>
            <amg:assetId>tmk-video-214b1e60d76f4101a4a5254f65fe0841</amg:assetId>
            <amg:externalId label="TMSID" amg:idType="https://metadata.amagi.tv/skos/amagi_ebu_IdentifierTypeCS#_tmsid">EP036334800009</amg:externalId>
            <media:description>Chef Andrew Zimmern cooks up some grilled Walleye and elk chops, over an open flame.</media:description>
            <media:subTitle href="https://assets.tastemadecdn.net/files/ef749b/a8bf99407c80b27940ac/b0048a.scc" amg:lang="http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso639_1LanguageCodeCS#_en"/>
            <amg:rights>
                <amg:rightsStartDateTime>2035-01-01T00:00:00+00:00</amg:rightsStartDateTime>
                <amg:rightsEndDateTime>2050-01-01T00:00:00+00:00</amg:rightsEndDateTime>
                <amg:rightsTerritoryIncludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_US</amg:rightsTerritoryIncludes>
                <amg:rightsTerritoryIncludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_CA</amg:rightsTerritoryIncludes>
                <amg:rightsTerritoryExcludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_MX</amg:rightsTerritoryExcludes>
                <amg:serviceId>roku</amg:serviceId>
                <amg:serviceName>roku</amg:serviceName>
                <amg:serviceType>VOD</amg:serviceType>
            </amg:rights>
            <amg:rights>
                <amg:rightsStartDateTime>2050-01-01T00:00:00+00:00</amg:rightsStartDateTime>
                <amg:rightsEndDateTime>2060-01-01T00:00:00+00:00</amg:rightsEndDateTime>
                <amg:rightsTerritoryIncludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_US</amg:rightsTerritoryIncludes>
                <amg:rightsTerritoryIncludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_CA</amg:rightsTerritoryIncludes>
                <amg:rightsTerritoryExcludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_MX</amg:rightsTerritoryExcludes>
                <amg:serviceId>roku</amg:serviceId>
                <amg:serviceName>roku</amg:serviceName>
                <amg:serviceType>VOD</amg:serviceType>
            </amg:rights>
              </item>
    </channel>
</rss>        

It would be nice to have rights for a given platform or channel expressed within a single element. If we use the the new elements amg:coverageRestrictions then the above will look as follows

<rss xmlns:amg="http://www.amagi.com/amgrss/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:amgt="http://www.amagi.com/amgrss/transient/" xmlns:mediat="http://www.amagi.com/mrss/transient/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:amagi="http://www.amagi.com/rss/namespace">
    <!--Amagi RSS to Amagi Internal Feed-->
    <channel>
        <item amg:itemType="Episode">
            <amg:longDescription>Chef Andrew Zimmern prepares the ultimate shore lunch of fried walleye filets, served with a tangy homemade tartar sauce, coleslaw, and crispy fried potatoes. Next, chef grills bone-in elk chops with a simple mustard glaze over hardwood charcoal.</amg:longDescription>
            <amg:assetId>tmk-video-214b1e60d76f4101a4a5254f65fe0841</amg:assetId>
            <amg:externalId label="TMSID" amg:idType="https://metadata.amagi.tv/skos/amagi_ebu_IdentifierTypeCS#_tmsid">EP036334800009</amg:externalId>
            <media:description>Chef Andrew Zimmern cooks up some grilled Walleye and elk chops, over an open flame.</media:description>
            <media:subTitle href="https://assets.tastemadecdn.net/files/ef749b/a8bf99407c80b27940ac/b0048a.scc" amg:lang="http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso639_1LanguageCodeCS#_en"/>
            <amg:rights>
                                <amg:coverageRestrictions>
                      <amg:rightsStartDateTime>2035-01-01T00:00:00+00:00</amg:rightsStartDateTime>
                      <amg:rightsEndDateTime>2050-01-01T00:00:00+00:00</amg:rightsEndDateTime>
                      <amg:rightsTerritoryIncludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_US</amg:rightsTerritoryIncludes>
                      <amg:rightsTerritoryIncludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_CA</amg:rightsTerritoryIncludes>
                      <amg:rightsTerritoryExcludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_MX</amg:rightsTerritoryExcludes>
                                 </amg:coverageRestrictions>
                                 <amg:coverageRestrictions>
                      <amg:rightsStartDateTime>2050-01-01T00:00:00+00:00</amg:rightsStartDateTime>
                      <amg:rightsEndDateTime>2060-01-01T00:00:00+00:00</amg:rightsEndDateTime>
                      <amg:rightsTerritoryIncludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_US</amg:rightsTerritoryIncludes>
                      <amg:rightsTerritoryIncludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_CA</amg:rightsTerritoryIncludes>
                      <amg:rightsTerritoryExcludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_MX</amg:rightsTerritoryExcludes>
                                 </amg:coverageRestrictions>
                <amg:serviceId>roku</amg:serviceId>
                <amg:serviceName>roku</amg:serviceName>
                <amg:serviceType>VOD</amg:serviceType>
            </amg:rights>   
              </item>
    </channel>
</rss>

Also there is a requirement for publication restrictions. If we want to associate one or more publication restrictions(frequency caps) we can do as follows

<rss xmlns:amg="http://www.amagi.com/amgrss/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:amgt="http://www.amagi.com/amgrss/transient/" xmlns:mediat="http://www.amagi.com/mrss/transient/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:amagi="http://www.amagi.com/rss/namespace">
    <!--Amagi RSS to Amagi Internal Feed-->
    <channel>
        <item amg:itemType="Episode">
            <amg:longDescription>Chef Andrew Zimmern prepares the ultimate shore lunch of fried walleye filets, served with a tangy homemade tartar sauce, coleslaw, and crispy fried potatoes. Next, chef grills bone-in elk chops with a simple mustard glaze over hardwood charcoal.</amg:longDescription>
            <amg:assetId>tmk-video-214b1e60d76f4101a4a5254f65fe0841</amg:assetId>
            <amg:externalId label="TMSID" amg:idType="https://metadata.amagi.tv/skos/amagi_ebu_IdentifierTypeCS#_tmsid">EP036334800009</amg:externalId>
            <media:description>Chef Andrew Zimmern cooks up some grilled Walleye and elk chops, over an open flame.</media:description>
            <media:subTitle href="https://assets.tastemadecdn.net/files/ef749b/a8bf99407c80b27940ac/b0048a.scc" amg:lang="http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso639_1LanguageCodeCS#_en"/>
            <amg:rights>
                                <amg:coverageRestrictions>
                      <amg:rightsStartDateTime>2035-01-01T00:00:00+00:00</amg:rightsStartDateTime>
                      <amg:rightsEndDateTime>2050-01-01T00:00:00+00:00</amg:rightsEndDateTime>
                      <amg:rightsTerritoryIncludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_US</amg:rightsTerritoryIncludes>
                      <amg:rightsTerritoryIncludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_CA</amg:rightsTerritoryIncludes>
                      <amg:rightsTerritoryExcludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_MX</amg:rightsTerritoryExcludes>
                                 </amg:coverageRestrictions>
                                 <amg:coverageRestrictions>
                      <amg:rightsStartDateTime>2050-01-01T00:00:00+00:00</amg:rightsStartDateTime>
                      <amg:rightsEndDateTime>2060-01-01T00:00:00+00:00</amg:rightsEndDateTime>
                      <amg:rightsTerritoryIncludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_US</amg:rightsTerritoryIncludes>
                      <amg:rightsTerritoryIncludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_CA</amg:rightsTerritoryIncludes>
                      <amg:rightsTerritoryExcludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_MX</amg:rightsTerritoryExcludes>
                                 </amg:coverageRestrictions>
                                <amg:publicationRestrictions>
                      <amg:rightsStartDateTime>2050-01-01T00:00:00+00:00</amg:rightsStartDateTime>
                      <amg:rightsEndDateTime>2060-01-01T00:00:00+00:00</amg:rightsEndDateTime>
                      <amg:publicationCap>
                                            <amg:publicationLimit>10</amg:publicationLimit>
                                            <amg:publicationCapPeriod>1M</amg:publicationCapPeriod>
                                       </amg:publicationCap>
                                       <amg:publicationCap>
                                            <amg:publicationLimit>10</amg:publicationLimit>
                                            <amg:publicationCapPeriod>1M</amg:publicationCapPeriod>
                                       </amg:publicationCap>
                                 </amg:coverageRestrictions>
                <amg:serviceId>roku</amg:serviceId>
                <amg:serviceName>roku</amg:serviceName>
                <amg:serviceType>VOD</amg:serviceType>
            </amg:rights>   
              </item>
    </channel>
</rss>
vsagarv commented 7 months ago

@shashi-banger In the publication cap example, both caps are 10/1M. For better illustration, we can make them as {30/1M & 10/1W}.

pooja-amagi commented 7 months ago

@shashi-banger To support this, we will have to change the manner in which licences are given in amagi format.

Amagi format hierarchy: licenses -> platforms

<amagi:licenses>
    <amagi:regions>
        <amagi:includes amagi:value="US"/>
    </amagi:regions>
    <amagi:licensePeriod end="2023-09-20T00:00:00Z" start="2023-09-01T00:00:00Z" type="VOD">
        <amagi:vodPlatforms>
            <amagi:meta-value amagi:value="philo"/>
            <amagi:meta-value amagi:value="fubo"/>
        </amagi:vodPlatforms>
    </amagi:licensePeriod>
    <amagi:licensePeriod end="2023-08-01T00:00:00Z" start="2023-07-01T00:00:00Z" type="VOD">
        <amagi:vodPlatforms>
            <amagi:meta-value amagi:value="philo"/>
            <amagi:meta-value amagi:value="fubo"/>
        </amagi:vodPlatforms>
    </amagi:licensePeriod>
</amagi:licenses>

Need to change to: platforms -> licenses

<amagi:licenses>
    <amagi:vodPlatforms>
        <amagi:meta-value amagi:value="philo">
            <amagi:licensePeriod end="2023-09-20T00:00:00Z" start="2023-09-01T00:00:00Z" type="VOD" includeRegions="US">
            <amagi:licensePeriod end="2023-08-01T00:00:00Z" start="2023-07-01T00:00:00Z" type="VOD" includeRegions="US">
        </amagi:meta-value>
        <amagi:meta-value amagi:value="fubo">
            <amagi:licensePeriod end="2023-09-20T00:00:00Z" start="2023-09-01T00:00:00Z" type="VOD" includeRegions="US">
            <amagi:licensePeriod end="2023-08-01T00:00:00Z" start="2023-07-01T00:00:00Z" type="VOD" includeRegions="US">
        </amagi:meta-value>
    </amagi:vodPlatforms>
</amagi:licenses>
mbm-c commented 7 months ago

@shashi-banger To support this, we will have to change the manner in which licences are given in amagi format.

Amagi format hierarchy: licenses -> platforms

<amagi:licenses>
  <amagi:regions>
      <amagi:includes amagi:value="US"/>
  </amagi:regions>
  <amagi:licensePeriod end="2023-09-20T00:00:00Z" start="2023-09-01T00:00:00Z" type="VOD">
      <amagi:vodPlatforms>
          <amagi:meta-value amagi:value="philo"/>
          <amagi:meta-value amagi:value="fubo"/>
      </amagi:vodPlatforms>
  </amagi:licensePeriod>
  <amagi:licensePeriod end="2023-08-01T00:00:00Z" start="2023-07-01T00:00:00Z" type="VOD">
      <amagi:vodPlatforms>
          <amagi:meta-value amagi:value="philo"/>
          <amagi:meta-value amagi:value="fubo"/>
      </amagi:vodPlatforms>
  </amagi:licensePeriod>
</amagi:licenses>

Need to change to: platforms -> licenses

<amagi:licenses>
  <amagi:vodPlatforms>
      <amagi:meta-value amagi:value="philo">
          <amagi:licensePeriod end="2023-09-20T00:00:00Z" start="2023-09-01T00:00:00Z" type="VOD" includeRegions="US">
          <amagi:licensePeriod end="2023-08-01T00:00:00Z" start="2023-07-01T00:00:00Z" type="VOD" includeRegions="US">
      </amagi:meta-value>
      <amagi:meta-value amagi:value="fubo">
          <amagi:licensePeriod end="2023-09-20T00:00:00Z" start="2023-09-01T00:00:00Z" type="VOD" includeRegions="US">
          <amagi:licensePeriod end="2023-08-01T00:00:00Z" start="2023-07-01T00:00:00Z" type="VOD" includeRegions="US">
      </amagi:meta-value>
  </amagi:vodPlatforms>
</amagi:licenses>

@shashi-banger , How this request will be getting translated to coverageRestrictions.

shashi-banger commented 7 months ago

@mbm-c The above will translate to the following in amgrss

<amg:rights>
    <amg:coverageRestrictions>
        <amg:rightsStartDateTime>2023-09-01T00:00:00Z</amg:rightsStartDateTime>
        <amg:rightsEndDateTime>2023-09-20T00:00:00Z</amg:rightsEndDateTime>
        <amg:rightsTerritoryIncludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_US</amg:rightsTerritoryIncludes>
    </amg:coverageRestrictions>
    <amg:coverageRestrictions>
        <amg:rightsStartDateTime>2023-07-01T00:00:00Z</amg:rightsStartDateTime>
        <amg:rightsEndDateTime>2023-08-01T00:00:00Z</amg:rightsEndDateTime>
        <amg:rightsTerritoryIncludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_US</amg:rightsTerritoryIncludes>
    </amg:coverageRestrictions>
    <amg:serviceId>AMGPLT1234</amg:serviceId>
    <amg:serviceName>philo</amg:serviceName>
    <amg:serviceType>VOD</amg:serviceType>
</amg:rights>
<amg:rights>
    <amg:coverageRestrictions>
        <amg:rightsStartDateTime>2023-09-01T00:00:00Z</amg:rightsStartDateTime>
        <amg:rightsEndDateTime>2023-09-20T00:00:00Z</amg:rightsEndDateTime>
        <amg:rightsTerritoryIncludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_US</amg:rightsTerritoryIncludes>
    </amg:coverageRestrictions>
    <amg:coverageRestrictions>
        <amg:rightsStartDateTime>2023-07-01T00:00:00Z</amg:rightsStartDateTime>
        <amg:rightsEndDateTime>2023-08-01T00:00:00Z</amg:rightsEndDateTime>
        <amg:rightsTerritoryIncludes>http://www.ebu.ch/metadata/ontologies/skos/ebu_Iso3166_CountryCodeCS#_US</amg:rightsTerritoryIncludes>
    </amg:coverageRestrictions>
    <amg:serviceId>AMGPLT4567</amg:serviceId>
    <amg:serviceName>fubo</amg:serviceName>
    <amg:serviceType>VOD</amg:serviceType>
</amg:rights>