org.topbraid.spin.model
Class QueryOrTemplateCall

java.lang.Object
  extended by org.topbraid.spin.model.QueryOrTemplateCall

public class QueryOrTemplateCall
extends java.lang.Object

A wrapper of either a Query or a TemplateCall.

Author:
Holger Knublauch

Constructor Summary
QueryOrTemplateCall(Resource cls, Query query)
          Constructs an instance representing a plain Query.
QueryOrTemplateCall(Resource cls, TemplateCall templateCall)
          Constructs an instance representing a template call.
 
Method Summary
 Resource getCls()
          Gets the associated subject, e.g.
 Query getQuery()
          If this is a Query, then get it.
 TemplateCall getTemplateCall()
          If this is a TemplateCall, then return it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryOrTemplateCall

public QueryOrTemplateCall(Resource cls,
                           Query query)
Constructs an instance representing a plain Query.

Parameters:
cls - the class the query is attached to
query - the SPIN Query

QueryOrTemplateCall

public QueryOrTemplateCall(Resource cls,
                           TemplateCall templateCall)
Constructs an instance representing a template call.

Parameters:
cls - the class the template call is attached to
templateCall - the template call
Method Detail

getQuery

public Query getQuery()
If this is a Query, then get it.

Returns:
the Query or null

getCls

public Resource getCls()
Gets the associated subject, e.g. the rdfs:Class that holds the spin:rule.

Returns:
the subject

getTemplateCall

public TemplateCall getTemplateCall()
If this is a TemplateCall, then return it.

Returns:
the TemplateCall or null