2017-12-12 6 views
3

私は、企業/子会社とそのWebサイトの機械理解可能な関係の説明を達成しようとしています。 2つの子会社を持つ親会社が1つあり、そのすべてが独自のWebサイトを所有しているとします。 1つのOrganizationスクリプトと1つのホームページに1つのWebSiteスクリプトをデプロイします。JSON-LD schema.orgを介して複数の組織とウェブサイトを接続する

親組織のJSON-LDは読む:

<script type="application/ld+json"> 
{ 
    "@context": "http://www.schema.org", 
    "@type": "Organization", 
    "@id": "https://www.parentorg.com/#organization", 
    "name": "Parent Org", 
    "legalName": "Parent Org Inc.", 
    "description": "Description of company", 
    "foundingDate": "1978", 
    "logo": "https://www.parentorg.com/images/logo.png", 
    "image": "https://www.parentorg.com/de/images/outside.jpg", 
    "url": "https://www.parentorg.com/", 
    "address": { 
    "@type": "PostalAddress", 
    "streetAddress": "Street 110", 
    "addressLocality": "City", 
    "postalCode": "XX XXX", 
    "addressCountry": "XX" 
    }, 
    "contactPoint": { 
    "@type": "ContactPoint", 
    "contactType": "customer support", 
    "telephone": "+12-345-678-91011", 
    "email": "[email protected]" 
    }, 
    "sameAs": [ 
    "https://twitter.com/parentorg/", 
    "https://www.instagram.com/parentorg/", 
    "https://www.youtube.com/user/parentorg/", 
    "https://plus.google.com/parentorg" 
    ], 
    "subOrganization": [ 
    { 
     "@type": "Organization", 
     "@id": "https://www.subsidiary-one.de/#organization", 
     "name": "Subsidiary One" 
    }, 
    { 
     "@type": "Organization", 
     "@id": "https://www.subsidiary-two.de/#organization", 
     "name": "Subsidiary Two" 
    } 
    ] 
} 
</script> 

親のウェブサイトJSON-LDは次のとおりです。

<script type="application/ld+json"> 
{ 
    "@context": "http://schema.org", 
    "@type": "WebSite", 
    "@id": "https://www.parentorg.com/#website", 
    "url": "https://www.parentorg.com/", 
    "author": { 
    "@type": "Organization", 
    "@id": "https://www.parentorg.com/#organization", 
    "name": "Parent Org" 
    } 
} 
</script> 

そして今、子会社の組織JSON-LD parentOrganizationプロパティが含まれています。

"parentOrganization": { 
    "@type": "Organization", 
    "@id": "https://www.parentorg.com/#organization", 
    "name": "Parent Org" 
    } 

これは、これらのエンティティを相互参照するのに適した方法ですか?また、nameのプロパティをsubOrganizationparentOrganization、およびauthorの中に書き出す必要がありますか?URIが参照されていますか?

答えて

2

はい、エンティティを相互参照する方法(giving each entity an @id that is different from the url)のベストプラクティスに従います。

あなたはは、エンティティを参照するときに追加のプロパティを提供するために、を持っていないので、これは素晴らしいです:

"author": {"@id": "https://www.parentorg.com/#organization"} 
"subOrganization": [ 
    {"@id": "https://www.subsidiary-one.de/#organization"}, 
    {"@id": "https://www.subsidiary-two.de/#organization"} 
] 
"parentOrganization": {"@id": "https://www.parentorg.com/#organization"} 

しかし、これはもちろん、消費者が参照文書を取得する必要があります。しかし、すべてではない(おそらく)。したがって、これらのコンシューマにデータを提供したい場合は、@idに加えてプロパティを追加することもできます。 1つ、いくつか、またはすべてのプロパティであってもかまいません。それは、参照リソースは、に関心があるかどうかを決定するためにそれらを可能にすることができるようにも、フェッチ書類が可能な消費者のために役立つことができ@typeを提供

  • :私はあなたの例から2は、最も重要なものだと思いますそれらはの前にを取り込みます。例えば、消費者は、Personではなく、Organizationによって編集された作品authorのみを気にする可能性があります。

  • プロパティを提供することは、名前/ラベルの恩恵を受ける何らかの方法で組み込みの構造化データを表示するコンシューマにとって有用です。

関連する問題