    001    /*
    002    @license.text@
    003     */
    004    package com.hammurapi.reasoning.tutorial.rules;
    005
    006    import com.hammurapi.reasoning.spi.Condition;
    007    import com.hammurapi.reasoning.spi.Infer;
    008    import com.hammurapi.reasoning.tutorial.objectmodel.Child;
    009    import com.hammurapi.reasoning.tutorial.objectmodel.Daughter;
    010
    011    public class DaughterRule {
    012
    013            @Infer
    014            public Daughter infer(
    015                            @Condition("!(arg instanceof com.hammurapi.reasoning.tutorial.objectmodel.Daughter) && !arg.getSubject().isMale()") Child child
    016            ) {
    017                    return new Daughter(child.getSubject(), child.getObject());
    018            }
    019    }