org.pelds.rules
Class RuleParser

java.lang.Object
  extended by org.pelds.rules.RuleParser

public class RuleParser
extends java.lang.Object

Transforms rules from text representation into the internal object structure and into RDF/SWRL

Author:
Hannes Muehleisen (hannes@muehleisen.org)

Constructor Summary
RuleParser(java.lang.String rules, boolean verbose)
          Constructor, takes rules in their text representation
 
Method Summary
 com.hp.hpl.jena.rdf.model.Model addRulesToModel(com.hp.hpl.jena.ontology.OntModel m, com.hp.hpl.jena.shared.PrefixMapping p, java.lang.String actionUri)
          Converts Rules from internal model into RDF/SWRL format
 java.util.ArrayList<Rule> getRules()
           
 void setVerbose(boolean set)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleParser

public RuleParser(java.lang.String rules,
                  boolean verbose)
Constructor, takes rules in their text representation

Parameters:
rules - rules in text representation
verbose - debug flag
Method Detail

addRulesToModel

public com.hp.hpl.jena.rdf.model.Model addRulesToModel(com.hp.hpl.jena.ontology.OntModel m,
                                                       com.hp.hpl.jena.shared.PrefixMapping p,
                                                       java.lang.String actionUri)
Converts Rules from internal model into RDF/SWRL format

Parameters:
m - Model to read property types etc from
p - PrefixMapping containing the valid prefixes for atoms
actionUri - URI of current Action
Returns:
RDF Model containing SWRL rules with triple patterns

getRules

public java.util.ArrayList<Rule> getRules()

setVerbose

public void setVerbose(boolean set)