earthcubearchitecture-project418 / p418Vocabulary

Vocabulary + HTML for describing the schema.org extension
https://geodex.org/voc/
6 stars 4 forks source link

Is it best for publishers to make the top-level resource a Service? #9

Closed ashepherd closed 6 years ago

ashepherd commented 6 years ago

Originally, I tried making the Organization the top-level resource instead of Service, but a couple things made me pivot

1) To describe the Services an Organization offers, we would have multiple resources described like:

@graph: {
  {
    @type: Organization,
    @id: http://example.org/
    ...
  },
  {
    @type: Service,
    @id: http://example.org/sparql
    name: SPARQL,
    provider: { @id: http://example.org/ }
    ...
  },
  {
    @type: Service,
    @id: http://example.org/submit
    name: Submit Data,
    provider: { @id: http://example.org/ }
    ...
  },
  {
    @type: Service,
    @id: http://example.org/rss
    name: RSS,
    provider: { @id: http://example.org/ }
    ...
  }
}

vs. the nicer looking coupling:
@graph: {
  {
    @type: Service,
    @id: http://example.org/
    provider: {
      @type: Organization,
      @id: http://example.org/,
      ...
    },
    availableChannel: [
      {
        @type: ServiceChannel,
        providesService: {
          @type: Service,
          name: SPARQL,
          ...
        }
      },
      {
        @type: ServiceChannel,
        providesService: {
          @type: Service,
          name: Submit Data,
          ...
        }
      },
      {
        @type: ServiceChannel,
        providesService: {
          @type: Service,
          name: RSS,
          ...
        }
      }

    ]
  }
}
2) Does separating the Organization from the overall Service it provides give flexibility to describing multiple Organizations providing that service under a single funded project? Or if the funding moves to a different Organization in the future?
ashepherd commented 6 years ago

@fils, I just had an epiphany about Service v. Organization! We can use multiple types in @type like:

{
  "@context": "https://schema.org",
  "@type": [ "Organization", "Service" ],
  "@id": "http://www.bco-dmo.org",
  "name": "Testing multiple types",
  "provider": {
    "@id": "http://www.bco-dmo.org"
  },
  "url": "http://www.bco-dmo.org"
}

This will elevate Organization to the top-level item, but let us specify the service provider as itself, while still being able to attach the search, syndication and data submission services to it.

I tested at the testing tool and it does not throw an error. Thoughts?