3 |
package org.fenfire.modules.pp; |
package org.fenfire.modules.pp; |
4 |
import org.fenfire.*; |
import org.fenfire.*; |
5 |
import org.fenfire.swamp.*; |
import org.fenfire.swamp.*; |
6 |
|
import org.fenfire.swamp.impl.*; |
7 |
import org.fenfire.impl.*; |
import org.fenfire.impl.*; |
8 |
import org.fenfire.util.*; |
import org.fenfire.util.*; |
9 |
import org.fenfire.view.*; |
import org.fenfire.view.*; |
13 |
import org.nongnu.libvob.*; |
import org.nongnu.libvob.*; |
14 |
import org.nongnu.libvob.impl.*; |
import org.nongnu.libvob.impl.*; |
15 |
import org.nongnu.libvob.buoy.*; |
import org.nongnu.libvob.buoy.*; |
|
import org.nongnu.libvob.impl.DefaultVobMatcher; |
|
16 |
import org.nongnu.libvob.vobs.*; |
import org.nongnu.libvob.vobs.*; |
17 |
|
|
18 |
import org.nongnu.alph.impl.*; |
import org.nongnu.alph.impl.*; |
25 |
import java.rmi.*; |
import java.rmi.*; |
26 |
import java.rmi.server.*; |
import java.rmi.server.*; |
27 |
|
|
|
import com.hp.hpl.mesa.rdf.jena.model.*; |
|
|
import com.hp.hpl.mesa.rdf.jena.mem.*; |
|
|
|
|
28 |
|
|
29 |
public class Pp implements BuoyLinkListener { |
public class Pp implements BuoyLinkListener { |
30 |
public static final String rcsid = "$Id$"; |
public static final String rcsid = "$Id$"; |
33 |
protected static void pa(String s) { System.out.println("Pp::"+s); } |
protected static void pa(String s) { System.out.println("Pp::"+s); } |
34 |
|
|
35 |
private static Pp pp; |
private static Pp pp; |
36 |
static public void main(String[] args) throws RemoteException, RDFException { |
static public void main(String[] args) throws RemoteException { |
37 |
pp = new Pp(); |
pp = new Pp(); |
38 |
} |
} |
39 |
|
|
40 |
private final GraphicsAPI api = GraphicsAPI.getInstance(); |
private final GraphicsAPI api = GraphicsAPI.getInstance(); |
41 |
private Frame frame; |
private Frame frame; |
42 |
|
private Fen fen; |
43 |
private PPActions ppAct; |
private PPActions ppAct; |
44 |
private BuoyAdaptor adaptor = new BuoyAdaptor(); |
private BuoyAdaptor adaptor = new BuoyAdaptor(); |
45 |
private BuoyViewMainNode focus; |
private BuoyViewMainNode focus; |
|
|
|
|
// old! |
|
|
private Space space; |
|
46 |
private NodeView nodeview; |
private NodeView nodeview; |
|
//private RDFNode accursed; |
|
|
|
|
|
|
|
|
// new |
|
|
private Fen fen; |
|
47 |
private Object accursed; |
private Object accursed; |
|
|
|
48 |
|
|
49 |
|
|
50 |
public Pp() throws RemoteException, RDFException { |
public Pp() throws RemoteException { |
51 |
fen = new Fen(); |
fen = new Fen(); |
52 |
|
fen.constgraph = new HashGraph(); |
53 |
|
fen.graph = new HashGraph(); |
54 |
|
//fen.enfiladeOverlap = new XXX |
55 |
|
fen.txt = new SimpleNodeContent(fen); |
56 |
|
|
|
/* |
|
|
space = new ModularSpace( |
|
|
new SimpleVStreamTexter( |
|
|
new FakeSpanMaker(), |
|
|
new Enfilade1DImpl.Enfilade1DImplMaker()), |
|
|
new ModelMem()); |
|
|
*/ |
|
57 |
ppAct = new PPActionsImpl(fen); |
ppAct = new PPActionsImpl(fen); |
58 |
|
|
59 |
String paper = ppAct.newPaper(); |
String paper = ppAct.newPaper(); |
140 |
Pair p = (Pair)obj; |
Pair p = (Pair)obj; |
141 |
if (p.first.equals(accursed)) { |
if (p.first.equals(accursed)) { |
142 |
focus = adaptor.createMainNode(null, p.second, pp); |
focus = adaptor.createMainNode(null, p.second, pp); |
143 |
accursed = (RDFNode)p.second; |
accursed = p.second; |
144 |
} |
} |
145 |
else { |
else { |
146 |
focus = adaptor.createMainNode(null, p.first, pp); |
focus = adaptor.createMainNode(null, p.first, pp); |
147 |
accursed = (RDFNode)p.first; |
accursed = p.first; |
148 |
} |
} |
149 |
AbstractUpdateManager.chg(); |
AbstractUpdateManager.chg(); |
150 |
return; |
return; |
177 |
public PPActions getPPActions() { return ppAct; } |
public PPActions getPPActions() { return ppAct; } |
178 |
public String getCurrentPaper() { |
public String getCurrentPaper() { |
179 |
Object paper = getAccursed(); |
Object paper = getAccursed(); |
180 |
/* |
|
181 |
if (ShortRDF.isNodeType(space.getModel(), getAccursed(), PP.noteType)) { |
if (RDFUtil.isNodeType(fen, getAccursed(), PP.Note)) { |
182 |
paper = ShortRDF.getSubj(space.getModel(), getAccursed(), PP.contains); |
paper = fen.constgraph.find1_X11(getAccursed(), PP.contains); |
183 |
} |
} |
184 |
*/ |
|
185 |
return paper.toString(); |
return paper.toString(); |
186 |
} |
} |
187 |
} |
} |