1 10 package com.hp.hpl.jena.reasoner.rulesys.impl; 11 12 import com.hp.hpl.jena.graph.*; 13 import com.hp.hpl.jena.reasoner.rulesys.Rule; 14 15 27 public class EnvironmentFrame extends FrameObject { 28 29 30 Node[] pVars; 31 32 33 RuleClauseCode clause; 34 35 36 int cpc; 37 38 39 int cac; 40 41 45 public EnvironmentFrame(RuleClauseCode clause) { 46 this.clause = clause; 47 } 48 49 52 public void allocate(int n) { 53 pVars = new Node[n]; 54 } 55 56 59 public Rule getRule() { 60 if (clause != null) { 61 return clause.rule; 62 } else { 63 return null; 64 } 65 } 66 67 70 public String toString() { 71 if (clause == null || clause.rule == null) { 72 return "[anon]"; 73 } else { 74 return "[" + clause.rule.toShortString() + "]"; 75 } 76 } 77 } 78 79 80 | Popular Tags |