@prefix dc: <http://purl.org/dc/elements/1.1/>.


<> dc:description """Dan/Mary family tree/birthday list""",
	"$Id: dm93fam.n3,v 1.2 2004/01/03 04:57:28 connolly Exp $",
   "becoming obsolete in favor of dm93.org stuff";
   dc:relation <http://dm93.org/z2001/ChristmasCardRitual>.

@prefix log: <http://www.w3.org/2000/10/swap/log#> .

@prefix : <dm93fam#>.

######
# RDFS stuff
@prefix u: <http://www.w3.org/2000/01/rdf-schema#>.

{ ?S [ u:domain ?C ] ?O } => { ?S a ?C }.
{ ?S [ u:range ?C ] ?O } => { ?O a ?C }.


#####
# DAML+OIL stuff

@prefix ont: <http://www.daml.org/2001/03/daml+oil#>.

{ ?S [ ont:inverseOf ?P ] ?O } => { ?O ?P ?S }.

ont:inverseOf ont:inverseOf ont:inverseOf.

########
#
# Geneology...
# traditional western family naming: children take
# father's surname, wife takes husbands surname.
#

@prefix g: <geneology#>.

g:father u:range g:Man.
g:mother u:range g:Woman.
g:husband u:range g:Man.
g:wife u:range g:Woman; ont:inverseOf g:husband.

g:maidenName u:domain g:Woman.

{ ?WHO g:husband [ g:surName ?N ] } => { ?WHO g:marriedName ?N }.
{ ?WHO g:father  [ g:surName ?N ] } => { ?WHO g:surName ?N }.
{ ?WHO g:husband [];
       g:father  [ g:surName ?N ] } => { ?WHO g:maidenName ?N }.
{ ?WHO g:father [ g:wife ?HER ] } => { ?WHO g:mother ?HER }.
{ ?WHO g:mother [ g:husband ?HIM ] } => { ?WHO g:father ?HIM }.



#######

:JWC
  g:givenName "John";
  g:middleName "Walter";
  g:surName "Connolly";
  g:wife :MRC;
  is g:father of [ g:givenName "Paul"; g:wife [ g:givenName "Tish"] ],
   [ g:givenName "Jeanne";
     g:husband [ g:givenName "Bill"; g:surName "Kohlberg"];
     is g:mother of
       [ g:givenName "Nick"],
       [ g:givenName "Amy"],
       [ g:givenName "Michael"] ],
   [ g:givenName "Janet";
     g:husband [ g:givenName "Mike"; g:surName "Scannell"];
     is g:mother of
       [ g:givenName "Mike" ],
       [ g:givenName "Eryn" ]
   ],
   [ g:givenName "Jonathan" ]
   .

:MRC
  g:givenName "Marilyn";
  g:middleName "Ruth";
  g:father [ g:givenName "John"; g:surName "Carroll"];
  g:husband :JWC.     

:DWC
  g:givenName "Daniel";
  g:middleName "Walter";
  g:mother :MRC;
  g:father :JWC;
  g:wife :MJU.


:Butch
  g:givenName "Butch";
  g:surName "Ulrich";
  g:wife :Rose.

:Rose
  g:givenName "Rose";
  g:husband :Butch.

:LU
  g:givenName "Lorraine";
  g:husband :Eyeball.

:Eyeball
  g:givenName "John";
  g:nickName "Eyeball";
  g:father :Butch;
  is g:father of
    [ g:givenName "Arlene";
      g:husband [ g:givenName "Scott"; g:surName "Bevin" ];
      is g:mother of [ g:givenName "Katherine" ],
                     [ g:givenName "Sarah"]],
    [ g:givenName "Deb";
      g:husband [ g:givenName "Storm"; g:surName "Field" ];
      is g:mother of [ g:givenName "Anna" ],
                     [ g:givenName "Willa"; g:middleName "Rose" ] ],
    [ g:givenName "Julie";
      g:husband [ g:givenName "Pat"; g:surName "Smith"];
      is g:mother of
        [ g:givenName "Lauren" ],
        [ g:givenName "Erin" ],
        [ g:givenName "Shannon" ],
        [ g:givenName "Colleen" ],
        [ g:givenName "Abby" ]
    ],
    [ g:givenName "Andrea" ],
    [ g:givenName "John"; g:wife [ g:givenName "Lisa"] ].

:MJU
  g:givenName "Mary";
  g:middleName "Jo";
  g:mother :LU;
  g:father :Eyeball.

:BWC
  g:givenName "Brennan";
  g:middleName "Walter"; #rule for "... Walter Connolly"s?
  g:mother :MJU;
  g:father :DWC.

:JDC
  g:givenName "Justin";
  g:middleName "Daniel"; # rule for middle name from father's 1st name,
			# ala jr.?
  g:mother :MJU;
  g:father :DWC.

:KPC
  g:givenName "Kyle";
  g:middleName "Patrick";
  g:mother :MJU;
  g:father :DWC.



########
#
# Geneology graph style
#

@prefix gv: <http://www.w3.org/2001/02pd/gv#>.

<> gv:digraph [
  gv:hasNode :DWC, :MJC
].

{ ?S gv:hasNode [ [ a gv:EdgeProperty] ?O ] } => { ?S gv:hasNode ?O}.
{ ?S gv:hasNode [ is [ a gv:EdgeProperty] of ?O ] } => { ?S gv:hasNode ?O}.

{ ?HER g:husband ?HIM } => {

g:mother ont:inverseOf [ a gv:EdgeProperty; g:label "child"].
g:husband a gv:EdgeProperty; g:label "husband".

{ ?S g:givenName ?N } => { ?S gv:label ?N }.

{ ?S a g:Man } => { ?S gv:color "blue" }.
{ ?S a g:Woman } => { ?S gv:color "pink" }.
