biz.hammurapi.rules.tutorial.rules
Class SecondaryRules

java.lang.Object
  extended by biz.hammurapi.config.ComponentBase
      extended by biz.hammurapi.rules.AbstractRule
          extended by biz.hammurapi.rules.Rule
              extended by biz.hammurapi.rules.tutorial.rules.SecondaryRules
All Implemented Interfaces:
biz.hammurapi.config.Component, biz.hammurapi.config.Context, biz.hammurapi.dispatch.InvocationTarget, biz.hammurapi.metrics.MeasurementCollector, biz.hammurapi.metrics.MeasurementConsumer, biz.hammurapi.rules.Constants

public class SecondaryRules
extends biz.hammurapi.rules.Rule

Infers aunt, uncle, cousin, niece, nephew

Author:
Pavel Vlasov

Nested Class Summary
 
Nested classes/interfaces inherited from class biz.hammurapi.rules.Rule
biz.hammurapi.rules.Rule.AcceptInfo, biz.hammurapi.rules.Rule.ChangeDetector
 
Field Summary
 
Fields inherited from class biz.hammurapi.config.ComponentBase
owner
 
Fields inherited from interface biz.hammurapi.rules.Constants
COLLECTION_MANAGER, DESCRIPTION, HANDLE_MANAGER, KNOWLEDGE_COMPACTOR, NAME, NEGATOR_CLASS, OBJECT_FILTER, RETAIN_NEGATORS, RULES, URI_DIRECT, URI_PROPERTY, WORKER_REF
 
Constructor Summary
SecondaryRules()
           
 
Method Summary
 void infer(Aunt aunt, Parent parent)
          Another way to infer cousin to demonstrate mutiple derivations
 Uncle infer(Brother brother, Parent parent)
          Brother of parent is uncle.
 void infer(Child child1, Child child2, Sibling sibling)
          Infers cousin as a child or parent's sibling.
 Cousin infer(Cousin cousin)
          If A is a cousin of B then B is a cousin of A
 void infer(Daughter daughter, Sibling sibling)
          Daughter of sibling is niece.
 Uncle infer(Husband husband, Aunt aunt)
          Husband of aunt is uncle.
 Aunt infer(Sister sister, Parent parent)
          Sister of parent is aunt.
 void infer(Son son, Sibling sibling)
          Son of sibling is nephew.
 void infer(Uncle uncle, Parent parent)
          Another way to infer cousin to demonstrate mutiple derivations
 Aunt infer(Wife wife, Uncle uncle)
          Wife of uncle is aunt.
 
Methods inherited from class biz.hammurapi.rules.Rule
getInvocationCounter, getInvocationHandlers, getRemoveHandlers, newChangeDetector, post, remove, reset, resetInvocationCounter, setMethodFactTypes, setMethodFactTypes, setMethodFactTypes, setMethodFactTypes, start, update
 
Methods inherited from class biz.hammurapi.rules.AbstractRule
getCollection, getDescription, getName, setDescription, setName, stop, toString
 
Methods inherited from class biz.hammurapi.config.ComponentBase
addMeasurement, get, getChild, getMeasurementConsumer, getOwner, getOwner, setMeasurementConsumer, setOwner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SecondaryRules

public SecondaryRules()
Method Detail

infer

public void infer(Child child1,
                  Child child2,
                  Sibling sibling)
Infers cousin as a child or parent's sibling.


infer

public Cousin infer(Cousin cousin)
If A is a cousin of B then B is a cousin of A

Parameters:
cousin -
Returns:

infer

public void infer(Aunt aunt,
                  Parent parent)
Another way to infer cousin to demonstrate mutiple derivations

Parameters:
aunt -
child -

infer

public void infer(Uncle uncle,
                  Parent parent)
Another way to infer cousin to demonstrate mutiple derivations

Parameters:
uncle -
child -

infer

public Aunt infer(Sister sister,
                  Parent parent)
Sister of parent is aunt.

Parameters:
sister -
parent -

infer

public Aunt infer(Wife wife,
                  Uncle uncle)
Wife of uncle is aunt.

Parameters:
sister -
parent -

infer

public Uncle infer(Brother brother,
                   Parent parent)
Brother of parent is uncle.

Parameters:
sister -
parent -

infer

public Uncle infer(Husband husband,
                   Aunt aunt)
Husband of aunt is uncle.

Parameters:
sister -
parent -

infer

public void infer(Daughter daughter,
                  Sibling sibling)
Daughter of sibling is niece.


infer

public void infer(Son son,
                  Sibling sibling)
Son of sibling is nephew.



Copyright © 2006 Hammurapi Group. All Rights Reserved.