reasoner
Class RoleQuery

java.lang.Object
  extended by reasoner.RoleQuery
All Implemented Interfaces:
Query

public class RoleQuery
extends java.lang.Object
implements Query

This class represents a Query in the generic form (Qt)(Q)R.C, where Qt is a temporal Quantifier, Q is a Quantifier, R is a Role, C is a Concept

Author:
marco furlan

Field Summary
private  Concept c
          The Concept
private  java.text.NumberFormat formatter
           
private  java.text.NumberFormat formatter0
           
private  KnowledgeBase kb
          The KnowledgeBase
private  Quantifier q
          The Quantifier
private  Role r
          The Role
private  java.lang.String str
           
private  ConcreteConcept tc
          The ConcreteConcept
private  Quantifier tempq
          The temporal Quantifier
 
Constructor Summary
RoleQuery(Quantifier tempq, Quantifier q, Role r, ConcreteConcept tc, KnowledgeBase kb)
          Constructor for this RoleQuery
RoleQuery(Quantifier q, Role r, ConcreteConcept tc, KnowledgeBase kb)
          Constructor for this RoleQuery, with null temporal quantifier
 
Method Summary
 double evaluate()
          Evaluates this Query.
 java.lang.String evaluateString()
          Gets this RoleQuery evaluation in String format
 Concept getC()
           
 KnowledgeBase getKb()
           
 java.lang.String getMeaning()
          Gives a String about this Query meaning
 Quantifier getQ()
           
 Role getR()
           
 ConcreteConcept getTc()
           
 Quantifier getTempq()
           
 void setC(Concept c)
           
private  void setFormatter(int n)
           
private  void setFormatter0(int n)
           
 void setKb(KnowledgeBase kb)
           
 void setQ(Quantifier q)
           
 void setR(Role r)
           
 void setTc(ConcreteConcept tc)
           
 void setTempq(Quantifier tempq)
           
 java.lang.String toString()
          Gives a String representation for this Query
 Concept trap2Concept(ConcreteConcept t)
          Converts a ConcreteConcept in a correspondent Concept
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

q

private Quantifier q
The Quantifier


tempq

private Quantifier tempq
The temporal Quantifier


r

private Role r
The Role


kb

private KnowledgeBase kb
The KnowledgeBase


tc

private ConcreteConcept tc
The ConcreteConcept


c

private Concept c
The Concept


str

private java.lang.String str

formatter

private java.text.NumberFormat formatter

formatter0

private java.text.NumberFormat formatter0
Constructor Detail

RoleQuery

public RoleQuery(Quantifier q,
                 Role r,
                 ConcreteConcept tc,
                 KnowledgeBase kb)
Constructor for this RoleQuery, with null temporal quantifier

Parameters:
q - the Quantifier
r - the Role
kb - the KnowledgeBase
tc - the ConcreteConcept

RoleQuery

public RoleQuery(Quantifier tempq,
                 Quantifier q,
                 Role r,
                 ConcreteConcept tc,
                 KnowledgeBase kb)
Constructor for this RoleQuery

Parameters:
tempq - the temporal Quantifier
q - the Quantifier
r - the Role
tc - the ConcreteConcept
kb - the KnowledgeBase
Method Detail

evaluate

public double evaluate()
Description copied from interface: Query
Evaluates this Query.

Specified by:
evaluate in interface Query
Returns:
the result

evaluateString

public java.lang.String evaluateString()
Gets this RoleQuery evaluation in String format

Returns:
the String

trap2Concept

public Concept trap2Concept(ConcreteConcept t)
Converts a ConcreteConcept in a correspondent Concept

Parameters:
t - the ConcreteConcept
Returns:
the Concept

getTc

public ConcreteConcept getTc()
Returns:
the tc

setTc

public void setTc(ConcreteConcept tc)
Parameters:
tc - the tc to set

getKb

public KnowledgeBase getKb()
Returns:
the kb

setKb

public void setKb(KnowledgeBase kb)
Parameters:
kb - the kb to set

getQ

public Quantifier getQ()
Returns:
the q

setQ

public void setQ(Quantifier q)
Parameters:
q - the q to set

getR

public Role getR()
Returns:
the r

setR

public void setR(Role r)
Parameters:
r - the r to set

toString

public java.lang.String toString()
Description copied from interface: Query
Gives a String representation for this Query

Specified by:
toString in interface Query
Overrides:
toString in class java.lang.Object
Returns:
the String

getMeaning

public java.lang.String getMeaning()
Description copied from interface: Query
Gives a String about this Query meaning

Specified by:
getMeaning in interface Query
Returns:
the meaning

getC

public Concept getC()
Returns:
the c

setC

public void setC(Concept c)
Parameters:
c - the c to set

getTempq

public Quantifier getTempq()
Returns:
the tempq

setTempq

public void setTempq(Quantifier tempq)
Parameters:
tempq - the tempq to set

setFormatter

private void setFormatter(int n)

setFormatter0

private void setFormatter0(int n)