vs.plotagent.inspiration
Class InspirationRule

java.lang.Object
  extended by vs.plotagent.inspiration.InspirationRule

public class InspirationRule
extends java.lang.Object


Field Summary
 java.util.Set<de.fuberlin.wiwiss.ng4j.Quad> m_antecedent
           
 java.util.Set<de.fuberlin.wiwiss.ng4j.Quad> m_consequent
           
 java.util.Set<com.hp.hpl.jena.graph.Node> m_inspirationCausers
           
 com.hp.hpl.jena.graph.Node m_inspirationNode
           
 com.hp.hpl.jena.graph.Node m_inspirationType
           
 java.lang.String m_maingraphVar
           
 java.lang.String m_name
           
 java.util.Map<com.hp.hpl.jena.graph.Node,java.lang.String> m_nodeToVarMap
           
 java.util.Set<com.hp.hpl.jena.graph.Node> m_subgraphnodes
           
 java.util.Set<java.lang.String> m_uniqueVars
           
 int m_varCounter
           
static java.lang.String mainGraphVar
           
 
Constructor Summary
InspirationRule(java.lang.String name, com.hp.hpl.jena.graph.Node inspirationNode, com.hp.hpl.jena.graph.Node inspirationType, java.util.Set<com.hp.hpl.jena.graph.Node> inspirationCausers, java.util.Set<com.hp.hpl.jena.graph.Node> subGraphNodes)
           
 
Method Summary
 void add(InspirationRule r)
           
 void addAntecedent(de.fuberlin.wiwiss.ng4j.Quad q)
          Adds a quad to the antecedent (left hand side) of the rule.
 void addConsequent(de.fuberlin.wiwiss.ng4j.Quad q)
          Adds a quad to the consequent (right hand side) of the rule.
 boolean equals(java.lang.Object o)
          Following the steps from http://java.sun.com/developer/Books/effectivejava/Chapter3.pdf It must be symmetric, transitive and consistent
 java.util.Set<de.fuberlin.wiwiss.ng4j.Quad> getAntecedent()
           
 java.util.Set<de.fuberlin.wiwiss.ng4j.Quad> getConsequent()
           
 java.util.Set<com.hp.hpl.jena.graph.Node> getInspirationCausers()
           
 com.hp.hpl.jena.graph.Node getInspirationNode()
           
 com.hp.hpl.jena.graph.Node getInspirationType()
           
 java.lang.String getName()
           
 int hashCode()
          Return the sum of the hashcodes of the important parts. hashCode must be overridden when equals() is used.
 java.lang.String toString()
          A rule looks like this: suggestion('rule_14', (, , <...>)) :- ( , , <...>)
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

mainGraphVar

public static java.lang.String mainGraphVar

m_name

public java.lang.String m_name

m_subgraphnodes

public java.util.Set<com.hp.hpl.jena.graph.Node> m_subgraphnodes

m_inspirationNode

public com.hp.hpl.jena.graph.Node m_inspirationNode

m_inspirationType

public com.hp.hpl.jena.graph.Node m_inspirationType

m_inspirationCausers

public java.util.Set<com.hp.hpl.jena.graph.Node> m_inspirationCausers

m_antecedent

public java.util.Set<de.fuberlin.wiwiss.ng4j.Quad> m_antecedent

m_consequent

public java.util.Set<de.fuberlin.wiwiss.ng4j.Quad> m_consequent

m_nodeToVarMap

public java.util.Map<com.hp.hpl.jena.graph.Node,java.lang.String> m_nodeToVarMap

m_uniqueVars

public java.util.Set<java.lang.String> m_uniqueVars

m_maingraphVar

public java.lang.String m_maingraphVar

m_varCounter

public int m_varCounter
Constructor Detail

InspirationRule

public InspirationRule(java.lang.String name,
                       com.hp.hpl.jena.graph.Node inspirationNode,
                       com.hp.hpl.jena.graph.Node inspirationType,
                       java.util.Set<com.hp.hpl.jena.graph.Node> inspirationCausers,
                       java.util.Set<com.hp.hpl.jena.graph.Node> subGraphNodes)
Method Detail

add

public void add(InspirationRule r)

addAntecedent

public void addAntecedent(de.fuberlin.wiwiss.ng4j.Quad q)
Adds a quad to the antecedent (left hand side) of the rule. A rule fires when its antecedent is met. TODO filter out stuff that a rule is not interested in? (e.g., rdfs:label)

Parameters:
q - the quad to add to the antecedent of the rule.

addConsequent

public void addConsequent(de.fuberlin.wiwiss.ng4j.Quad q)
Adds a quad to the consequent (right hand side) of the rule. When a rule fires, it produces the consequent.

Parameters:
q - the quad to add to the consequent of the rule.

equals

public boolean equals(java.lang.Object o)
Following the steps from http://java.sun.com/developer/Books/effectivejava/Chapter3.pdf It must be symmetric, transitive and consistent

Overrides:
equals in class java.lang.Object

getAntecedent

public java.util.Set<de.fuberlin.wiwiss.ng4j.Quad> getAntecedent()

getConsequent

public java.util.Set<de.fuberlin.wiwiss.ng4j.Quad> getConsequent()

getInspirationCausers

public java.util.Set<com.hp.hpl.jena.graph.Node> getInspirationCausers()

getInspirationNode

public com.hp.hpl.jena.graph.Node getInspirationNode()

getInspirationType

public com.hp.hpl.jena.graph.Node getInspirationType()

getName

public java.lang.String getName()

hashCode

public int hashCode()
Return the sum of the hashcodes of the important parts. hashCode must be overridden when equals() is used.

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
A rule looks like this: suggestion('rule_14', (, , <...>)) :- ( , , <...>)

Overrides:
toString in class java.lang.Object