106 |
os.system('mkdir -p '+DIR) |
os.system('mkdir -p '+DIR) |
107 |
pool = storm.impl.DirPool(java.io.File(DIR), java.util.HashSet()) |
pool = storm.impl.DirPool(java.io.File(DIR), java.util.HashSet()) |
108 |
myalph = alph.impl.StormAlph(pool) |
myalph = alph.impl.StormAlph(pool) |
|
sc = myalph.addFile(java.io.File('../alph/testdata/test1.pdf'), 'application/pdf') |
|
|
enfMaker = alph.impl.Enfilade1DImpl.Enfilade1DImplMaker() |
|
109 |
|
|
110 |
|
|
111 |
# manual system to toggle the load point ;) |
# manual system to toggle the load point ;) |
136 |
fen.enfiladeOverlap = fen.txt.getTransclusionIndex() |
fen.enfiladeOverlap = fen.txt.getTransclusionIndex() |
137 |
fen.alph = myalph |
fen.alph = myalph |
138 |
|
|
139 |
ppAct = ff.modules.pp.PPActionsImpl(fen) |
ppActions = ff.modules.pp.PPActionsImpl(fen) |
140 |
treetime = ff.structure.TreeTime(ff.vocab.TREETIME.follows) |
treetime = ff.structure.TreeTime(ff.vocab.TREETIME.follows) |
141 |
ppAct.treeTime = treetime |
ppActions.treeTime = treetime |
142 |
|
|
143 |
# Now, before reading the xu stuff, render something |
# Now, before reading the xu stuff, render something |
144 |
# to try to prevent NV driver |
# to try to prevent NV driver |
152 |
|
|
153 |
paperA = "urn:urn-5:P7OMBN+yp3-m-AkulZN-NeaJV9Sl:_1" |
paperA = "urn:urn-5:P7OMBN+yp3-m-AkulZN-NeaJV9Sl:_1" |
154 |
paperHome = "urn:urn-5:COz-fSvNBZRieCdefRTKO2Mgcjmz:_1" |
paperHome = "urn:urn-5:COz-fSvNBZRieCdefRTKO2Mgcjmz:_1" |
|
if not do_load_graph: |
|
|
paperB = "urn:urn-5:P7OMBN+yp3-m-AkulZN-NeaJV9Sl:_2" |
|
|
paperC = "urn:urn-5:P7OMBN+yp3-m-AkulZN-NeaJV9Sl:_5" |
|
|
fen.graph.add(Nodes.get(paperHome), RDF.type, CANVAS2D.Canvas); |
|
|
fen.graph.add(Nodes.get(paperA), RDF.type, CANVAS2D.Canvas); |
|
|
fen.graph.add(Nodes.get(paperB), RDF.type, CANVAS2D.Canvas); |
|
|
fen.graph.add(Nodes.get(paperC), RDF.type, CANVAS2D.Canvas); |
|
|
treetime.addLatest(fen.graph, Nodes.get(paperHome)) |
|
|
treetime.addLatest(fen.graph, Nodes.get(sc.getID())) |
|
|
treetime.addLatest(fen.graph, Nodes.get(paperA)) |
|
|
treetime.addLatest(fen.graph, Nodes.get(paperB)) |
|
|
treetime.addLatest(fen.graph, Nodes.get(paperC)) |
|
|
|
|
|
noteA1 = Nodes.get(ppAct.newNote(paperA, -30,-30, 'This is a test!')) |
|
|
noteA2 = Nodes.get(ppAct.newNote(paperA, -60,-70, 'This is a test2!')) |
|
|
noteA3 = Nodes.get(ppAct.newNote(paperA, 100, 100, '')) |
|
|
noteA4 = Nodes.get(ppAct.newNote(paperA, -60,70, 'This is a very long test which is used to see if ')) |
|
|
|
|
|
fen.graph.add(noteA2, RDF.type, ff.vocab.lava.MINDSTRUCT.Data) |
|
|
|
|
|
ppAct.assocNotes(noteA1, 1, noteA2); |
|
|
|
|
|
span = sc.getCurrent().getPage(0).subArea(100, 100, 300, 200); |
|
|
fen.txt.set(noteA3, enfMaker.makeEnfilade(span)) |
|
|
|
|
|
|
|
|
noteB1 = Nodes.get(ppAct.newNote(paperB, 1000,500, 'This is an another test!')) |
|
155 |
|
|
156 |
ppAct.assocNotes(noteA1, 1, noteB1) |
if not do_load_graph: |
157 |
|
ff.fenpdf.demospace.createDemoSpace(fen, myalph, treetime, ppActions) |
|
noteHome = Nodes.get(ppAct.newNote(paperHome, 0, 0, 'HOME')) |
|
|
|
|
|
ppAct.assocNotes(noteHome, 1, noteA1) |
|
|
|
|
|
#sc2 = myalph.addFile(java.io.File('testdata/paper.pdf'), 'application/pdf') |
|
|
|
|
|
#noteH1 = Nodes.get(ppAct.newNote(paperHome, 200, 150, '')) |
|
|
noteH2 = Nodes.get(ppAct.newNote(paperHome, -400, 0, 'foobar')) |
|
|
noteB2 = Nodes.get(ppAct.newNote(paperB, 1200, 300, 'This is yet another test!')) |
|
|
ppAct.assocNotes(noteB2, 1, noteH2) |
|
|
|
|
|
#span = sc2.getCurrent().getPage(0).subArea(30, 150, 270, 200); |
|
|
#fen.txt.set(noteH1, enfMaker.makeEnfilade(span)) |
|
|
|
|
|
noteC1 = Nodes.get(ppAct.newNote(paperC, 0, 0, 'baz')) |
|
|
noteC2 = Nodes.get(ppAct.newNote(paperC, -200, 50, 'bar')) |
|
|
noteB3 = Nodes.get(ppAct.newNote(paperB, 1150, 600, 'foo')) |
|
|
noteA4 = Nodes.get(ppAct.newNote(paperA, -100, -200, 'Lorem ipsum dolor')) |
|
|
|
|
|
ppAct.assocNotes(noteC1, 1, noteB3) |
|
|
ppAct.assocNotes(noteA4, 1, noteC2) |
|
|
|
|
158 |
|
|
159 |
spanImageFactory = ff.spanimages.gl.DefaultSpanImageFactory( |
spanImageFactory = ff.spanimages.gl.DefaultSpanImageFactory( |
160 |
ff.spanimages.gl.PageScrollBlockImager()) |
ff.spanimages.gl.PageScrollBlockImager()) |
176 |
ff.view.buoy.NodeType2DFull.effigy = 0 |
ff.view.buoy.NodeType2DFull.effigy = 0 |
177 |
|
|
178 |
|
|
179 |
context = Context(w, fen, ppAct, nodeview, spanImageFactory) |
context = Context(w, fen, ppActions, nodeview, spanImageFactory) |
180 |
nodeview.setContext(context) |
nodeview.setContext(context) |
181 |
textnodeview.setContext(context) |
textnodeview.setContext(context) |
182 |
|
|