[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fenfire-dev] darcs patch: made fenfire read turtle rdf data from /tmp/f
From: |
Tuukka Hastrup |
Subject: |
[Fenfire-dev] darcs patch: made fenfire read turtle rdf data from /tmp/ff.pipe |
Date: |
Sat, 12 Mar 2005 00:57:02 +0200 |
Sat Mar 12 00:50:42 EET 2005 Tuukka Hastrup <address@hidden>
* made fenfire read turtle rdf data from /tmp/ff.pipe
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
New patches:
[made fenfire read turtle rdf data from /tmp/ff.pipe
Tuukka Hastrup <address@hidden>**20050311225042] {
hunk ./org/fenfire/fentwine/Fenfire.java 265
+ readPipeThread(quadsGraph, "file:///tmp/ff.pipe", nmap, windowAnim);
+
hunk ./org/fenfire/fentwine/Fenfire.java 407
+ private static void readPipeThread(final QuadsGraph quadsGraph,
+ final String uri,
+ final NamespaceMap nmap,
+ final WindowAnimation windowAnim) {
+ if(!uri.startsWith("file://")) return;
+
+ new Thread() { public void run() {
+ readPipe(quadsGraph, uri, nmap, windowAnim);
+ }}.start();
+ }
+
+ private static void readPipe(QuadsGraph quadsGraph, String uri,
+ NamespaceMap nmap,
+ WindowAnimation winAnim) {
+ if(!uri.startsWith("file://")) return;
+
+ try {
+ int i = 0;
+ while (true) {
+ i++;
+ BufferedReader pipe = new BufferedReader(new FileReader(new
File(new java.net.URI(uri))));
+
+ Graph graph = new HashGraph();
+ Map namespaces = new HashMap();
+ try {
+ Graphs.readTurtle(pipe, uri, graph, namespaces);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ Graph _graph = new OneQuadGraph(quadsGraph, uri/*+'/'+i*/);
+ add(graph, _graph, namespaces, nmap, winAnim);
+
+ /* while (true) {
+ String line = pipe.readLine();
+ if (line == null)
+ break;
+ System.out.println(line);
+ }*/
+ }
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+
}
Context:
[make compile for tuukkah =) (mv old-node-text-function.java *.txt)
Benja Fallenstein <address@hidden>**20050310211038]
[add javolution to classpath
Benja Fallenstein <address@hidden>**20050308222913]
[Add simple image view.
Matti J. Katila <address@hidden>**20050302085511]
[If the mainview puts a cs with key "buoy circle", use that instead of making
our own; mainviews should be able to decide what the circle should be.
Benja Fallenstein <address@hidden>**20050302022110]
[don't show buoys around buoys for now -- it's too confusing. (it's an option
now that can easily be switched back on)
Benja Fallenstein <address@hidden>**20050302010724]
[Change how spatial mainviews work: the lob they return is rendered full-screen.
Benja Fallenstein <address@hidden>**20050301230302
Before, the lob returned by SpatialView.getMainviewLob() was supposed
to cover only part of the screen. Now, it will be rendered full-screen;
it can be an AlignLob wrapped around some other lob to render that
in the center of the screen.
The canvas view now makes the canvas full-screen,
which is an interesting effect and may help understanding
how the canvas is infinitely large...
]
[potions commands: Alt-G for goto, Alt-H for the "home cell" (currently
arbitrarily picked at startup when loading a file). Alt-G Alt-H thus goes
home...
Benja Fallenstein <address@hidden>**20050301200401]
[handle situation more gracefully where the spatial view didn't place the
focused node in the vobscene
Benja Fallenstein <address@hidden>**20050301173413
(instead of throwing an error, add a cs in the center
of what the spatial view rendered, and add it into the vobmatcher
as representing the focused node)
]
[fix StructureView.mouse(): substract rendered size/2 from originalX/Y as well
as from x/y
Benja Fallenstein <address@hidden>**20050301173239]
[twids
Benja Fallenstein <address@hidden>**20050301031343]
[Demo file with two example starting points for exploring the Semantic Web
Benja Fallenstein <address@hidden>**20050227172524
Load with 'make run FILE=demo.turtle'; go to Danny's FOAF or CaptSolo's blog
and press Ctrl-G to load data from the Web. Danny's FOAF has links to
other things -- try going to some person linked from Danny (foaf:knows)
and hit Ctrl-G again to get more info.
]
[make data loading use proper thread communication, and make it put namespaces
into the NamespaceMap
Benja Fallenstein <address@hidden>**20050227163317
(these changes are overlapping, so it's too much trouble to separate them
into different records)
Threading: Loading data happens on a separate thread; we mustn't modify
the graph from there, as we have to synchronization. This patch makes
the graph adding be done on a Libvob background task: after the graph
has been loaded from the Web, a bg task is scheduled to add it
to the QuadsGraph. Bg tasks run on the main thread.
NamespaceMap: Data loaded from the Web contains namespace information;
use it.
]
[register Cursor as a SmushListener; twids
Benja Fallenstein <address@hidden>**20050227162039
- register Cursor as a SmushListener with SmushedQuadsGraph
- add rss:title as a text property
- initialize noShowProperties to the set of text properties
(i.e., by default show all properties minus all text properties)
nb. a text property is a property that is used to show
the content of a node, i.e.
_:foo rdf:label "Hi there".
makes _:foo shown as a node containing the string "Hi there",
because rdf:label is a text property.
]
[Change shortcuts list -- text cursor can move up/down
Benja Fallenstein <address@hidden>**20050226170817
- "Alt-Left/Right: move text cursor",
+ "Alt-Cursor keys: move text cursor",
]
[make sure in StructureView that text layout is done
Benja Fallenstein <address@hidden>**20050226151114]
[When the rotation specified in Cursor doesn't exist, assume 0
Benja Fallenstein <address@hidden>**20050226145058]
[Render only a limited number of "rings" around the focus.
Benja Fallenstein <address@hidden>**20050226061820
Each RDF connection traversed increases "ring" by one.
Each connection traversed also increases "depth" by one.
Before, the only thing that would make the view stop
rendering more connections in one part of the tree was that
"depth" increased to a value greater than "maxdepth;" however,
maxdepth is currently 8 and not likely not get lower, and
rendering 8 rings isn't very useful and can take a lot of time,
depending on the structure (especially when there are loops).
So, now we have a maxring, too -- it's set to 4 by default.
That's enough that I do not notice a difference, except in speed ;-)
]
[Load more than one file if more than one is specified on the command line;
save only to the first one.
Benja Fallenstein <address@hidden>**20050226061752]
[Load data from the Web as well as from Gnowsis.
Benja Fallenstein <address@hidden>**20050226061716]
[make Fenfire load RDF/XML when called like 'make run FILE='--xml foaf.rdf'
Benja Fallenstein <address@hidden>**20050226034248]
[Back to old Loom/Fentwine color scheme. Nice, I feel at home ;-)
Benja Fallenstein <address@hidden>**20050226031523]
[The old Fentwine implementation isn't needed any more -- good riddance
Benja Fallenstein <address@hidden>**20050226022100
The new Fenfire implementation now has basically all the features
that the old impl had at this point, so there's no point any longer
in keeping the old impl around.
The makefile targets for running the new impl have changed accordingly:
- 'make run' runs normal Fenfire (used to be 'make run_new')
- 'make run_demo' runs Fenfire with a simple demo graph
(used to be 'make run_new_demo')
You can pass in a Turtle file name using 'make run FILE=foo.turtle'.
It doesn't have to exist; you'll get an empty graph in that case, but
Ctrl-S will save the graph to that location.
Since some of the files may still contain some minor features
that the new impl doesn't have yet, I've renamed the following files:
- FentwineNotebook.java
- NodeImageFunction.java
- NodeTextFunction.java
- VanishingWheelView.java
- util/Bench.java
to old-fentwine-notebook.txt, old-node-image-function.txt etc.
I deleted the following files:
- Cursor.java
- Fentwine.java
- FentwineCursor.java
- FentwineLob.java
- NodeContentFunction.java
- View.java
]
[Allow the user to move on / edit literals.
Benja Fallenstein <address@hidden>**20050226020835
Unlike the previous Fentwine implementation, don't treat literals
too specially. The old implementation used a special kind of NeighbourWheel
only for literals; the new implementation treats literals essentially
like other nodes, and handles only text editing specially.
The challenge with literals is that:
- In the RDF model, the literal "55" is a node different from
the literal "5", and there is exactly one literal "55" and one literal "5"
(a canvas:x "55"; b canvas:y "55" means that a and b are connected
to the same literal.
- But in Fentwine, we want to *pretend* that literals are nodes that
the user can move on and edit; i.e., the user moves on the literal "55",
hits backspace, and "changes" it to the literal "5". (In "reality,"
this removes one triple and adds another one, with a different literal
as the object, but the user shouldn't see this.)
- Also, in Fentwine, we want to pretend that the "55"s in
(a canvas:x "55") and (b canvas:y "55") are *different* nodes,
one connected only to 'a' and one connected only to 'b' -- and "changing" one
does not change the other.
The current scheme is that the text model that SimpleContentView uses
for literals has magic that changes the cursor and rotation
when the text is edited. Otherwise, we use the same code as for other nodes,
which means that all the connections of the literal are shown -- so we don't
get the third point above, but I guess that's not so important
and the new system actually reflects the RDF structure better, so
maybe it's nice. (If it turns out to be annoying, it actually shouldn't be
that hard to tweak the behavior so that no additional connections
of the literal are shown.)
This patch also fixes Fenfire.URIModel, which is used by the location bar
to get the URI of the focused node, not to barf (barf = throw exception)
when the focused node is a literal (it used Nodes.toString(node) before,
which checks for node-ness, now simply uses node.toString()...).
]
[Add button to show/hide shortcuts list; update the list.
Benja Fallenstein <address@hidden>**20050226004942
Fentwine/Fenfire has a list of shortcut keys at the bottom left.
This patch adds a button to show/hide the list (it's on by default)
and updates the list to use the new potion bindings. (Unfortunately
it's hard to explain the concept in that little space :-/)
Here is the new list:
Cursor keys: move
Alt-Left/Right: move text cursor
Alt-C: connect on [prop] to [node]
Alt-B: connect backwards on [prop] to [node]
Alt-T: this node
Alt-L: linkedTo
Alt-N: a new node
Ctrl-B, cursor key: break connection
Ctrl-G: load CBD from Gnowsis
Ctrl-O: open item in Gnowsis
Ctrl-S: save graph
(The Ctrl-B command doesn't have a potion version yet.)
For example, if you're on node FOO and you hit Alt-C,
the bottom of the screen will say,
Connect FOO on [which property?] to [which node?]
Now if you hit Alt-L it will say,
Connect FOO on linkedTo to [which node?]
Now you go to BAR and press Alt-T and you'll have executed the command
Connect FOO on linkedTo to BAR
(You don't actually see that command at the moment, it's just performed
and that's it.)
There's actually a shortcut; you don't need Alt-C, if you hit
Alt-L when there's no command being built at the bottom of the screen,
the Alt-C is implicit. But I didn't find a good way to mention this
without using up too much space in the box...
]
[Show a property selection listbox on the left side of the window.
Benja Fallenstein <address@hidden>**20050225224544
Uses NodeTextModel to get the human-readable names of the properties.
Next to each property is a checkbox used to show/hide connections
of that property.
]
[Radically simplify cursor architecture.
Benja Fallenstein <address@hidden>**20050225202953
After actually trying out the scheme proposed on ff-dev, it didn't look
that great any more. ;-) Tried it out, made the code using it more complex
rather than simpler. So in the new code, Cursor is simply an object
holding a focused node model, spatial cursor model, text cursor model,
and Map of Rotation objects, and a couple of convenience functions
that change the cursor position in the usual patterns.
The interpolation problem that moving to the new structure solved
is back open, but we worked out a simple scheme on IRC to solve this
that I'll implement next.
(No semantic changes in the private archive, just changing calls to use
the new interface instead of the old one.)
]
[Make it so that all properties in the graph are shown, except for a set of
explicitly excluded ones.
Benja Fallenstein <address@hidden>**20050225185117
Before, we created a set of all properties in the graph at startup time
and removed those we didn't want to show by default (currently, all
literal-valued properties, because FF is buggy and can't show literals
at the moment ;-)).
Now, we're using SetModel.Difference(AllPropertiesSetModel(), noShowProps),
where noShowProps is a SetModel of properties we don't want to show.
The idea is that when the user adds a connection with a new property
to the graph, by default the connection should be shown. Connections
with a given property should only be hidden when explicitly specified.
That's 'erring on the side of caution,' so to speak -- showing too much
is better than not showing something the user expects to see.
We don't yet have controls for changing the set of properties shown, but
when we do, what they should change is noShowProps.
]
[make possible to show properties other than linkedTo
Benja Fallenstein <address@hidden>**20050225172201]
[make text editing work
Benja Fallenstein <address@hidden>**20050225172113]
[better content view
Benja Fallenstein <address@hidden>**20050224022730]
[generalize ViewSettings to be used for both spatial and content views
Benja Fallenstein <address@hidden>**20050224005337]
[always connect starting from the current node
Benja Fallenstein <address@hidden>**20050223204937]
[start using potions for keybindings (as an alternative -- using Alt ;-) -- for
now)
Benja Fallenstein <address@hidden>**20050223192157]
[remove a little crud (well, actually this is a test commit to see whether the
commit messages look right now ;-))
Benja Fallenstein <address@hidden>**20050223145001]
[add a 'location bar' which shows the URI of the focused node (editable)
Benja Fallenstein <address@hidden>**20050223001451]
[new cursor system, essentially as discussed on ff-dev
Benja Fallenstein <address@hidden>**20050222220835]
[Add calendar spatial view to the demo
Matti J. Katila <address@hidden>**20050222213951]
[change getLob() to getMainviewLob() and getBuoyLob() as proposed on list
(though the proposed names were getMainLob() and getNodeLob()...)
Benja Fallenstein <address@hidden>**20050222192620]
[Do the translation to the center in StructureView.render() rather than
wrapping a TranslationLob around it.
Benja Fallenstein <address@hidden>**20050221233521
There are a number of reasons why the TranslationLob approach doesn't work.
- When the window is re-sized, the TranslationLob isn't updated, so the view
isn't changed properly.
- Mudyc forgot to put the TranslationLob in Fenfire.java too, making
make run_new unusable :-)
- Most importantly, it makes StructureView violate the contract
of the Lob interface; Lob.render() is supposed to render into the box
((0,0), (w,h)), not the box ((-w/2,-h/2), (w/2,h/2)).
]
[pass models to viewSetting.getLob, rather than Cursor objects
Benja Fallenstein <address@hidden>**20050221224040]
[actually use WindowAnimation in CanvasSpatialView
Benja Fallenstein <address@hidden>**20050221223635]
[cache last mainview lob, use that for mouse events
Benja Fallenstein <address@hidden>**20050221142624]
[cache NeighbourWheels again to make faster
Benja Fallenstein <address@hidden>**20050221112312]
[add mouse events for focus view
Matti J. Katila <address@hidden>**20050219150932]
[fix: render property name lob and its bg above the corresponding connection
Benja Fallenstein <address@hidden>**20050216192501]
[Use view settings to determine whether to show mainview big"
Benja Fallenstein <address@hidden>**20050216183208]
[some view tuning
Benja Fallenstein <address@hidden>**20050216175547]
[fixes
Benja Fallenstein <address@hidden>**20050216153246]
[copy Fentwine.java to Fenfire.java and make it use the new view architecture
Benja Fallenstein <address@hidden>**20050216153223]
[show buoys to non-focused nodes on canvas (needs some visual tuning, currently
looks too much like buoys of focused node); steps towards showing properties on
links (currently only the same hardcoded property name everywhere...)
Benja Fallenstein <address@hidden>**20050216150448]
[animate better
Benja Fallenstein <address@hidden>**20050216150256]
[adjust to new scaling behavior of 'between' cses
Benja Fallenstein <address@hidden>**20050215174523]
[basic structure editing
Benja Fallenstein <address@hidden>**20050215170515]
[Make creation of new nodes work, animating them from an empty rectangle at the
center of the scene
Benja Fallenstein <address@hidden>**20050215165239]
[fix connections' depth
Benja Fallenstein <address@hidden>**20050215153455]
[make backwards connections much smaller (like in old fentwine)
Benja Fallenstein <address@hidden>**20050215110858]
[key for changing spatial view (Ctrl-V); twids
Benja Fallenstein <address@hidden>**20050214095146]
[start work on canvas view as a spatial context view
Benja Fallenstein <address@hidden>**20050213131018]
[cache the SimpleCursor objects created per node while creating the view
Benja Fallenstein <address@hidden>**20050213121331]
[cache the NeighbourWheel objects used by StructureView while rendering
Benja Fallenstein <address@hidden>**20050211140112]
[moving through the structure with cursor keys, fixes to StructureView
Benja Fallenstein <address@hidden>**20050211130216]
[fixes to StructureView; add color fading; render both poswards and negwards;
start implementation of key input for StructureView (nothing working yet)
Benja Fallenstein <address@hidden>**20050210120518]
[make the new StructureView recursive -- something's buggy, mudyc is going to
check it out ;-)
Benja Fallenstein <address@hidden>**20050209183730]
[start structureview in new view architecture (replaces old fentwine view and
buoymanager architecture)
Benja Fallenstein <address@hidden>**20050209181835]
[Move FentwineVobMatcher to Fenfire, rename to ConnectionVobMatcher
Benja Fallenstein <address@hidden>**20050209181630]
[use AWT fog (color fading) framework in vanishingview
Benja Fallenstein <address@hidden>**20050209024423]
[Use new cursor model to store all Fentwine view state
Benja Fallenstein <address@hidden>**20050208232335]
[Use the between() cs for showing the property name (to interpolate correctly
to non-Fentwine views); fixes
Benja Fallenstein <address@hidden>**20050208120102]
[partial interpolation fixes
Benja Fallenstein <address@hidden>**20050207090429]
[a really horrible multiview version of Fenfiction+Fentwine, horrible because
there's no animation between the two (need to harmonize matching trees)
Benja Fallenstein <address@hidden>**20050204002535]
[Fix long-standing interpolation bug
Benja Fallenstein <address@hidden>**20050204001727]
[really bad fix for lines in FentwineNotebook
Benja Fallenstein <address@hidden>**20050125084416]
[Make the node content function return lobs instead of placeables.
Benja Fallenstein <address@hidden>**20050123141549
This breaks images and text scrolling for now, but is the right step forward.
]
[update xom
Benja Fallenstein <address@hidden>**20041204235206]
[add depends used by fenfire now
Benja Fallenstein <address@hidden>**20041201092850]
[use quads in fentwine to tell local data apart from data loaded from gnowsis
Benja Fallenstein <address@hidden>**20041128020820]
[use font from Theme
Benja Fallenstein <address@hidden>**20041127150104]
[make FentwineLobMatcher support the new interpolation system
Benja Fallenstein <address@hidden>**20041127023611]
[no more orthocoorder
Benja Fallenstein <address@hidden>**20041126163955]
[adjust to libvob changes: (float x, float y) parameters removed from
Lob.render()
Benja Fallenstein <address@hidden>**20041126022309]
[Replace Loom* in files with Fentwine*
Benja Fallenstein <address@hidden>**20041125231024]
[rename Loom* files to Fentwine*
Benja Fallenstein <address@hidden>**20041125230402]
[also do renames in makefile
Benja Fallenstein <address@hidden>**20041125224937]
[move fentwine to org.fenfire.fentwine package
Benja Fallenstein <address@hidden>**20041125224323]
[Make compile
Benja Fallenstein <address@hidden>**20041125173238
============
(I'd removed LoomShower earlier -- need to make new interface
for PropListDecorator to implement, or rewrite and remove it)
]
[Initial commit (address@hidden/loom--darcs-import--0.1)
**20041125164924]
Patch bundle hash:
f68c7615b7fdfb3c66426c5ae8f32f6997609c15
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFCMiI3WkfGqVL3U04RAo6PAJ0W1iymcbgA6Rx7YR0W6Wr9G881ZACcDp/+
L28ICWHsdjjIrviOF+b8Mt8=
=VsRP
-----END PGP SIGNATURE-----
- [Fenfire-dev] darcs patch: made fenfire read turtle rdf data from /tmp/ff.pipe,
Tuukka Hastrup <=