[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] fenfire/org/fenfire/util RDFUtil.java
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] fenfire/org/fenfire/util RDFUtil.java |
Date: |
Tue, 15 Apr 2003 13:53:33 -0400 |
CVSROOT: /cvsroot/fenfire
Module name: fenfire
Changes by: Tuomas J. Lukka <address@hidden> 03/04/15 13:53:33
Modified files:
org/fenfire/util: RDFUtil.java
Log message:
Dbg for mudyc
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/fenfire/fenfire/org/fenfire/util/RDFUtil.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: fenfire/org/fenfire/util/RDFUtil.java
diff -u fenfire/org/fenfire/util/RDFUtil.java:1.4
fenfire/org/fenfire/util/RDFUtil.java:1.5
--- fenfire/org/fenfire/util/RDFUtil.java:1.4 Tue Apr 15 13:41:57 2003
+++ fenfire/org/fenfire/util/RDFUtil.java Tue Apr 15 13:53:33 2003
@@ -7,6 +7,7 @@
import java.util.Iterator;
public class RDFUtil {
+ public static boolean dbg = true;
static private void pa(String s) { System.out.println("RDFUtil: "+s); }
/** Create a new resource with given type.
@@ -15,6 +16,9 @@
Object obj = Nodes.N();
fen.graph.set1_11X(obj, RDF.type, type);
+ if(dbg) pa("N: "+fen+" "+fen.graph+" "+fen.constgraph+
+ " "+obj+" "+type);
+
if (!isNodeType(fen, obj, type)) throw new Error("Impossible!");
return obj;
@@ -24,12 +28,14 @@
/** Check if node is the type which is asked.
*/
static public boolean isNodeType(Fen fen, Object node, Object type) {
+ if(dbg) pa("Isnodetype: "+node+" "+type);
Iterator it = fen.constgraph.findN_11X_Iter(node, RDF.type);
while(it.hasNext()) {
Object obj = it.next();
- pa("obj: "+ obj);
+ pa(" entry: "+ obj);
if ( obj.equals(type) ) return true;
}
+ pa("None matched");
return false;
}