SPARQL 
CLEAR GRAPH <urn:spin:nanotation:demo:royal:family> ;


SPARQL
PREFIX  rel:  <http://purl.org/vocab/relationship/> 
PREFIX wdrs: <http://www.w3.org/2007/05/powder-s#> 
PREFIX schema: <http://schema.org/> 

WITH <urn:spin:nanotation:demo:royal:family>
INSERT
		 {
		 			
			 		## Custom Entity Relationship Types (Relations) ##
	 
			 <#hasUncle>
			 a rdf:Property ;
			 rdfs:label "hasUncle" ;
			 rdfs:comment """Relationship Type that's derived from a SPARQL-based Custom Inference Rule
			 			   that associates a Person with a Male Person that's a sibling of one of their Parents. 
						  """ ;
			 rdfs:domain <#RoyalPerson> ;
			 rdfs:range <#MalePerson> ;
			 wdrs:describedby <#> .
	 
			 <#hasAuntie>
			 a rdf:Property ;
			 rdfs:label "hasAuntie" ;
			 rdfs:comment """Relationship Type that's derived from a SPARQL-based Custom Inference Rule
			 			   that associates a Person with a Female Person that's a sibling of one of their Parents. 
						  """ ;
 			 rdfs:domain <#RoyalPerson> ;
 			 rdfs:range <#FemalePerson> ;
			 wdrs:describedby <#> .
	 
			 <#hasCousin> 
			 a rdf:Property ;
			 rdfs:label "hasCousin" ;
			 rdfs:comment """Relationship Type that's derived from a SPARQL-based Custom Inference Rule
			 			     that associates a Person with another Person; that's a child of the sibling of one of their Parents.
						  """ ;
  			 rdfs:domain <#RoyalPerson> ;
  			 rdfs:range <#FemalePerson> ;
			 wdrs:describedby <#> .

	 
			 		## Custom Entity Types (Classes) ##
	 
			 <#RoyalPerson>
			 rdfs:subClassOf foaf:Person, schema:Person ;
			 rdfs:label "Person Class" ;
			 rdfs:comment """
			 			   A person that inherits properties of both the foaf:Person and schema:Person classes from
						   their respective vocabularies. The properties of this class are defined using custom inference 
						   rules using SPARQL via .""" ;
			 wdrs:describedby <#> .
	 
			 <#FemalePerson>
			 rdfs:subClassOf <#RoyalPerson> ;
			 rdfs:label "Female Person Class" ;
			 rdfs:comment """
			 			   A female person that inherits properties of the Person class identified by relative URI: <#RoyalPerson>.
						   The properties of this class are defined using custom inference rules using SPARQL via .
						   """ ;
			 wdrs:describedby <#> .
	 
			 <#MalePerson>
			 rdfs:subClassOf <#RoyalPerson> ;
			 rdfs:label "Male Person Class" ;
			 rdfs:comment """
			 			   A male person that inherits properties of the Person class identified by relative URI: <#RoyalPerson>.
						   The properties of this class are defined using custom inference rules using SPARQL via .
						   """ ;
			 wdrs:describedby <#> .
		 
			 			## Entity Relationships ##
					
			  <http://dbpedia.org/resource/Prince_William_of_Wales> 
			  a <#RoyalPerson>, <#MalePerson> ;
			  schema:name "Prince William" ;
			  rel:siblingOf <http://dbpedia.org/resource/Prince_Harry_of_Wales> .
									  					
			  <http://dbpedia.org/resource/Elizabeth_Bowes-Lyon> 
			  a <#RoyalPerson>, <#FemalePerson> ;
			  schema:name "Queen Mother" ;
			  rel:parentOf <http://dbpedia.org/resource/Elizabeth_II_of_the_United_Kingdom> .
								
			  <http://dbpedia.org/resource/Elizabeth_II_of_the_United_Kingdom> 
			  a <#RoyalPerson>, <#FemalePerson> ;
			  schema:name "Queen Elizabeth II" ;
			  rel:parentOf <http://dbpedia.org/resource/Charles,_Prince_of_Wales>,
						   <http://dbpedia.org/resource/Anne,_Princess_Royal>, 
						   <http://dbpedia.org/resource/Prince_Andrew,_Duke_of_York>, 
						   <http://dbpedia.org/resource/Prince_Edward,_Earl_of_Wessex> ;
			  rel:siblingOf <http://dbpedia.org/resource/Princess_Margaret,_Countess_of_Snowdon> .
								
			  <http://dbpedia.org/resource/Charles,_Prince_of_Wales> 
			  a <#RoyalPerson>, <#MalePerson> ;
			  schema:name "Prince Charles" ;
			  rel:parentOf <http://dbpedia.org/resource/Prince_William_of_Wales> , 
			  <http://dbpedia.org/resource/Prince_Harry_of_Wales> .
								
			 <http://dbpedia.org/resource/Princess_Margaret,_Countess_of_Snowdon> 
			 a <#RoyalPerson>, <#FemalePerson> ;
			 schema:name "Princess Margaret" . 
			 
			 <http://dbpedia.org/resource/Anne,_Princess_Royal> 
			 a <#RoyalPerson>, <#FemalePerson> ;
			 schema:name "Princess Anne" ;
			 rel:parentOf <http://dbpedia.org/resource/Peter_Phillips>, <http://dbpedia.org/resource/Zara_Phillips> .
								
			 <http://dbpedia.org/resource/Zara_Phillips> 
			 a <#RoyalPerson>, <#FemalePerson> ;
			 schema:name "Princess Zara Phillips" .
			 
			 <http://dbpedia.org/resource/Princess_Beatrice_of_York>  
			 a <#RoyalPerson>, <#FemalePerson> ;
			 schema:name "Princess Beatrice" .
			 
			 <http://dbpedia.org/resource/Princess_Eugenie_of_York>
			 a <#RoyalPerson>, <#FemalePerson> ;
			 schema:name "Princess Eugenie" .
			 
			 <http://dbpedia.org/resource/Prince_Andrew,_Duke_of_York> 
			 a <#RoyalPerson>, <#MalePerson> ;
			 schema:name "Prince Andrew" ;
			 rel:parentOf <http://dbpedia.org/resource/Princess_Eugenie_of_York>, 
			 <http://dbpedia.org/resource/Princess_Beatrice_of_York> .
								
			 <http://dbpedia.org/resource/Prince_Edward,_Earl_of_Wessex> 
			 a <#RoyalPerson>, <#MalePerson> ;
			 schema:name "Prince Edward" .
			 
			 <http://dbpedia.org/resource/Prince_Harry_of_Wales> 
			 a <#RoyalPerson>, <#MalePerson> ;
			 schema:name "Prince Harry" .
			 
			 <http://dbpedia.org/resource/Peter_Phillips> 
			 a <#RoyalPerson>, <#MalePerson> ;
			 schema:name "Prince Peter Phillips" . 
			
			 
		} ;