graphl-cvs Mailing List for Graphl - Hybrid graph visualization tool (Page 4)
Status: Pre-Alpha
Brought to you by:
flo1
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(48) |
Sep
(6) |
Oct
(64) |
Nov
(12) |
Dec
(13) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(10) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(34) |
Sep
(31) |
Oct
|
Nov
|
Dec
(25) |
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(43) |
Jul
(16) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Flo L. <fl...@us...> - 2005-12-18 11:11:52
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/filter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2618/src/org/mediavirus/graphl/graph/filter Modified Files: FilteredGraph.java SourceFilter.java Log Message: - FEATURE: RXPath landed! you can assign properties of facets through XPath-like expressions based on the currently rendered node - CODE: Remove LabelGenerator classes - this can now done with RXPath - CODE: migrated to JDK 1.5, added class specifiers for all collections (generics) - CODE: added a singleton GraphlRegistry, currently only holding the vocabularyRegistry instance Index: SourceFilter.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/filter/SourceFilter.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SourceFilter.java 5 Sep 2005 15:43:13 -0000 1.2 --- SourceFilter.java 18 Dec 2005 11:11:41 -0000 1.3 *************** *** 20,24 **** public class SourceFilter implements GraphFilter { ! protected List sources = new LinkedList(); protected boolean rejectSources = true; --- 20,24 ---- public class SourceFilter implements GraphFilter { ! protected List<String> sources = new LinkedList<String>(); protected boolean rejectSources = true; *************** *** 105,109 **** } ! public Collection getSources() { return sources; } --- 105,109 ---- } ! public Collection<String> getSources() { return sources; } Index: FilteredGraph.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/filter/FilteredGraph.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FilteredGraph.java 7 Sep 2005 12:29:55 -0000 1.4 --- FilteredGraph.java 18 Dec 2005 11:11:41 -0000 1.5 *************** *** 22,29 **** public class FilteredGraph extends AbstractGraph implements GraphListener{ ! List cachedNodes = new ArrayList(); ! List cachedEdges = new ArrayList(); ! List filters = new LinkedList(); Graph sourceGraph; --- 22,29 ---- public class FilteredGraph extends AbstractGraph implements GraphListener{ ! List<Node> cachedNodes = new ArrayList<Node>(); ! List<Edge> cachedEdges = new ArrayList<Edge>(); ! List<GraphFilter> filters = new LinkedList<GraphFilter>(); Graph sourceGraph; *************** *** 83,90 **** cachedNodes.clear(); ! Collection filteredEdges = filterEdges(sourceGraph.getEdges()); if (filteredEdges != null) cachedEdges.addAll(filteredEdges); ! Collection filteredNodes = filterNodes(sourceGraph.getNodes()); if (filteredNodes != null) cachedNodes.addAll(filteredNodes); --- 83,90 ---- cachedNodes.clear(); ! Collection<Edge> filteredEdges = filterEdges(sourceGraph.getEdges()); if (filteredEdges != null) cachedEdges.addAll(filteredEdges); ! Collection<Node> filteredNodes = filterNodes(sourceGraph.getNodes()); if (filteredNodes != null) cachedNodes.addAll(filteredNodes); *************** *** 95,109 **** * @see org.mediavirus.graphl.graph.GraphListener#elementsAdded(org.mediavirus.graphl.graph.Graph, java.util.Collection, java.util.Collection) */ ! public void elementsAdded(Graph graph, Collection nodes, Collection edges) { ! Collection filteredNodes = filterNodes(nodes); ! Collection filteredEdges = filterEdges(edges); if (filteredEdges != null) { cachedEdges.addAll(filteredEdges); ! if (filteredNodes == null) filteredNodes = new ArrayList(); ! for (Iterator edgesI = filteredEdges.iterator(); edgesI.hasNext();) { ! Edge edge = (Edge) edgesI.next(); if (! filteredNodes.contains(edge.getFrom())) filteredNodes.add(edge.getFrom()); if (! filteredNodes.contains(edge.getTo())) filteredNodes.add(edge.getTo()); --- 95,109 ---- * @see org.mediavirus.graphl.graph.GraphListener#elementsAdded(org.mediavirus.graphl.graph.Graph, java.util.Collection, java.util.Collection) */ ! public void elementsAdded(Graph graph, Collection<Node> nodes, Collection<Edge> edges) { ! Collection<Node> filteredNodes = filterNodes(nodes); ! Collection<Edge> filteredEdges = filterEdges(edges); if (filteredEdges != null) { cachedEdges.addAll(filteredEdges); ! if (filteredNodes == null) filteredNodes = new ArrayList<Node>(); ! for (Iterator<Edge> edgesI = filteredEdges.iterator(); edgesI.hasNext();) { ! Edge edge = edgesI.next(); if (! filteredNodes.contains(edge.getFrom())) filteredNodes.add(edge.getFrom()); if (! filteredNodes.contains(edge.getTo())) filteredNodes.add(edge.getTo()); *************** *** 119,127 **** * @param edges */ ! private Collection filterEdges(Collection edges) { if (edges != null) { ! List filteredEdges = new ArrayList(); ! for (Iterator edgesI = edges.iterator(); edgesI.hasNext();) { ! Edge edge = (Edge) edgesI.next(); if (filterEdge(edge, sourceGraph)) filteredEdges.add(edge); } --- 119,127 ---- * @param edges */ ! private Collection<Edge> filterEdges(Collection<Edge> edges) { if (edges != null) { ! List<Edge> filteredEdges = new ArrayList<Edge>(); ! for (Iterator<Edge> edgesI = edges.iterator(); edgesI.hasNext();) { ! Edge edge = edgesI.next(); if (filterEdge(edge, sourceGraph)) filteredEdges.add(edge); } *************** *** 136,144 **** * @param nodes */ ! private Collection filterNodes(Collection nodes) { if (nodes != null) { ! List filteredNodes = new ArrayList(); ! for (Iterator nodesI = nodes.iterator(); nodesI.hasNext();) { ! Node node = (Node) nodesI.next(); if (filterNode(node, sourceGraph)) filteredNodes.add(node); } --- 136,144 ---- * @param nodes */ ! private Collection<Node> filterNodes(Collection<Node> nodes) { if (nodes != null) { ! List<Node> filteredNodes = new ArrayList<Node>(); ! for (Iterator<Node> nodesI = nodes.iterator(); nodesI.hasNext();) { ! Node node = nodesI.next(); if (filterNode(node, sourceGraph)) filteredNodes.add(node); } *************** *** 181,190 **** * @see org.mediavirus.graphl.graph.GraphListener#elementsRemoved(org.mediavirus.graphl.graph.Graph, java.util.Collection, java.util.Collection) */ ! public void elementsRemoved(Graph graph, Collection nodes, Collection edges) { ! List removedNodes = null; ! List removedEdges = null; if (nodes != null) { ! removedNodes = new ArrayList(); for (Iterator nodesI = nodes.iterator(); nodesI.hasNext();) { Node node = (Node) nodesI.next(); --- 181,190 ---- * @see org.mediavirus.graphl.graph.GraphListener#elementsRemoved(org.mediavirus.graphl.graph.Graph, java.util.Collection, java.util.Collection) */ ! public void elementsRemoved(Graph graph, Collection<Node> nodes, Collection<Edge> edges) { ! List<Node> removedNodes = null; ! List<Edge> removedEdges = null; if (nodes != null) { ! removedNodes = new ArrayList<Node>(); for (Iterator nodesI = nodes.iterator(); nodesI.hasNext();) { Node node = (Node) nodesI.next(); *************** *** 196,200 **** } if (edges != null) { ! removedEdges = new ArrayList(); for (Iterator edgesI = edges.iterator(); edgesI.hasNext();) { Edge edge = (Edge) edgesI.next(); --- 196,200 ---- } if (edges != null) { ! removedEdges = new ArrayList<Edge>(); for (Iterator edgesI = edges.iterator(); edgesI.hasNext();) { Edge edge = (Edge) edgesI.next(); *************** *** 212,216 **** * @see org.mediavirus.graphl.graph.Graph#getNodes() */ ! public List getNodes() { return cachedNodes; } --- 212,216 ---- * @see org.mediavirus.graphl.graph.Graph#getNodes() */ ! public List<Node> getNodes() { return cachedNodes; } *************** *** 219,223 **** * @see org.mediavirus.graphl.graph.Graph#getEdges() */ ! public List getEdges() { return cachedEdges; } --- 219,223 ---- * @see org.mediavirus.graphl.graph.Graph#getEdges() */ ! public List<Edge> getEdges() { return cachedEdges; } *************** *** 244,248 **** } ! public void addElements(Collection nodes, Collection edges) { sourceGraph.addElements(nodes, edges); } --- 244,248 ---- } ! public void addElements(Collection<Node> nodes, Collection<Edge> edges) { sourceGraph.addElements(nodes, edges); } |
From: Flo L. <fl...@us...> - 2005-12-18 11:11:52
|
Update of /cvsroot/graphl/graphl/graphs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2618/graphs Modified Files: test.rdf Log Message: - FEATURE: RXPath landed! you can assign properties of facets through XPath-like expressions based on the currently rendered node - CODE: Remove LabelGenerator classes - this can now done with RXPath - CODE: migrated to JDK 1.5, added class specifiers for all collections (generics) - CODE: added a singleton GraphlRegistry, currently only holding the vocabularyRegistry instance Index: test.rdf =================================================================== RCS file: /cvsroot/graphl/graphl/graphs/test.rdf,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** test.rdf 7 Sep 2005 12:16:30 -0000 1.7 --- test.rdf 18 Dec 2005 11:11:41 -0000 1.8 *************** *** 43,62 **** <foaf:knows rdf:resource="#genid3"/> </foaf:Person> - <foaf:Person rdf:ID="genid4" - foaf:name="Flo"/> - <foaf:Person rdf:ID="genid5" - foaf:name="Flo Ledermann"/> - <foaf:Person rdf:ID="genid6" - foaf:name="foo"> - <foaf:knows rdf:resource="#genid7"/> - </foaf:Person> <foaf:Person rdf:ID="genid7" foaf:name="bar"/> - <foaf:Person rdf:ID="genid3" - foaf:name="Fooooo"/> <foaf:Person rdf:ID="genid112" foaf:name="baz"> ! <foaf:knows rdf:resource="#genid7"/> </foaf:Person> </rdf:RDF> --- 43,53 ---- <foaf:knows rdf:resource="#genid3"/> </foaf:Person> <foaf:Person rdf:ID="genid7" foaf:name="bar"/> <foaf:Person rdf:ID="genid112" foaf:name="baz"> ! <foaf:knows rdf:resource="#genid7" rdf:ID="test"/> </foaf:Person> + <rdf:Description rdf:about="#test" foo:since="1"/> </rdf:RDF> |
From: Flo L. <fl...@us...> - 2005-12-18 11:11:51
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2618/src/org/mediavirus/graphl/view Modified Files: SimpleFacetRegistry.java AbstractFacet.java Removed Files: LabelGeneratorController.java LabelGenerator.java Log Message: - FEATURE: RXPath landed! you can assign properties of facets through XPath-like expressions based on the currently rendered node - CODE: Remove LabelGenerator classes - this can now done with RXPath - CODE: migrated to JDK 1.5, added class specifiers for all collections (generics) - CODE: added a singleton GraphlRegistry, currently only holding the vocabularyRegistry instance Index: SimpleFacetRegistry.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/view/SimpleFacetRegistry.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SimpleFacetRegistry.java 30 Nov 2004 09:38:33 -0000 1.7 --- SimpleFacetRegistry.java 18 Dec 2005 11:11:40 -0000 1.8 *************** *** 26,38 **** private NodeLayouter defaultNodeLayouter; ! Hashtable nodePaintersForType = new Hashtable(); ! Hashtable edgePaintersForType = new Hashtable(); ! Hashtable edgeLayoutersForType = new Hashtable(); ! Hashtable nodeLayoutersForType = new Hashtable(); ! Vector registeredEdgePainters = new Vector(); ! Vector registeredNodePainters = new Vector(); ! Vector registeredEdgeLayouters = new Vector(); ! Vector registeredNodeLayouters = new Vector(); public SimpleFacetRegistry() { --- 26,38 ---- private NodeLayouter defaultNodeLayouter; ! Hashtable<String, NodePainter> nodePaintersForType = new Hashtable<String, NodePainter>(); ! Hashtable<String, EdgePainter> edgePaintersForType = new Hashtable<String, EdgePainter>(); ! Hashtable<String, EdgeLayouter> edgeLayoutersForType = new Hashtable<String, EdgeLayouter>(); ! Hashtable<String, NodeLayouter> nodeLayoutersForType = new Hashtable<String, NodeLayouter>(); ! Vector<EdgePainter> registeredEdgePainters = new Vector<EdgePainter>(); ! Vector<NodePainter> registeredNodePainters = new Vector<NodePainter>(); ! Vector<EdgeLayouter> registeredEdgeLayouters = new Vector<EdgeLayouter>(); ! Vector<NodeLayouter> registeredNodeLayouters = new Vector<NodeLayouter>(); public SimpleFacetRegistry() { --- LabelGeneratorController.java DELETED --- Index: AbstractFacet.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/view/AbstractFacet.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AbstractFacet.java 5 Sep 2005 15:48:58 -0000 1.7 --- AbstractFacet.java 18 Dec 2005 11:11:40 -0000 1.8 *************** *** 32,36 **** public abstract class AbstractFacet implements Facet { ! protected List assignedElements = new ArrayList(); /* --- 32,36 ---- public abstract class AbstractFacet implements Facet { ! protected List<GraphElement> assignedElements = new ArrayList<GraphElement>(); /* *************** *** 40,44 **** // need to return copy, becuase elements might be unassigned by caller // this triggers a ConcurrentModificationException if original set is returned ! return new ArrayList(assignedElements); } --- 40,44 ---- // need to return copy, becuase elements might be unassigned by caller // this triggers a ConcurrentModificationException if original set is returned ! return new ArrayList<GraphElement>(assignedElements); } --- LabelGenerator.java DELETED --- |
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/jxpath In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2618/src/org/mediavirus/graphl/jxpath Added Files: GraphAttributePointer.java GraphNodeIterator.java GraphNodePointer.java GraphEdgePointer.java GraphEdgeIterator.java GraphPointerFactory.java GraphAttributeIterator.java Log Message: - FEATURE: RXPath landed! you can assign properties of facets through XPath-like expressions based on the currently rendered node - CODE: Remove LabelGenerator classes - this can now done with RXPath - CODE: migrated to JDK 1.5, added class specifiers for all collections (generics) - CODE: added a singleton GraphlRegistry, currently only holding the vocabularyRegistry instance --- NEW FILE: GraphAttributePointer.java --- /* * Created on 16.12.2005 */ package org.mediavirus.graphl.jxpath; import org.apache.commons.jxpath.ri.QName; import org.apache.commons.jxpath.ri.model.NodePointer; public class GraphAttributePointer extends NodePointer { String value; QName name; public GraphAttributePointer(NodePointer parent, QName name, String value) { super(parent); this.name = name; this.value = value; } public QName getName() { return name; } public Object getValue() { return value; } public Object getBaseValue() { return value; } public boolean isCollection() { return false; } public int getLength() { return 1; } public Object getImmediateNode() { return value; } public boolean isActual() { return true; } public boolean isLeaf() { return true; } /** * Sets the value of this attribute. */ public void setValue(Object value) { // TODO ? } public void remove() { // TODO ? } /** */ public String asPath() { StringBuffer buffer = new StringBuffer(); if (parent != null) { buffer.append(parent.asPath()); if (buffer.length() == 0 || buffer.charAt(buffer.length() - 1) != '/') { buffer.append('/'); } } buffer.append('@'); buffer.append(getName()); return buffer.toString(); } public int hashCode() { return System.identityHashCode(value); } public boolean equals(Object object) { if (object == this) { return true; } if (!(object instanceof String)) { return false; } return object.equals(value); } public int compareChildNodePointers( NodePointer pointer1, NodePointer pointer2) { // Won't happen - attributes don't have children return 0; } } --- NEW FILE: GraphEdgeIterator.java --- /* * Created on 15.12.2005 */ package org.mediavirus.graphl.jxpath; import org.apache.commons.jxpath.ri.QName; import org.apache.commons.jxpath.ri.compiler.NodeNameTest; import org.apache.commons.jxpath.ri.compiler.NodeTest; import org.apache.commons.jxpath.ri.model.NodeIterator; import org.apache.commons.jxpath.ri.model.NodePointer; import org.mediavirus.graphl.graph.Edge; import org.mediavirus.graphl.graph.Node; public class GraphEdgeIterator implements NodeIterator { private NodePointer self; private NodeTest nodeTest; //private boolean reverse; private Edge edge = null; private Node child = null; private int position = 0; public GraphEdgeIterator(GraphEdgePointer self, NodeTest test, boolean reverse, NodePointer startWith) { this.self = self; this.edge = (Edge) self.getNode(); this.nodeTest = test; //this.reverse = reverse; if (startWith != null) { this.child = (Node) startWith.getNode(); } } public NodePointer getNodePointer() { if (child == null) { return null; } return new GraphNodePointer(self, child); } public int getPosition() { return position; } public boolean setPosition(int position) { //if (reverse) position = 3-position; if (position == 1) { if (nodeTest instanceof NodeNameTest) { NodeNameTest nodeNameTest = (NodeNameTest) nodeTest; QName testName = nodeNameTest.getNodeName(); //String namespaceURI = nodeNameTest.getNamespaceURI(); boolean wildcard = nodeNameTest.isWildcard(); //String testPrefix = testName.getPrefix(); if (wildcard) { child = edge.getFrom(); return true; } else if (testName.getName().equals("from")) { child = edge.getFrom(); return true; } else if (testName.getName().equals("to")) { child = edge.getTo(); return true; } else { child = null; return false; } } else { child = edge.getFrom(); return true; } } else if (position == 2) { if (nodeTest instanceof NodeNameTest) { NodeNameTest nodeNameTest = (NodeNameTest) nodeTest; //QName testName = nodeNameTest.getNodeName(); //String namespaceURI = nodeNameTest.getNamespaceURI(); boolean wildcard = nodeNameTest.isWildcard(); //String testPrefix = testName.getPrefix(); if (wildcard) { child = edge.getTo(); return true; } else { child = null; return false; } } else { child = edge.getTo(); return true; } } else { position = 1; child = null; } return false; } } --- NEW FILE: GraphPointerFactory.java --- /* * Created on 15.12.2005 */ package org.mediavirus.graphl.jxpath; import java.util.Locale; import org.apache.commons.jxpath.ri.QName; import org.apache.commons.jxpath.ri.model.NodePointer; import org.apache.commons.jxpath.ri.model.NodePointerFactory; import org.mediavirus.graphl.graph.Edge; import org.mediavirus.graphl.graph.Node; public class GraphPointerFactory implements NodePointerFactory { public int getOrder() { return 1; } public NodePointer createNodePointer(NodePointer parent, QName name, Object object) { if (object instanceof Node) { return new GraphNodePointer(parent, (Node)object); } else if (object instanceof Edge) { return new GraphEdgePointer(parent, (Edge)object); } else { return null; } } public NodePointer createNodePointer(QName name, Object object, Locale locale) { if (object instanceof Node) { return new GraphNodePointer((Node)object); } else if (object instanceof Edge) { return new GraphEdgePointer((Edge)object); } else { return null; } } } --- NEW FILE: GraphEdgePointer.java --- /* * Created on 15.12.2005 */ package org.mediavirus.graphl.jxpath; import org.apache.commons.jxpath.ri.QName; import org.apache.commons.jxpath.ri.compiler.NodeTest; import org.apache.commons.jxpath.ri.model.NodeIterator; import org.apache.commons.jxpath.ri.model.NodePointer; import org.mediavirus.graphl.GraphlRegistry; import org.mediavirus.graphl.graph.Edge; import org.mediavirus.util.ParseUtils; public class GraphEdgePointer extends NodePointer { private Edge edge; public GraphEdgePointer(Edge edge) { super(null); this.edge = edge; } public GraphEdgePointer(NodePointer parent, Edge edge) { super(parent); this.edge = edge; } public NodeIterator childIterator(NodeTest test, boolean reverse, NodePointer startWith) { return new GraphEdgeIterator(this, test, reverse, startWith); } public NodeIterator attributeIterator(QName name) { return new GraphAttributeIterator(this, name); } @Override public int compareChildNodePointers(NodePointer pointer1, NodePointer pointer2) { return 0; } @Override public Object getBaseValue() { return edge; } @Override public Object getImmediateNode() { return edge; } @Override public int getLength() { return 2; } @Override public QName getName() { String type = edge.getType(); String ns = ParseUtils.guessNamespace(type); String prefix = GraphlRegistry.instance().getVocabularyRegistry().resolvePrefix(ns); String name = ParseUtils.guessName(type); return new QName(prefix, name); } @Override public boolean isCollection() { return false; } @Override public boolean isLeaf() { return false; } @Override public void setValue(Object value) { } public Edge getNode() { return edge; } } --- NEW FILE: GraphAttributeIterator.java --- /* * Created on 15.12.2005 */ package org.mediavirus.graphl.jxpath; import org.apache.commons.jxpath.ri.QName; import org.apache.commons.jxpath.ri.model.NodeIterator; import org.apache.commons.jxpath.ri.model.NodePointer; import org.mediavirus.graphl.GraphlRegistry; import org.mediavirus.graphl.graph.GraphElement; import org.mediavirus.graphl.vocabulary.VocabularyRegistry; public class GraphAttributeIterator implements NodeIterator { GraphElement element; QName name; String value = null; NodePointer self; protected GraphAttributeIterator(GraphElement el, QName name) { this.element = el; this.name = name; } public GraphAttributeIterator(GraphNodePointer pointer, QName name) { this((GraphElement)pointer.getNode(), name); self = pointer; } public GraphAttributeIterator(GraphEdgePointer pointer, QName name) { this((GraphElement)pointer.getNode(), name); self = pointer; } public NodePointer getNodePointer() { if (value == null) { return null; } return new GraphAttributePointer(self, name, value); } public int getPosition() { return (value == null) ? 0 : 1; } public boolean setPosition(int position) { value = null; if (position == 1) { VocabularyRegistry vr = GraphlRegistry.instance().getVocabularyRegistry(); value = element.getProperty(vr.expandPrefix(name.toString())); } return (value != null); } } --- NEW FILE: GraphNodePointer.java --- /* * Created on 15.12.2005 */ package org.mediavirus.graphl.jxpath; import org.apache.commons.jxpath.ri.QName; import org.apache.commons.jxpath.ri.compiler.NodeTest; import org.apache.commons.jxpath.ri.model.NodeIterator; import org.apache.commons.jxpath.ri.model.NodePointer; import org.mediavirus.graphl.GraphlRegistry; import org.mediavirus.graphl.graph.Node; import org.mediavirus.util.ParseUtils; public class GraphNodePointer extends NodePointer { private Node node; public GraphNodePointer(Node node) { super(null); this.node = node; } public GraphNodePointer(NodePointer parent, Node node) { super(parent); this.node = node; } public NodeIterator childIterator(NodeTest test, boolean reverse, NodePointer startWith) { return new GraphNodeIterator(this, test, reverse, startWith); } public NodeIterator attributeIterator(QName name) { return new GraphAttributeIterator(this, name); } @Override public int compareChildNodePointers(NodePointer pointer1, NodePointer pointer2) { return 0; } @Override public Object getBaseValue() { return node; } @Override public Object getImmediateNode() { return node; } @Override public int getLength() { return node.getEdgesFrom().size(); } @Override public QName getName() { String type = node.getType(); String ns = ParseUtils.guessNamespace(type); String prefix = GraphlRegistry.instance().getVocabularyRegistry().resolvePrefix(ns); String name = ParseUtils.guessName(type); return new QName(prefix, name); } @Override public boolean isCollection() { return false; } @Override public boolean isLeaf() { return false; } @Override public void setValue(Object value) { } public Node getNode() { return node; } } --- NEW FILE: GraphNodeIterator.java --- /* * Created on 15.12.2005 */ package org.mediavirus.graphl.jxpath; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.apache.commons.jxpath.ri.QName; import org.apache.commons.jxpath.ri.compiler.NodeNameTest; import org.apache.commons.jxpath.ri.compiler.NodeTest; import org.apache.commons.jxpath.ri.model.NodeIterator; import org.apache.commons.jxpath.ri.model.NodePointer; import org.mediavirus.graphl.GraphlRegistry; import org.mediavirus.graphl.graph.Edge; import org.mediavirus.graphl.graph.Node; import org.mediavirus.util.ParseUtils; public class GraphNodeIterator implements NodeIterator { private NodePointer parent; private NodeTest nodeTest; private boolean reverse; private Node node = null; private Edge child = null; private int position = 0; List<Edge> passedEdges; public GraphNodeIterator(GraphNodePointer parent, NodeTest test, boolean reverse, NodePointer startWith) { this.parent = parent; this.node = (Node)parent.getNode(); this.nodeTest = test; this.reverse = reverse; if (startWith != null) { this.child = (Edge) startWith.getNode(); } prepare(); } protected void prepare() { passedEdges = new ArrayList<Edge>(); int i = 0; for (Iterator edges = node.getEdgesFrom().iterator(); edges.hasNext();) { Edge edge = (Edge) edges.next(); if (edge.equals(child)) position = i; if (testChild(edge)) { passedEdges.add(edge); i++; } } } public NodePointer getNodePointer() { if (child == null) { return null; } return new GraphEdgePointer(parent, child); } public int getPosition() { return position; } public boolean setPosition(int position) { if (reverse) position = passedEdges.size() - position; if (position > 0 && position <= passedEdges.size()) { child = passedEdges.get(position - 1); this.position = position; return true; } else { child = null; if (position > passedEdges.size()) position = passedEdges.size(); else position = 1; return false; } } private boolean testChild(Edge edge) { if (nodeTest == null) { return true; } else if (nodeTest instanceof NodeNameTest) { NodeNameTest nodeNameTest = (NodeNameTest) nodeTest; QName testName = nodeNameTest.getNodeName(); String namespaceURI = GraphlRegistry.instance().getVocabularyRegistry().resolveNamespace(testName.getPrefix()); boolean wildcard = nodeNameTest.isWildcard(); String testPrefix = testName.getPrefix(); if (wildcard && testPrefix == null) { return true; } if (wildcard || testName.getName().equals(ParseUtils.guessName(edge.getType()))) { String nodeNS = ParseUtils.guessNamespace(edge.getType()); return equalStrings(namespaceURI, nodeNS); } } return false; } private static boolean equalStrings(String s1, String s2) { if (s1 == null && s2 != null) { return false; } if (s1 != null && s2 == null) { return false; } if (s1 != null && !s1.trim().equals(s2.trim())) { return false; } return true; } } |
From: Flo L. <fl...@us...> - 2005-12-18 11:10:20
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/jxpath In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2487/src/org/mediavirus/graphl/jxpath Log Message: Directory /cvsroot/graphl/graphl/src/org/mediavirus/graphl/jxpath added to the repository |
From: Flo L. <fl...@us...> - 2005-12-14 12:45:20
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/rdf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24484/src/org/mediavirus/graphl/graph/rdf Modified Files: RDFGraph.java Log Message: - FEATURE: new command line flag to start "navigator" thread to zoom & pan in the graph - CODE: loading graphs returns URL[] with all loaded (+included) files - CODE: dynamically adding config-file + all included files to default filter - DOC: extended user guide Index: RDFGraph.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/rdf/RDFGraph.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** RDFGraph.java 7 Sep 2005 12:29:55 -0000 1.12 --- RDFGraph.java 14 Dec 2005 12:45:08 -0000 1.13 *************** *** 14,17 **** --- 14,18 ---- import java.net.MalformedURLException; import java.net.URL; + import java.util.ArrayList; import java.util.Collection; import java.util.Collections; *************** *** 36,421 **** */ public class RDFGraph extends DefaultGraph implements RDFConsumer { ! ! private static final boolean DEBUG = false; ! boolean dirty = false; ! Hashtable allNodes = new Hashtable(); ! URL loadingURL = null; Node sourceNode = null; ! private int loadCount = 0; private float loadAlpha = 0.1f; - - public RDFNode getNodeById(String id){ - return (RDFNode)allNodes.get(id); - } - - public static void writeToRDF(Graph graph, OutputStream out, String baseURL) throws IOException { - RDFWriter writer = new RDFWriter(); - - // TODO (2) use vocabularies from config for prefix resolution - writer.addNamespacePrefix("graphl",NS.graphl); - writer.addNamespacePrefix("foaf","http://xmlns.com/foaf/0.1/"); - writer.addNamespacePrefix("rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#"); - writer.addNamespacePrefix("rdfs","http://www.w3.org/2000/01/rdf-schema#"); - writer.addNamespacePrefix("owl","http://www.w3.org/2002/07/owl#"); - writer.addNamespacePrefix("map","http://fabl.net/vocabularies/geography/map/1.1/"); - writer.addNamespacePrefix("geo","http://www.w3.org/2003/01/geo/wgs84_pos#"); - writer.addNamespacePrefix("dc","http://purl.org/dc/elements/1.1/"); - writer.addNamespacePrefix("foo","http://www.mediavirus.org/foo#"); - writer.addNamespacePrefix("vs","http://www.w3.org/2003/06/sw-vocab-status/ns#"); - writer.addNamespacePrefix("wot","http://xmlns.com/wot/0.1/"); ! writer.prepareNamespaceCollection(); ! ! writer.collectNamespace(NS.graphl); ! writer.collectNamespace("http://xmlns.com/foaf/0.1/"); ! writer.collectNamespace("http://www.w3.org/1999/02/22-rdf-syntax-ns#"); ! writer.collectNamespace("http://www.w3.org/2000/01/rdf-schema#"); ! writer.collectNamespace("http://www.w3.org/2002/07/owl#"); ! writer.collectNamespace("http://fabl.net/vocabularies/geography/map/1.1/"); ! writer.collectNamespace("http://www.w3.org/2003/01/geo/wgs84_pos#"); ! writer.collectNamespace("http://purl.org/dc/elements/1.1/"); ! writer.collectNamespace("http://www.mediavirus.org/foo#"); ! writer.collectNamespace("http://www.w3.org/2003/06/sw-vocab-status/ns#"); ! writer.collectNamespace("http://xmlns.com/wot/0.1/"); ! OutputStreamWriter owriter = new OutputStreamWriter(out); ! writer.startSerialization(owriter,"","","UTF-8"); ! writer.startRDFContents(); ! ! List allNodes = graph.getNodes(); ! List allEdges = graph.getEdges(); ! ! for (Iterator iter = allNodes.iterator(); iter.hasNext();) { ! Node node = (Node) iter.next(); ! ! String id = node.getId(); ! if ((baseURL != null) && (id.startsWith(baseURL)) && (id.lastIndexOf('#')>-1)) { ! id = id.substring(id.lastIndexOf('#')); ! } ! ! for (Iterator attrs = node.getProperties().keySet().iterator(); attrs.hasNext();) { ! String attr = (String) attrs.next(); ! writer.writeStatement(id, attr, node.getProperty(attr), null, null, true); ! } ! List nodeEdges = node.getEdgesFrom(); ! for (Iterator edgeIter = nodeEdges.iterator(); edgeIter.hasNext();) { ! Edge edge = (Edge) edgeIter.next(); ! // TODO (3) this would be a reason to have a FilteredNode class that returns only filtered edges... ! if (allEdges.contains(edge)) { ! String toId = edge.getTo().getId(); ! if ((baseURL != null) && (toId.startsWith(baseURL)) && (toId.lastIndexOf('#')>-1)) { ! toId = toId.substring(toId.lastIndexOf('#')); ! } ! writer.writeStatement(id, edge.getType(), toId, null, null, false); ! } ! } ! } ! ! writer.finishRDFContents(); ! writer.cleanUp(); ! ! } ! public void writeToRDF(OutputStream out, String baseURL) throws IOException { ! writeToRDF(this, out, baseURL); ! } ! ! public synchronized void readFromFile(String filename) throws IOException { ! System.out.println("reading file " + filename); ! File f = new File(filename); ! try { ! loadingURL = new URL("file:///" + f.getAbsolutePath()); ! } ! catch (MalformedURLException e) {} ! ! sourceNode = getNodeOrNew(loadingURL.toString()); - if (sourceNode.getNeighbours(NS.graphl + "definedIn", true).size() == 0) { - Edge edge = createEdge(sourceNode, sourceNode); - edge.setSource(NS.graphl + "SYSTEM"); - edge.setType(NS.graphl + "definedIn"); - } - - InputSource input = new InputSource(new FileReader(f)); - input.setSystemId(""); - readGraph(input); - - loadingURL = null; - sourceNode = null; - } - - public synchronized void readFromURL(URL url){ - - loadingURL = url; - sourceNode = getNodeOrNew(loadingURL.toString()); - - if (sourceNode.getNeighbours(NS.graphl + "definedIn", true).size() == 0) { - Edge edge = createEdge(sourceNode, sourceNode); - edge.setSource(NS.graphl + "SYSTEM"); - edge.setType(NS.graphl + "definedIn"); - } - - InputSource input; try { input = new InputSource(url.openConnection().getInputStream()); input.setSystemId(url.toString()); readGraph(input); } ! catch (IOException e) { e.printStackTrace(); } ! loadingURL = null; ! sourceNode = null; ! } ! ! public synchronized void readGraph(InputSource input) { ! RDFParser parser = new RDFParser(); ! loading = true; try { ! parser.parse(input,this); } - catch (Exception e) { - e.printStackTrace(); - } - loading = false; - resetDirty(); - fireGraphContentsChanged(); - } ! /** ! * @see edu.unika.aifb.rdf.api.syntax.RDFConsumer#startModel(java.lang.String) ! */ ! public void startModel(String physicalURI) throws SAXException { ! if (DEBUG) System.out.println("RDF: startModel"); ! } ! /** ! * @see edu.unika.aifb.rdf.api.syntax.RDFConsumer#endModel() ! */ ! public void endModel() throws SAXException { ! if (DEBUG) System.out.println("RDF: endModel"); ! } ! /** ! * @see edu.unika.aifb.rdf.api.syntax.RDFConsumer#statementWithResourceValue(java.lang.String, java.lang.String, java.lang.String) ! */ ! public void statementWithResourceValue(String subject, String predicate, String object) throws SAXException { ! //if (predicate.equals(NS.graphl + "connectedTo")) { ! // get / create node with label subject ! ! if (loadingURL != null) { ! try { ! subject = new URL(loadingURL, subject).toString(); ! } ! catch (MalformedURLException muex) { ! // do nothing ! } ! try { ! object = new URL(loadingURL, object).toString(); ! } ! catch (MalformedURLException muex) { ! // do nothing ! } ! } ! ! Node snode; ! Node onode; ! try { ! snode = getNodeOrNew(subject); ! onode = getNodeOrNew(object); ! // get / create connection ! List edges = snode.getEdgesFrom(); ! RDFEdge edge = null; ! boolean exists = false; ! ! for (Iterator iter = edges.iterator(); iter.hasNext();) { ! edge = (RDFEdge) iter.next(); ! if ((edge.getTo() == onode) && (edge.getType().equals(predicate))) { ! exists = true; ! break; ! } ! } ! ! if (!exists) { ! edge = new RDFEdge(snode,onode); ! edge.setType(predicate); ! edge.setSource(loadingURL.toString()); ! addElements(null, Collections.singleton(edge)); ! if (DEBUG) System.out.println("created edge " + subject + ", " + predicate + ", " + object); ! ! if (predicate.equals("http://www.w3.org/2002/07/owl#imports")) { ! try { ! URL oldBase = loadingURL; ! Node oldSource = sourceNode; ! URL importURL = new URL(loadingURL, object); ! System.out.println("importing " + importURL.toString() + " ... "); ! readFromURL(importURL); ! // restore original base url ! loadingURL = oldBase; ! sourceNode = oldSource; ! } ! catch (MalformedURLException muex) { ! System.out.println("Error importing " + object); ! } ! } ! } ! } ! catch (Exception ex) { ! if (DEBUG) System.out.println("Error while reading triple: " + subject + ", " + predicate + ", " + object); ! //ex.printStackTrace(); ! } ! ! ! } ! public Node getNodeOrNew(String uri){ ! RDFNode node = getNodeById(uri); ! if (node == null){ ! node = new RDFNode(this, uri); ! float r = 20 + loadCount; ! loadAlpha += 30/r; ! node.setCenter(r*Math.sin(loadAlpha), r*Math.cos(loadAlpha)); ! loadCount++; ! addElements(Collections.singleton(node), null); ! if (DEBUG) System.out.println("created node " + uri); ! } ! if (sourceNode != null) { ! boolean found = false; ! for (Iterator i = node.getNeighbours(NS.graphl + "definedIn", true).iterator(); i.hasNext();) { ! Node source = (Node) i.next(); ! if (source.equals(sourceNode)) { ! found = true; ! break; ! } ! } ! if (!found) { ! Edge edge = createEdge(node, sourceNode); ! edge.setSource(NS.graphl + "SYSTEM"); ! edge.setType(NS.graphl + "definedIn"); ! } ! } ! return node; ! } ! ! public Node createNode() { ! RDFNode node = new RDFNode(this); ! addElements(Collections.singleton(node), null); ! return node; ! } ! public Edge createEdge(Node from, Node to) { ! RDFEdge edge = new RDFEdge(from, to); ! if (loadingURL != null) { ! edge.setSource(loadingURL.toString()); ! } ! else { ! edge.setSource(NS.graphl + "USER"); ! } ! addElements(null, Collections.singleton(edge)); ! return edge; ! } ! /** ! * @see edu.unika.aifb.rdf.api.syntax.RDFConsumer#statementWithLiteralValue(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) ! */ ! public void statementWithLiteralValue(String subject, String predicate, String object, String language, String datatype) throws SAXException { ! ! // get absolute URL for subject ! if (loadingURL != null) { ! try { ! subject = new URL(loadingURL, subject).toString(); ! } ! catch (MalformedURLException muex) { ! // do nothing ! } ! } ! ! Node snode; ! try { ! snode = getNodeOrNew(subject); ! snode.setProperty(predicate, object); ! if (DEBUG) System.out.println("created property " + subject + ", " + predicate + ", " + object); ! } ! catch (Exception ex) { ! if (DEBUG) System.out.println("Error while reading triple: " + subject + ", " + predicate + ", " + object); ! } ! } ! /** ! * @see edu.unika.aifb.rdf.api.syntax.RDFConsumer#logicalURI(java.lang.String) ! */ ! public void logicalURI(String logicalURI) throws SAXException { ! if (DEBUG) System.out.println("RDF: logicalURI: " + logicalURI); ! } ! /** ! * @see edu.unika.aifb.rdf.api.syntax.RDFConsumer#includeModel(java.lang.String, java.lang.String) ! */ ! public void includeModel(String logicalURI, String physicalURI) throws SAXException { ! if (DEBUG) System.out.println("RDF: includeModel: " + logicalURI + ", " + physicalURI); ! } - /** - * @see edu.unika.aifb.rdf.api.syntax.RDFConsumer#addModelAttribte(java.lang.String, java.lang.String) - */ - public void addModelAttribte(String key, String value) throws SAXException { - if (DEBUG) System.out.println("RDF: addModelAttribte" + key + ", " + value); - } - /** * @return Returns the dirty flag. */ public boolean isDirty() { return dirty; } ! /** * @param dirty New value for dirty flag. */ public void setDirty(boolean dirty) { this.dirty = dirty; } ! public void setDirty() { setDirty(true); } ! public void resetDirty() { setDirty(false); } ! /* * Overrides @see de.fzi.wim.guibase.graphview.graph.DefaultGraph#addElements(java.util.Collection, java.util.Collection) */ public synchronized void addElements(Collection nodes, Collection edges) { setDirty(); super.addElements(nodes, edges); ! if (nodes != null) { ! for (Iterator iter = nodes.iterator(); iter.hasNext();){ ! RDFNode node = (RDFNode) iter.next(); ! allNodes.put(node.getId(), node); } } } ! /* * Overrides @see de.fzi.wim.guibase.graphview.graph.DefaultGraph#clear() */ public synchronized void clear() { setDirty(); allNodes.clear(); --- 37,450 ---- */ public class RDFGraph extends DefaultGraph implements RDFConsumer { ! ! public static boolean DEBUG = false; ! boolean dirty = false; ! Hashtable allNodes = new Hashtable(); ! URL loadingURL = null; + + List<URL> loadingURLs = null; + Node sourceNode = null; ! private int loadCount = 0; private float loadAlpha = 0.1f; ! public RDFNode getNodeById(String id) { ! return (RDFNode) allNodes.get(id); ! } ! public static void writeToRDF(Graph graph, OutputStream out, String baseURL) throws IOException { ! ! RDFWriter writer = new RDFWriter(); ! ! // TODO (2) use vocabularies from config for prefix resolution ! writer.addNamespacePrefix("graphl", NS.graphl); ! writer.addNamespacePrefix("foaf", "http://xmlns.com/foaf/0.1/"); ! writer.addNamespacePrefix("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"); ! writer.addNamespacePrefix("rdfs", "http://www.w3.org/2000/01/rdf-schema#"); ! writer.addNamespacePrefix("owl", "http://www.w3.org/2002/07/owl#"); ! writer.addNamespacePrefix("map", "http://fabl.net/vocabularies/geography/map/1.1/"); ! writer.addNamespacePrefix("geo", "http://www.w3.org/2003/01/geo/wgs84_pos#"); ! writer.addNamespacePrefix("dc", "http://purl.org/dc/elements/1.1/"); ! writer.addNamespacePrefix("foo", "http://www.mediavirus.org/foo#"); ! writer.addNamespacePrefix("vs", "http://www.w3.org/2003/06/sw-vocab-status/ns#"); ! writer.addNamespacePrefix("wot", "http://xmlns.com/wot/0.1/"); ! ! writer.prepareNamespaceCollection(); ! ! writer.collectNamespace(NS.graphl); ! writer.collectNamespace("http://xmlns.com/foaf/0.1/"); ! writer.collectNamespace("http://www.w3.org/1999/02/22-rdf-syntax-ns#"); ! writer.collectNamespace("http://www.w3.org/2000/01/rdf-schema#"); ! writer.collectNamespace("http://www.w3.org/2002/07/owl#"); ! writer.collectNamespace("http://fabl.net/vocabularies/geography/map/1.1/"); ! writer.collectNamespace("http://www.w3.org/2003/01/geo/wgs84_pos#"); ! writer.collectNamespace("http://purl.org/dc/elements/1.1/"); ! writer.collectNamespace("http://www.mediavirus.org/foo#"); ! writer.collectNamespace("http://www.w3.org/2003/06/sw-vocab-status/ns#"); ! writer.collectNamespace("http://xmlns.com/wot/0.1/"); ! ! OutputStreamWriter owriter = new OutputStreamWriter(out); ! writer.startSerialization(owriter, "", "", "UTF-8"); ! writer.startRDFContents(); ! ! List allNodes = graph.getNodes(); ! List allEdges = graph.getEdges(); ! ! for (Iterator iter = allNodes.iterator(); iter.hasNext();) { ! Node node = (Node) iter.next(); ! ! String id = node.getId(); ! if ((baseURL != null) && (id.startsWith(baseURL)) && (id.lastIndexOf('#') > -1)) { ! id = id.substring(id.lastIndexOf('#')); ! } ! ! for (Iterator attrs = node.getProperties().keySet().iterator(); attrs.hasNext();) { ! String attr = (String) attrs.next(); ! writer.writeStatement(id, attr, node.getProperty(attr), null, null, true); ! } ! List nodeEdges = node.getEdgesFrom(); ! for (Iterator edgeIter = nodeEdges.iterator(); edgeIter.hasNext();) { ! Edge edge = (Edge) edgeIter.next(); ! // TODO (3) this would be a reason to have a FilteredNode class that returns only filtered edges... ! if (allEdges.contains(edge)) { ! String toId = edge.getTo().getId(); ! if ((baseURL != null) && (toId.startsWith(baseURL)) && (toId.lastIndexOf('#') > -1)) { ! toId = toId.substring(toId.lastIndexOf('#')); ! } ! writer.writeStatement(id, edge.getType(), toId, null, null, false); ! } ! } ! } ! ! writer.finishRDFContents(); ! writer.cleanUp(); ! ! } ! ! public void writeToRDF(OutputStream out, String baseURL) throws IOException { ! ! writeToRDF(this, out, baseURL); ! } ! ! public synchronized Iterator<URL> readFromFile(File file) throws IOException { try { + URL url = new URL("file:///" + file.getAbsolutePath()); + return readFromURL(url); + } + catch (MalformedURLException e) { + throw new IOException("Cannot construct URL from filename"); + } + + } + + public synchronized Iterator<URL> readFromURL(URL url) throws IOException{ + + try { + loadingURLs = new ArrayList<URL>(); + importFromURL(url); + + Iterator<URL> retVal = loadingURLs.iterator(); + + return retVal; + } + finally { + loadingURLs = null; + } + + } + + /** + * This is the internal method to load content from an URL. While readFromURL returns + * the URLs loaded to the caller, this one adds the loaded URL to the list of URLs + * to be returned. + * + * @param url The URL to load. + */ + protected void importFromURL(URL url) throws IOException{ + + try { + loadingURL = url; + sourceNode = getNodeOrNew(loadingURL.toString()); + + if (sourceNode.getNeighbours(NS.graphl + "definedIn", true).size() == 0) { + Edge edge = createEdge(sourceNode, sourceNode); + edge.setSource(NS.graphl + "SYSTEM"); + edge.setType(NS.graphl + "definedIn"); + } + + InputSource input; + input = new InputSource(url.openConnection().getInputStream()); input.setSystemId(url.toString()); readGraph(input); + loadingURLs.add(url); } ! finally { ! loadingURL = null; ! sourceNode = null; ! } ! } ! ! public synchronized void readGraph(InputSource input) { ! ! RDFParser parser = new RDFParser(); ! loading = true; ! try { ! parser.parse(input, this); ! } ! catch (Exception e) { e.printStackTrace(); } + loading = false; + resetDirty(); + fireGraphContentsChanged(); + } ! /** ! * @see edu.unika.aifb.rdf.api.syntax.RDFConsumer#startModel(java.lang.String) ! */ ! public void startModel(String physicalURI) throws SAXException { ! ! if (DEBUG) System.out.println("RDF: startModel"); ! } ! ! /** ! * @see edu.unika.aifb.rdf.api.syntax.RDFConsumer#endModel() ! */ ! public void endModel() throws SAXException { ! ! if (DEBUG) System.out.println("RDF: endModel"); ! } ! ! /** ! * @see edu.unika.aifb.rdf.api.syntax.RDFConsumer#statementWithResourceValue(java.lang.String, java.lang.String, java.lang.String) ! */ ! public void statementWithResourceValue(String subject, String predicate, String object) throws SAXException { ! ! //if (predicate.equals(NS.graphl + "connectedTo")) { ! // get / create node with label subject ! ! if (loadingURL != null) { ! try { ! subject = new URL(loadingURL, subject).toString(); ! } ! catch (MalformedURLException muex) { ! // do nothing ! } ! try { ! object = new URL(loadingURL, object).toString(); ! } ! catch (MalformedURLException muex) { ! // do nothing ! } ! } ! ! Node snode; ! Node onode; try { ! snode = getNodeOrNew(subject); ! onode = getNodeOrNew(object); ! ! // get / create connection ! List edges = snode.getEdgesFrom(); ! RDFEdge edge = null; ! boolean exists = false; ! ! for (Iterator iter = edges.iterator(); iter.hasNext();) { ! edge = (RDFEdge) iter.next(); ! if ((edge.getTo() == onode) && (edge.getType().equals(predicate))) { ! exists = true; ! break; ! } ! } ! ! if (!exists) { ! edge = new RDFEdge(snode, onode); ! edge.setType(predicate); ! edge.setSource(loadingURL.toString()); ! addElements(null, Collections.singleton(edge)); ! if (DEBUG) System.out.println("created edge " + subject + ", " + predicate + ", " + object); ! ! if (predicate.equals("http://www.w3.org/2002/07/owl#imports") || predicate.equals(NS.rdfs + "seeAlso")) { ! //if (predicate.equals("http://www.w3.org/2002/07/owl#imports")) { ! URL oldBase = loadingURL; ! Node oldSource = sourceNode; ! try { ! URL importURL = new URL(loadingURL, object); ! System.out.println("importing " + importURL.toString() + " ... "); ! importFromURL(importURL); ! // restore original base url ! } ! catch (Exception ex) { ! System.out.println("Error importing " + object); ! } ! finally { ! loadingURL = oldBase; ! sourceNode = oldSource; ! } ! } ! } ! } ! catch (Exception ex) { ! if (DEBUG) System.out.println("Error while reading triple: " + subject + ", " + predicate + ", " + object); ! //ex.printStackTrace(); } + } ! public Node getNodeOrNew(String uri) { + RDFNode node = getNodeById(uri); + if (node == null) { + node = new RDFNode(this, uri); + float r = 20 + loadCount; + loadAlpha += 30 / r; + node.setCenter(r * Math.sin(loadAlpha), r * Math.cos(loadAlpha)); + loadCount++; + addElements(Collections.singleton(node), null); + if (DEBUG) System.out.println("created node " + uri); + } + if (sourceNode != null) { + boolean found = false; + for (Iterator i = node.getNeighbours(NS.graphl + "definedIn", true).iterator(); i.hasNext();) { + Node source = (Node) i.next(); + if (source.equals(sourceNode)) { + found = true; + break; + } + } + if (!found) { + Edge edge = createEdge(node, sourceNode); + edge.setSource(NS.graphl + "SYSTEM"); + edge.setType(NS.graphl + "definedIn"); + } + } + return node; + } ! public Node createNode() { + RDFNode node = new RDFNode(this); + addElements(Collections.singleton(node), null); + return node; + } ! public Edge createEdge(Node from, Node to) { ! RDFEdge edge = new RDFEdge(from, to); ! if (loadingURL != null) { ! edge.setSource(loadingURL.toString()); ! } ! else { ! edge.setSource(NS.graphl + "USER"); ! } ! addElements(null, Collections.singleton(edge)); ! return edge; ! } ! /** ! * @see edu.unika.aifb.rdf.api.syntax.RDFConsumer#statementWithLiteralValue(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) ! */ ! public void statementWithLiteralValue(String subject, String predicate, String object, String language, String datatype) throws SAXException { ! // get absolute URL for subject ! if (loadingURL != null) { ! try { ! subject = new URL(loadingURL, subject).toString(); ! } ! catch (MalformedURLException muex) { ! // do nothing ! } ! } ! Node snode; ! try { ! snode = getNodeOrNew(subject); ! snode.setProperty(predicate, object); ! if (DEBUG) System.out.println("created property " + subject + ", " + predicate + ", " + object); ! } ! catch (Exception ex) { ! if (DEBUG) System.out.println("Error while reading triple: " + subject + ", " + predicate + ", " + object); ! } ! } ! /** ! * @see edu.unika.aifb.rdf.api.syntax.RDFConsumer#logicalURI(java.lang.String) ! */ ! public void logicalURI(String logicalURI) throws SAXException { + if (DEBUG) System.out.println("RDF: logicalURI: " + logicalURI); + } ! /** ! * @see edu.unika.aifb.rdf.api.syntax.RDFConsumer#includeModel(java.lang.String, java.lang.String) ! */ ! public void includeModel(String logicalURI, String physicalURI) throws SAXException { + if (DEBUG) System.out.println("RDF: includeModel: " + logicalURI + ", " + physicalURI); + } ! /** ! * @see edu.unika.aifb.rdf.api.syntax.RDFConsumer#addModelAttribte(java.lang.String, java.lang.String) ! */ ! public void addModelAttribte(String key, String value) throws SAXException { + if (DEBUG) System.out.println("RDF: addModelAttribte" + key + ", " + value); + } /** * @return Returns the dirty flag. */ public boolean isDirty() { + return dirty; } ! /** * @param dirty New value for dirty flag. */ public void setDirty(boolean dirty) { + this.dirty = dirty; } ! public void setDirty() { + setDirty(true); } ! public void resetDirty() { + setDirty(false); } ! /* * Overrides @see de.fzi.wim.guibase.graphview.graph.DefaultGraph#addElements(java.util.Collection, java.util.Collection) */ public synchronized void addElements(Collection nodes, Collection edges) { + setDirty(); super.addElements(nodes, edges); ! if (nodes != null) { ! for (Iterator iter = nodes.iterator(); iter.hasNext();) { ! RDFNode node = (RDFNode) iter.next(); ! allNodes.put(node.getId(), node); } } } ! /* * Overrides @see de.fzi.wim.guibase.graphview.graph.DefaultGraph#clear() */ public synchronized void clear() { + setDirty(); allNodes.clear(); *************** *** 423,431 **** loadCount = 0; } ! /* * Overrides @see de.fzi.wim.guibase.graphview.graph.DefaultGraph#deleteElements(java.util.Collection, java.util.Collection) */ public synchronized void deleteElements(Collection nodes, Collection edges) { setDirty(); super.deleteElements(nodes, edges); --- 452,461 ---- loadCount = 0; } ! /* * Overrides @see de.fzi.wim.guibase.graphview.graph.DefaultGraph#deleteElements(java.util.Collection, java.util.Collection) */ public synchronized void deleteElements(Collection nodes, Collection edges) { + setDirty(); super.deleteElements(nodes, edges); *************** *** 433,441 **** if (nodes != null) { for (Iterator iter = nodes.iterator(); iter.hasNext();) { ! RDFNode node = (RDFNode) iter.next(); ! allNodes.remove(node.getId()); } } } ! } --- 463,471 ---- if (nodes != null) { for (Iterator iter = nodes.iterator(); iter.hasNext();) { ! RDFNode node = (RDFNode) iter.next(); ! allNodes.remove(node.getId()); } } } ! } |
From: Flo L. <fl...@us...> - 2005-12-14 12:45:18
|
Update of /cvsroot/graphl/graphl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24484 Modified Files: graphl-local.bat changelog.txt Log Message: - FEATURE: new command line flag to start "navigator" thread to zoom & pan in the graph - CODE: loading graphs returns URL[] with all loaded (+included) files - CODE: dynamically adding config-file + all included files to default filter - DOC: extended user guide Index: graphl-local.bat =================================================================== RCS file: /cvsroot/graphl/graphl/graphl-local.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** graphl-local.bat 30 Nov 2004 09:39:39 -0000 1.3 --- graphl-local.bat 14 Dec 2005 12:45:08 -0000 1.4 *************** *** 1,3 **** cd C:\data\projects\graphl ! java -cp ./bin;./lib/rdfapi.jar;./lib/l2fprod-common-fontchooser.jar;./lib/l2fprod-common-sheet.jar org.mediavirus.graphl.GraphlApplication %1 %2 %3 %4 %5 pause \ No newline at end of file --- 1,3 ---- cd C:\data\projects\graphl ! java -cp ./bin;./lib/rdfapi.jar;./lib/l2fprod-common-fontchooser.jar;./lib/l2fprod-common-sheet.jar org.mediavirus.graphl.GraphlApplication %1 %2 %3 %4 %5 %6 pause \ No newline at end of file Index: changelog.txt =================================================================== RCS file: /cvsroot/graphl/graphl/changelog.txt,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** changelog.txt 12 Sep 2005 08:39:06 -0000 1.18 --- changelog.txt 14 Dec 2005 12:45:08 -0000 1.19 *************** *** 2,5 **** --- 2,11 ---- ================== + 2005-12-14, f/0: + - FEATURE: new command line flag to start "navigator" thread to zoom & pan in the graph + - CODE: loading graphs returns URL[] with all loaded (+included) files + - CODE: dynamically adding config-file + all included files to default filter + - DOC: extended user guide + 2005-09-12, f/0: - DOC: started to write a user guide!!! |
From: Flo L. <fl...@us...> - 2005-12-14 12:44:31
|
Update of /cvsroot/graphl/graphl/doc/manual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24346/doc/manual Modified Files: index.html Log Message: - FEATURE: new command line flag to start "navigator" thread to zoom & pan in the graph - CODE: loading graphs returns URL[] with all loaded (+included) files - CODE: dynamically adding config-file + all included files to default filter - DOC: extended user guide Index: index.html =================================================================== RCS file: /cvsroot/graphl/graphl/doc/manual/index.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index.html 12 Sep 2005 08:37:47 -0000 1.1 --- index.html 14 Dec 2005 12:44:16 -0000 1.2 *************** *** 40,44 **** <p>If the thing crashes on you or does unexpected tings, it would be nice to ! email me a <em>reproducible</em> error report, so maybe I can fix the thing in a future release.</p> <h2>Installing graphl</h2> --- 40,44 ---- <p>If the thing crashes on you or does unexpected tings, it would be nice to ! email me a <em>reproducable</em> error report, so maybe I can fix the thing in a future release.</p> <h2>Installing graphl</h2> *************** *** 48,52 **** will remain stable however, I own this domain and I am not planning to give it back in my lifetime.</p> ! <p>Java installed...</p> <p>After downloading the .zip package (I don't provide other packages currently, every platform should be able to --- 48,54 ---- will remain stable however, I own this domain and I am not planning to give it back in my lifetime.</p> ! <p>You have to have a recent version of Java installed - if you want to build graphl from source, go for the latest ! JDK (currently 1.5 or 5.0, as they call it). If yiu just want to run it, it should work with a JRE 1.4, although ! i might add features at any time that make it incompatible to older versions.</p> <p>After downloading the .zip package (I don't provide other packages currently, every platform should be able to *************** *** 75,78 **** --- 77,81 ---- <tr><td><code>toolbar={on|off}</code></td><td>Turn the "toolbar" above the graphl rendering area on or off (default=on).</td></tr> <tr><td><code>menubar={on|off}</code></td><td>Turn the menubar on or off (default=on).</td></tr> + <tr><td><code>navigator={on|off}</code></td><td>Start a thread that zooms and pans in the graph (for noninteractive presentations, currently not configurable. default=off).</td></tr> <tr><td><code>refresh=<seconds></code></td><td>Reload all graphs every <seconds>. Currently defunct.</td></tr> <tr><td><code>config=<configfile></code></td><td>Config file to load (see <a href="#config">below</a>).</td></tr> |
From: Flo L. <fl...@us...> - 2005-12-14 12:44:00
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24265/src/org/mediavirus/graphl Modified Files: GraphlPane.java GraphlApplet.java GraphlApplication.java Log Message: - FEATURE: new command line flag to start "navigator" thread to zoom & pan in the graph - CODE: loading graphs returns URL[] with all loaded (+included) files - CODE: dynamically adding config-file + all included files to default filter - DOC: extended user guide Index: GraphlApplet.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/GraphlApplet.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** GraphlApplet.java 5 Sep 2005 15:51:50 -0000 1.11 --- GraphlApplet.java 14 Dec 2005 12:43:51 -0000 1.12 *************** *** 16,22 **** import java.net.URL; import java.net.URLConnection; - import java.util.ArrayList; import java.util.Iterator; - import java.util.List; import javax.swing.JApplet; --- 16,20 ---- *************** *** 42,46 **** private RDFGraph settingsGraph = new RDFGraph(); /** A List with all configuration nodes in the settings graph */ ! private List configurations = new ArrayList(); public GraphlApplet() { --- 40,44 ---- private RDFGraph settingsGraph = new RDFGraph(); /** A List with all configuration nodes in the settings graph */ ! //private List configurations = new ArrayList(); public GraphlApplet() { *************** *** 145,150 **** } ! catch (MalformedURLException e) { ! e.printStackTrace(); } } --- 143,149 ---- } ! catch (IOException ex) { ! System.err.println("Error reading settings: " + ex.getMessage()); ! ex.printStackTrace(); } } *************** *** 163,167 **** ((RDFGraph)mainPanel.getGraph()).readFromURL(rdfurl); } ! catch (MalformedURLException e) { e.printStackTrace(); } --- 162,167 ---- ((RDFGraph)mainPanel.getGraph()).readFromURL(rdfurl); } ! catch (IOException e) { ! System.err.println("Error loading RDF file: " + e.getMessage()); e.printStackTrace(); } Index: GraphlApplication.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/GraphlApplication.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** GraphlApplication.java 5 Sep 2005 15:51:50 -0000 1.21 --- GraphlApplication.java 14 Dec 2005 12:43:51 -0000 1.22 *************** *** 103,109 **** SourceFilter filter = new SourceFilter(); // TODO (2) we should model datasources as a class for UI access etc. ! filter.addSource("file:/C:/data/projects/graphl/config/vocabs/foaf-owl.rdf"); ! filter.addSource("file:/C:/data/projects/graphl/config/vocabs/rdf+rdfs.rdf"); ! filter.addSource("file:/C:/data/projects/graphl/config/config.rdf"); filter.addSource(NS.graphl + "SYSTEM"); --- 103,108 ---- SourceFilter filter = new SourceFilter(); // TODO (2) we should model datasources as a class for UI access etc. ! //filter.addSource("file:/C:/data/projects/graphl/config/vocabs/foaf-owl.rdf"); ! //filter.addSource("file:/C:/data/projects/graphl/config/vocabs/rdf+rdfs.rdf"); filter.addSource(NS.graphl + "SYSTEM"); *************** *** 249,254 **** loadURL(currentURL); } ! catch (MalformedURLException e) { ! JOptionPane.showMessageDialog(this, "The specified URL\n" + p.getURLString() + "\nis not valid!", "Invalid URL", JOptionPane.ERROR_MESSAGE); } } --- 248,253 ---- loadURL(currentURL); } ! catch (IOException e) { ! JOptionPane.showMessageDialog(this, "Error reading URL:\n" + e.getMessage(), "Error reading URL", JOptionPane.ERROR_MESSAGE); } } *************** *** 428,432 **** //mainPanel.getGraph().clear(); ! mainPanel.getGraph().readFromFile(file.getAbsolutePath()); //setTitle("Graphl - " + file.getName()); currentFile = file; --- 427,431 ---- //mainPanel.getGraph().clear(); ! mainPanel.getGraph().readFromFile(file); //setTitle("Graphl - " + file.getName()); currentFile = file; *************** *** 443,447 **** * @param url The URL of the RDF file to load. */ ! public void loadURL(URL url) { if (url != null) { mainPanel.getGraphPane().pauseLayouter(); --- 442,446 ---- * @param url The URL of the RDF file to load. */ ! public void loadURL(URL url) throws IOException{ if (url != null) { mainPanel.getGraphPane().pauseLayouter(); *************** *** 460,471 **** public void reload() { if (currentURL != null) { ! mainPanel.getGraph().readFromURL(currentURL); } else if (currentFile != null){ try { ! mainPanel.getGraph().readFromFile(currentFile.getAbsolutePath()); } catch (IOException ioex) { ! System.out.println(ioex.getMessage()); } } --- 459,475 ---- public void reload() { if (currentURL != null) { ! try { ! mainPanel.getGraph().readFromURL(currentURL); ! } ! catch (IOException e) { ! System.err.println("Error reloading URL: " + e.getMessage()); ! } } else if (currentFile != null){ try { ! mainPanel.getGraph().readFromFile(currentFile); } catch (IOException ioex) { ! System.err.println("Error reloading file: " + ioex.getMessage()); } } *************** *** 505,510 **** RDFGraph settingsGraph = (RDFGraph)mainPanel.graphPane.getSourceGraph(); ! settingsGraph.readFromFile(filename); ! JRadioButtonMenuItem defaultItem = null; Node defaultSettings = null; --- 509,524 ---- RDFGraph settingsGraph = (RDFGraph)mainPanel.graphPane.getSourceGraph(); ! Iterator<URL> urls = settingsGraph.readFromFile(new File(filename)); ! ! if (urls.hasNext()) { ! SourceFilter filter = new SourceFilter(); ! while (urls.hasNext()) { ! URL url = urls.next(); ! System.out.println(" filtering: " + url); ! filter.addSource(url.toString()); ! } ! mainPanel.graphPane.getFilteredGraph().addFilter(filter); ! } ! JRadioButtonMenuItem defaultItem = null; Node defaultSettings = null; *************** *** 560,564 **** boolean decorations = true, controls = true, ! menubar = true; String filename = DEFAULT_FILE; String configfile = System.getProperty("user.dir") + "/config/config.rdf"; --- 574,579 ---- boolean decorations = true, controls = true, ! menubar = true, ! navigator = false; String filename = DEFAULT_FILE; String configfile = System.getProperty("user.dir") + "/config/config.rdf"; *************** *** 582,585 **** --- 597,603 ---- if (args[i].equals("menubar=off")) menubar = false; } + else if (args[i].startsWith("navigator=")) { + if (args[i].equals("navigator=on")) navigator = true; + } else if (args[i].startsWith("config=")) { configfile = args[i].substring(7); *************** *** 592,595 **** --- 610,614 ---- } else { + System.out.println(i); usage(true); } *************** *** 617,621 **** } ! //app.startNavigator(); } } --- 636,640 ---- } ! if (navigator) app.startNavigator(); } } *************** *** 688,692 **** if (! node.getProperty(NS.graphl + "public","true").equalsIgnoreCase("false")){ if (first == null) first = node; ! if (node.getProperty(NS.graphl + "active","").equalsIgnoreCase("true")) { if (settings.hasNext()) { node = (Node) settings.next(); --- 707,711 ---- if (! node.getProperty(NS.graphl + "public","true").equalsIgnoreCase("false")){ if (first == null) first = node; ! if (node.getProperty(NS.graphl + "active","false").equalsIgnoreCase("true")) { if (settings.hasNext()) { node = (Node) settings.next(); Index: GraphlPane.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/GraphlPane.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** GraphlPane.java 7 Sep 2005 12:29:55 -0000 1.21 --- GraphlPane.java 14 Dec 2005 12:43:51 -0000 1.22 *************** *** 442,446 **** if (node.hasType(NS.graphl + "Configuration")) { configurations.add(node); ! node.setProperty(NS.graphl + "active","false"); } } --- 442,446 ---- if (node.hasType(NS.graphl + "Configuration")) { configurations.add(node); ! //node.setProperty(NS.graphl + "active","false"); } } |
From: Flo L. <fl...@us...> - 2005-09-12 08:39:15
|
Update of /cvsroot/graphl/graphl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1038 Modified Files: changelog.txt Log Message: updated changelog Index: changelog.txt =================================================================== RCS file: /cvsroot/graphl/graphl/changelog.txt,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** changelog.txt 7 Sep 2005 12:29:55 -0000 1.17 --- changelog.txt 12 Sep 2005 08:39:06 -0000 1.18 *************** *** 2,5 **** --- 2,8 ---- ================== + 2005-09-12, f/0: + - DOC: started to write a user guide!!! + 2005-09-07, f/0: - FEATURE: type menu pops up upon edge creation *************** *** 18,22 **** - DOC: added long-term todo list - 2005-08-24, f/0: - FEATURE: files are now loaded in addition to existing graph --- 21,24 ---- *************** *** 29,33 **** - CODE: added addElements() method to graph interface - 2005-08-17, f/0: - FEATURE: added navigator thread for update-exhibition, disabled in normal operation --- 31,34 ---- |
From: Flo L. <fl...@us...> - 2005-09-12 08:38:07
|
Update of /cvsroot/graphl/graphl/doc/manual/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv799/doc/manual/images Added Files: load.jpg zoom.jpg empty.jpg Log Message: started to write a user guide!! --- NEW FILE: empty.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: zoom.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: load.jpg --- (This appears to be a binary file; contents omitted.) |
From: Flo L. <fl...@us...> - 2005-09-12 08:37:55
|
Update of /cvsroot/graphl/graphl/doc/manual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv763/doc/manual Added Files: index.html Log Message: started to write a user guide!! --- NEW FILE: index.html --- <html> <head> <title>Graphl User Manual</title> <style type="text/css"> p {font: 11pt georgia, serif; } h1 { font: 20pt arial, helvetica, sans-serif; font-weight: bold; } h2 { font: 12pt arial, helvetica, sans-serif; font-weight: bold; margin-top: 0px; } </style> </head> <body> <h1>The Graphl User Manual</h1> <h2>Introduction</h2> <p>Hi all, this is a very rough first guide to using <a href="http://www.mediavirus.org/graphl">graphl</a> as a graph viewing and editing tool. As this is a leisure project, this guide might become outdated as graphl evolves and new features are added. However, I am willing (as of now) to support you personally, so if anything doesn't work like expected, feel free to drop me a line at <a href="mailto:led...@im...">led...@im...</a>. Don't expect an immediate answer, I am a lousy mail-answerer, but eventually I will come back to you.</p> <p>OK, let's get started right away with the most important stuff you were willing to pull your toenails out to read... Iiiiit's the</p> <h2>Disclaimer!!!</h2> <p>graphl is <strong>alpha quality software</strong>. This means that everything can change anytime, new versions <em>will</em> be incompatible to previous ones, and while using it you may expect serious crashes, dataloss, frustration and/or hair loss. Don't blame me, I've told you before! It may be completely unsuitable for you at the present stage, but if this is the case it might be worthwile to chack back half a year later or so to see how much it has progressed - depending on my motivation, a lot of things are possible in a half year...</p> <p>If the thing crashes on you or does unexpected tings, it would be nice to email me a <em>reproducible</em> error report, so maybe I can fix the thing in a future release.</p> <h2>Installing graphl</h2> <p>graphl can be obtained from its <a href="http://www.mediavirus.org/graphl">website</a>. Note that currently this URL is redirected to a different server, but that might change in the future. The URL in the link above will remain stable however, I own this domain and I am not planning to give it back in my lifetime.</p> <p>Java installed...</p> <p>After downloading the .zip package (I don't provide other packages currently, every platform should be able to unzip it. If you're to cool a linux hacker, and you reject to bother with .zip files, go build it from <a href="#building">source</a>). Ahm. So - after downloading the .zip file, unpack it to a directory of your choice, and view the contents of that directory. It cointains various folders, and some files. You can go through the README.txt, the changelog and the license, if you really hope to find useful information in there. The only file that is really interesting for now is <code>graphl.bat</code> (for windows users) and <code>graphl.sh</code> (for Unix and Mac users). These scripts start graphl - it's no shell magic, these scripts just save you some typing to correctly start the java interpreter etc. - if you're interested, look what's inside the scripts, and you will see what it's doing. (BTW: I am not sure if the .sh thing works at the moment - you see I am a windows user, and I don't know a thing about unix stuff. I think I remember we tried this out on a Mac once though, but if it doesn't work it would be amazingly fabulous (or fabulously amazing?) if you could fix it and send me the corrected version ;)</p> <h2>Starting graphl</h2> <p>You can launch graphl with the script, by double-clicking it or typing the name in the console. This also opens up the possibility to add some command-line options to influence the behaviour of graphl:</p> <table> <tr><th colspan="2" align="left">graphl command line options</th></tr> <tr><td><code>size=<width>,<height></code></td><td>Specify the size of the graphl window in pixels.</td></tr> <tr><td><code>pos=<x>,<y></code></td><td>Specify the position of the graphl window on the screen.</td></tr> <tr><td><code>decorations={on|off}</code></td><td>Turn OS-specific window border on or off (default=on).</td></tr> <tr><td><code>toolbar={on|off}</code></td><td>Turn the "toolbar" above the graphl rendering area on or off (default=on).</td></tr> <tr><td><code>menubar={on|off}</code></td><td>Turn the menubar on or off (default=on).</td></tr> <tr><td><code>refresh=<seconds></code></td><td>Reload all graphs every <seconds>. Currently defunct.</td></tr> <tr><td><code>config=<configfile></code></td><td>Config file to load (see <a href="#config">below</a>).</td></tr> <tr><td><code>{<filename>|<url>}</code></td><td>Load the specified file or URL. This should be extended to a list of filenames, since graphl can load multiple files at once.</td></tr> </table> <p>So, for example iy you want to show a graph without interaction in fullscreen mode on a 1024x768 screen, you would use <code>graphl pos=0,0 size=1024,768 decorations=off toolbar=off menubar=off</code> followed by the filename.</p> <p>If you start graphl without any options, you should get a window looking like this:</p> <center><img src="images/empty.jpg"/></center> <p>(only a bit bigger).</p> <h2>Loading & Viewing Graphs</h2> <p>Graphs can be loaded from the commandline as described above. Alternatively, and this will probably be the more common way, you can load a graph into graphl by choosing <code>File > Load File...</code> or pressing <code>Ctrl+O</code>. Now there is one important thing to understand: in graphl, you are not editing files, but you are editing an RDF graph that is possibly composed from the information contained in several files. What you are seeing in graphl is a <em>filtered</em> version of this global graph, which means that some nodes and edges are hidden, hopefully because you are not interested in them (in fact, graphl loads several files at startup, including configuration files and vocabularies, and adds them to the graph. They are filtered out however, so you start with a blank display).</p> <p>It is possible to load multiple files into graphl, and they will all be added to the graph you are viewing. The user interface for <em>removing</em> information from the graph is still in development though, so if you want to "unload" a file that has been added to the graph, you have to start from scratch or manually delete all the nodes and edges that were contributed by this file.</p> <center><img src="images/load.jpg"/><img src="images/zoom.jpg"/></center> <h2>Editing Graphs</h2> <h2>Saving the Graph</h2> <h2>Changing the View</h2> <h2><a name="config">Changing configurations</a></h2> <h2><a name="building">Building Graphl</a></h2> </body> </html> |
From: Flo L. <fl...@us...> - 2005-09-12 08:37:47
|
Update of /cvsroot/graphl/graphl/doc/manual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv737/doc/manual Log Message: Directory /cvsroot/graphl/graphl/doc/manual added to the repository |
From: Flo L. <fl...@us...> - 2005-09-12 08:37:47
|
Update of /cvsroot/graphl/graphl/doc/manual/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv737/doc/manual/images Log Message: Directory /cvsroot/graphl/graphl/doc/manual/images added to the repository |
From: Flo L. <fl...@us...> - 2005-09-07 12:30:16
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/rdf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25832/src/org/mediavirus/graphl/graph/rdf Modified Files: RDFNode.java RDFGraph.java Log Message: - FEATURE: type menu pops up upon edge creation - BUG: fixed assignment of unique ids to new nodes - BUG: fixed in-place editor for nodes - CODE: loading graphs is now synchronized to avoid loading conflicts - CODE: restoring Graphics transform in GraphlPane after rendering Index: RDFNode.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/rdf/RDFNode.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** RDFNode.java 5 Sep 2005 15:41:23 -0000 1.10 --- RDFNode.java 7 Sep 2005 12:29:55 -0000 1.11 *************** *** 12,15 **** --- 12,16 ---- import org.mediavirus.graphl.graph.DefaultNode; import org.mediavirus.graphl.graph.Node; + import org.mediavirus.graphl.vocabulary.NS; /** *************** *** 47,50 **** --- 48,65 ---- } + public void setId(String id) { + // if a #genid is set, set global number higher than that to avoid duplicates + if (id.contains("#genid")) { + try { + int idnum = Integer.parseInt(id.substring(id.lastIndexOf("#genid")+6)); + if (idnum >= num) num = idnum+1; + } + catch (NumberFormatException nfex) { + // do nothing + } + } + super.setId(id); + } + public String getType() { Node n = getFirstNeighbour("http://www.w3.org/1999/02/22-rdf-syntax-ns#type", true); *************** *** 71,74 **** --- 86,91 ---- RDFEdge typeEdge = new RDFEdge(this, typeNode); typeEdge.setType("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"); + // TODO (3) this should probably not be hardcoded to USER + typeEdge.setSource(NS.graphl + "USER"); graph.addElements(null, Collections.singleton(typeEdge)); } catch (Exception e) { Index: RDFGraph.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/rdf/RDFGraph.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** RDFGraph.java 5 Sep 2005 15:40:08 -0000 1.11 --- RDFGraph.java 7 Sep 2005 12:29:55 -0000 1.12 *************** *** 126,130 **** } ! public void readFromFile(String filename) throws IOException { System.out.println("reading file " + filename); File f = new File(filename); --- 126,130 ---- } ! public synchronized void readFromFile(String filename) throws IOException { System.out.println("reading file " + filename); File f = new File(filename); *************** *** 150,154 **** } ! public void readFromURL(URL url){ loadingURL = url; --- 150,154 ---- } ! public synchronized void readFromURL(URL url){ loadingURL = url; *************** *** 317,321 **** public Edge createEdge(Node from, Node to) { RDFEdge edge = new RDFEdge(from, to); ! edge.setSource(loadingURL.toString()); addElements(null, Collections.singleton(edge)); return edge; --- 317,326 ---- public Edge createEdge(Node from, Node to) { RDFEdge edge = new RDFEdge(from, to); ! if (loadingURL != null) { ! edge.setSource(loadingURL.toString()); ! } ! else { ! edge.setSource(NS.graphl + "USER"); ! } addElements(null, Collections.singleton(edge)); return edge; |
From: Flo L. <fl...@us...> - 2005-09-07 12:30:16
|
Update of /cvsroot/graphl/graphl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25832 Modified Files: changelog.txt Log Message: - FEATURE: type menu pops up upon edge creation - BUG: fixed assignment of unique ids to new nodes - BUG: fixed in-place editor for nodes - CODE: loading graphs is now synchronized to avoid loading conflicts - CODE: restoring Graphics transform in GraphlPane after rendering Index: changelog.txt =================================================================== RCS file: /cvsroot/graphl/graphl/changelog.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** changelog.txt 5 Sep 2005 15:52:53 -0000 1.16 --- changelog.txt 7 Sep 2005 12:29:55 -0000 1.17 *************** *** 2,5 **** --- 2,12 ---- ================== + 2005-09-07, f/0: + - FEATURE: type menu pops up upon edge creation + - BUG: fixed assignment of unique ids to new nodes + - BUG: fixed in-place editor for nodes + - CODE: loading graphs is now synchronized to avoid loading conflicts + - CODE: restoring Graphics transform in GraphlPane after rendering + 2005-09-05, f/0: - FEATURE: updated save machanism to new multi-souurce paradigm |
From: Flo L. <fl...@us...> - 2005-09-07 12:30:16
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/interaction In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25832/src/org/mediavirus/graphl/interaction Modified Files: GraphlManipulator.java Log Message: - FEATURE: type menu pops up upon edge creation - BUG: fixed assignment of unique ids to new nodes - BUG: fixed in-place editor for nodes - CODE: loading graphs is now synchronized to avoid loading conflicts - CODE: restoring Graphics transform in GraphlPane after rendering Index: GraphlManipulator.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/interaction/GraphlManipulator.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** GraphlManipulator.java 5 Sep 2005 15:46:38 -0000 1.12 --- GraphlManipulator.java 7 Sep 2005 12:29:56 -0000 1.13 *************** *** 136,158 **** public void resourceChanged(String resource) { newNode.setType(resource); ! TextFieldInPlaceNodeEditor editor = new TextFieldInPlaceNodeEditor(graphPane, newNode, new NodeEditingController() { ! ! public Object editingStarted(Node node) { ! return node.getProperty(NS.foaf + "name"); ! } ! ! public boolean editingFinished(Node node, Object value) { ! if (!((String)value).equals("")) { ! ((RDFNode)node).setProperty(NS.foaf + "name",(String)value); ! } ! return true; ! } ! ! public void editingAborted(Node node) { ! } ! } ); editor.startEditing(); - graphPane.getFilteredGraph().notifyPropertyChanged(); - graphPane.repaint(); } }); --- 136,141 ---- public void resourceChanged(String resource) { newNode.setType(resource); ! TextFieldInPlaceNodeEditor editor = new TextFieldInPlaceNodeEditor(graphPane, newNode, GraphlManipulator.this); editor.startEditing(); } }); *************** *** 161,166 **** menu.add(nodeTypeMenu); menu.show(graphPane, e.getX(), e.getY()); - - //graphPane.getGraph().notifyLayoutUpdated(); } else if (clickNode != null) { --- 144,147 ---- *************** *** 171,175 **** else if (clickEdge != null) { if ( clickEdge.getCurrentPainter().isPointInLabel(graphPane, clickEdge, p)){ ! //TODO (2): show in-place editor for edge } else { --- 152,156 ---- else if (clickEdge != null) { if ( clickEdge.getCurrentPainter().isPointInLabel(graphPane, clickEdge, p)){ ! // in-place editor for edge ? } else { *************** *** 246,255 **** if (overNode!=null && overNode!=edgeNode) { // we also allow multiple edges between two nodes! ! RDFEdge edge = new RDFEdge(edgeNode, overNode); edge.setSource(NS.graphl + "USER"); ! graphPane.getFilteredGraph().addElements(null, Collections.singleton(edge)); } else if ( overNode!=edgeNode ) { ! Node newNode = graphPane.getFilteredGraph().createNode(); newNode.setCenter(p.getX(), p.getY()); Edge edge = graphPane.getFilteredGraph().createEdge(edgeNode, newNode); --- 227,249 ---- if (overNode!=null && overNode!=edgeNode) { // we also allow multiple edges between two nodes! ! // TODO (2) Edge, Node constructors should be package protected and accessed only via facotry methods in Graph ! final RDFEdge edge = new RDFEdge(edgeNode, overNode); edge.setSource(NS.graphl + "USER"); ! ! TypeMenu edgeTypeMenu = new TypeMenu("New Edge", graphPane.getVocabularies()); ! edgeTypeMenu.updateMenu(TypeMenu.PROPERTIES); ! edgeTypeMenu.addResourceListener(new ResourceListener() { ! public void resourceChanged(String resource) { ! edge.setType(resource); ! graphPane.getFilteredGraph().addElements(null, Collections.singleton(edge)); ! } ! }); ! ! JPopupMenu menu = new JPopupMenu(); ! menu.add(edgeTypeMenu); ! menu.show(graphPane, e.getX(), e.getY()); } else if ( overNode!=edgeNode ) { ! final Node newNode = graphPane.getFilteredGraph().createNode(); newNode.setCenter(p.getX(), p.getY()); Edge edge = graphPane.getFilteredGraph().createEdge(edgeNode, newNode); *************** *** 258,265 **** graphPane.screenToGraphPoint(dragStart,d); // TODO (3) length should be mapped to arbitrary property! ! ((DefaultEdge)edge).setLength(dragStart.distance(d)); ((DefaultGraph)graphPane.getSourceGraph()).addElements(Collections.singleton(newNode), Collections.singleton(edge)); ! TextFieldInPlaceNodeEditor editor = new TextFieldInPlaceNodeEditor(graphPane, newNode, this); ! editor.startEditing(); } --- 252,271 ---- graphPane.screenToGraphPoint(dragStart,d); // TODO (3) length should be mapped to arbitrary property! ! //((DefaultEdge)edge).setLength(dragStart.distance(d)); ((DefaultGraph)graphPane.getSourceGraph()).addElements(Collections.singleton(newNode), Collections.singleton(edge)); ! ! TypeMenu nodeTypeMenu = new TypeMenu("New Node", graphPane.getVocabularies()); ! nodeTypeMenu.updateMenu(TypeMenu.CLASSES); ! nodeTypeMenu.addResourceListener(new ResourceListener() { ! public void resourceChanged(String resource) { ! newNode.setType(resource); ! TextFieldInPlaceNodeEditor editor = new TextFieldInPlaceNodeEditor(graphPane, newNode, GraphlManipulator.this); ! editor.startEditing(); ! } ! }); ! ! JPopupMenu menu = new JPopupMenu(); ! menu.add(nodeTypeMenu); ! menu.show(graphPane, e.getX(), e.getY()); } *************** *** 284,287 **** --- 290,294 ---- moved = true; graphPane.getFilteredGraph().notifyLayoutUpdated(); + //graphPane.repaint(); } // else if (dragEdge != null) { |
From: Flo L. <fl...@us...> - 2005-09-07 12:30:15
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25832/src/org/mediavirus/graphl/gui Modified Files: TextFieldInPlaceNodeEditor.java InPlaceNodeEditor.java Log Message: - FEATURE: type menu pops up upon edge creation - BUG: fixed assignment of unique ids to new nodes - BUG: fixed in-place editor for nodes - CODE: loading graphs is now synchronized to avoid loading conflicts - CODE: restoring Graphics transform in GraphlPane after rendering Index: TextFieldInPlaceNodeEditor.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/gui/TextFieldInPlaceNodeEditor.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TextFieldInPlaceNodeEditor.java 24 Aug 2005 16:11:15 -0000 1.3 --- TextFieldInPlaceNodeEditor.java 7 Sep 2005 12:29:55 -0000 1.4 *************** *** 8,11 **** --- 8,13 ---- import java.awt.event.KeyEvent; import java.awt.event.KeyListener; + import java.awt.geom.Point2D; + import javax.swing.JComponent; import javax.swing.JTextField; *************** *** 14,18 **** import org.mediavirus.graphl.graph.Node; - /** * Provides in-place editing of nodes using a text component. --- 16,19 ---- *************** *** 75,79 **** if (nodeBounds.width < 150) nodeBounds.width = 100; if (nodeBounds.height < 15) nodeBounds.height = 15; ! m_component.setLocation(nodeBounds.x-4,nodeBounds.y-4); m_component.setSize(nodeBounds.width+8,nodeBounds.height+8); } --- 76,82 ---- if (nodeBounds.width < 150) nodeBounds.width = 100; if (nodeBounds.height < 15) nodeBounds.height = 15; ! Point2D dst = nodeBounds.getLocation(); ! m_graphPane.getTransform().transform(dst,dst); ! m_component.setLocation((int)dst.getX()-4,(int)dst.getY()-4); m_component.setSize(nodeBounds.width+8,nodeBounds.height+8); } *************** *** 107,110 **** --- 110,114 ---- */ public void keyTyped(KeyEvent e) { + //System.out.println("position: " + m_component.getX() + " : " + m_component.getY()); } /** *************** *** 114,117 **** --- 118,122 ---- */ public void keyPressed(KeyEvent e) { + //m_component.repaint(); if (e.getKeyCode()==KeyEvent.VK_ESCAPE) abortEditing(); Index: InPlaceNodeEditor.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/gui/InPlaceNodeEditor.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** InPlaceNodeEditor.java 5 Sep 2005 15:47:18 -0000 1.4 --- InPlaceNodeEditor.java 7 Sep 2005 12:29:55 -0000 1.5 *************** *** 156,164 **** m_initialValue=m_nodeEditingController.editingStarted(m_node); setEditorComponentValue(m_component,m_initialValue); - updatePosition(); m_graphPane.add(m_component); editingStarting(m_component); m_graphPane.getFilteredGraph().addGraphListener(this); m_editingInProgress=true; } } --- 156,164 ---- m_initialValue=m_nodeEditingController.editingStarted(m_node); setEditorComponentValue(m_component,m_initialValue); m_graphPane.add(m_component); editingStarting(m_component); m_graphPane.getFilteredGraph().addGraphListener(this); m_editingInProgress=true; + updatePosition(); } } |
From: Flo L. <fl...@us...> - 2005-09-07 12:30:15
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/filter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25832/src/org/mediavirus/graphl/graph/filter Modified Files: FilteredGraph.java Log Message: - FEATURE: type menu pops up upon edge creation - BUG: fixed assignment of unique ids to new nodes - BUG: fixed in-place editor for nodes - CODE: loading graphs is now synchronized to avoid loading conflicts - CODE: restoring Graphics transform in GraphlPane after rendering Index: FilteredGraph.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/filter/FilteredGraph.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FilteredGraph.java 5 Sep 2005 15:44:07 -0000 1.3 --- FilteredGraph.java 7 Sep 2005 12:29:55 -0000 1.4 *************** *** 16,20 **** import org.mediavirus.graphl.graph.GraphListener; import org.mediavirus.graphl.graph.Node; - import org.mediavirus.graphl.vocabulary.NS; /** --- 16,19 ---- *************** *** 125,131 **** for (Iterator edgesI = edges.iterator(); edgesI.hasNext();) { Edge edge = (Edge) edgesI.next(); - if (edge.getType().equals(NS.rdfs + "subClassOf") && edge.getTo().getId().equals("http://xmlns.com/wordnet/1.6/Person")) { - System.out.println("foo"); - } if (filterEdge(edge, sourceGraph)) filteredEdges.add(edge); } --- 124,127 ---- |
From: Flo L. <fl...@us...> - 2005-09-07 12:30:15
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25832/src/org/mediavirus/graphl Modified Files: GraphlPane.java Log Message: - FEATURE: type menu pops up upon edge creation - BUG: fixed assignment of unique ids to new nodes - BUG: fixed in-place editor for nodes - CODE: loading graphs is now synchronized to avoid loading conflicts - CODE: restoring Graphics transform in GraphlPane after rendering Index: GraphlPane.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/GraphlPane.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** GraphlPane.java 5 Sep 2005 15:46:38 -0000 1.20 --- GraphlPane.java 7 Sep 2005 12:29:55 -0000 1.21 *************** *** 201,204 **** --- 201,206 ---- g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + AffineTransform oldTrans = g2.getTransform(); + if (transform != null) { g2.transform(transform); *************** *** 261,264 **** --- 263,267 ---- //if (renderDuration > 0) System.out.println("render time: " + renderDuration + " FPS: " + 1000.0/renderDuration); } + g2.setTransform(oldTrans); } *************** *** 303,307 **** } ! public void graphLayoutUpdated(Graph graph) { } public void graphUpdated(Graph graph) {} --- 306,312 ---- } ! public void graphLayoutUpdated(Graph graph) { ! repaint(); ! } public void graphUpdated(Graph graph) {} |
From: Flo L. <fl...@us...> - 2005-09-07 12:16:45
|
Update of /cvsroot/graphl/graphl/graphs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23259/graphs Modified Files: test.rdf Log Message: testing Index: test.rdf =================================================================== RCS file: /cvsroot/graphl/graphl/graphs/test.rdf,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** test.rdf 5 Sep 2005 15:38:45 -0000 1.6 --- test.rdf 7 Sep 2005 12:16:30 -0000 1.7 *************** *** 32,57 **** rdfs:label="Person"/> <foaf:Person rdf:ID="genid1" ! foaf:firstName="Patrizia" ! foaf:gender="female" ! foaf:name="Padme Pistazie" ! foaf:surname="Wiesner" ! foaf:nick="padme"> <foaf:knows rdf:resource="#genid2"/> <foaf:knows rdf:resource="#genid4"/> <foaf:knows rdf:resource="#genid5"/> ! <graphl:connectedTo rdf:resource="#genid0"/> </foaf:Person> <foaf:Person rdf:ID="genid2" ! foaf:name="Sue"> <foaf:knows rdf:resource="#genid3"/> </foaf:Person> - <foaf:Person rdf:ID="genid3" - foaf:name="Axel Goldmann"/> <foaf:Person rdf:ID="genid4" foaf:name="Flo"/> <foaf:Person rdf:ID="genid5" foaf:name="Flo Ledermann"/> ! <rdf:Description rdf:ID="genid0" ! foaf:name="a"/> </rdf:RDF> --- 32,62 ---- rdfs:label="Person"/> <foaf:Person rdf:ID="genid1" ! foaf:name="Maxi"> <foaf:knows rdf:resource="#genid2"/> <foaf:knows rdf:resource="#genid4"/> <foaf:knows rdf:resource="#genid5"/> ! <graphl:connectedTo rdf:resource="#genid6"/> ! <foaf:knows rdf:resource="#genid7"/> </foaf:Person> <foaf:Person rdf:ID="genid2" ! foaf:name="Susi"> <foaf:knows rdf:resource="#genid3"/> </foaf:Person> <foaf:Person rdf:ID="genid4" foaf:name="Flo"/> <foaf:Person rdf:ID="genid5" foaf:name="Flo Ledermann"/> ! <foaf:Person rdf:ID="genid6" ! foaf:name="foo"> ! <foaf:knows rdf:resource="#genid7"/> ! </foaf:Person> ! <foaf:Person rdf:ID="genid7" ! foaf:name="bar"/> ! <foaf:Person rdf:ID="genid3" ! foaf:name="Fooooo"/> ! <foaf:Person rdf:ID="genid112" ! foaf:name="baz"> ! <foaf:knows rdf:resource="#genid7"/> ! </foaf:Person> </rdf:RDF> |
From: Flo L. <fl...@us...> - 2005-09-07 12:08:30
|
Update of /cvsroot/graphl/graphl/graphs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20954/graphs Modified Files: foaf-flo.rdf Log Message: extended my foaf file with graphl!! yeah! Index: foaf-flo.rdf =================================================================== RCS file: /cvsroot/graphl/graphl/graphs/foaf-flo.rdf,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** foaf-flo.rdf 24 Aug 2005 16:08:56 -0000 1.1 --- foaf-flo.rdf 7 Sep 2005 12:08:19 -0000 1.2 *************** *** 3,11 **** --- 3,15 ---- <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> <!ENTITY foaf 'http://xmlns.com/foaf/0.1/'> + <!ENTITY foo 'http://www.mediavirus.org/foo#'> <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> <!ENTITY map 'http://fabl.net/vocabularies/geography/map/1.1/'> <!ENTITY owl 'http://www.w3.org/2002/07/owl#'> <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'> + <!ENTITY vs 'http://www.w3.org/2003/06/sw-vocab-status/ns#'> + <!ENTITY wot 'http://xmlns.com/wot/0.1/'> <!ENTITY geo 'http://www.w3.org/2003/01/geo/wgs84_pos#'> + <!ENTITY dc 'http://purl.org/dc/elements/1.1/'> ]> *************** *** 13,22 **** xmlns:graphl="&graphl;" xmlns:foaf="&foaf;" xmlns:rdf="&rdf;" xmlns:map="↦" xmlns:owl="&owl;" xmlns:rdfs="&rdfs;" ! xmlns:geo="&geo;"> <foaf:Person rdf:ID="genid1" foaf:firstName="Florian" --- 17,54 ---- xmlns:graphl="&graphl;" xmlns:foaf="&foaf;" + xmlns:foo="&foo;" xmlns:rdf="&rdf;" xmlns:map="↦" xmlns:owl="&owl;" xmlns:rdfs="&rdfs;" ! xmlns:vs="&vs;" ! xmlns:wot="&wot;" ! xmlns:geo="&geo;" ! xmlns:dc="&dc;"> + <rdf:Description rdf:about="&foaf;Person" + rdfs:comment="A person." + vs:term_status="testing" + rdfs:label="Person"/> + <rdf:Description rdf:about="&foaf;Document" + rdfs:comment="A document." + vs:term_status="testing" + rdfs:label="Document"/> + <rdf:Description rdf:about="&foaf;Organization" + rdfs:comment="An organization." + vs:term_status="unstable" + rdfs:label="Organization"/> + <rdf:Description rdf:about="&foaf;Project" + vs:term_status="unstable" + rdfs:comment="A project (a collective endeavour of some kind)." + rdfs:label="Project"/> + <rdf:Description rdf:about="&foaf;Group" + vs:term_status="unstable" + rdfs:comment="A class of Agents." + rdfs:label="Group"/> + <rdf:Description rdf:about="&foaf;Image" + vs:term_status="testing" + rdfs:comment="An image." + rdfs:label="Image"/> <foaf:Person rdf:ID="genid1" foaf:firstName="Florian" *************** *** 40,44 **** <foaf:pastProject rdf:resource="#genid7"/> <foaf:pastProject rdf:resource="#genid8"/> - <foaf:pastProject rdf:resource="#genid9"/> <foaf:pastProject rdf:resource="#genid10"/> <foaf:knows rdf:resource="#genid11"/> --- 72,75 ---- *************** *** 53,56 **** --- 84,93 ---- <foaf:knows rdf:resource="#genid1"/> <foaf:knows rdf:resource="#genid1"/> + <foaf:made rdf:resource="http://www.mudfuzz.com/"/> + <foaf:currentProject rdf:resource="#genid114"/> + <foaf:knows rdf:resource="#genid115"/> + <foaf:member rdf:resource="#genid121"/> + <foaf:knows rdf:resource="#genid125"/> + <foaf:knows rdf:resource="#genid129"/> </foaf:Person> <foaf:Image rdf:about="http://www.ims.tuwien.ac.at/~flo/images/flo.jpg"/> *************** *** 58,96 **** <foaf:Document rdf:about="http://www.ims.tuwien.ac.at/"/> <foaf:Document rdf:about="http://www.ims.tuwien.ac.at/~flo"/> ! <foaf:Project rdf:ID="genid2" foaf:name="Mozilla"> <foaf:homepage rdf:resource="http://www.mozilla.org/"/> </foaf:Project> ! <foaf:Project rdf:ID="genid3" foaf:name="FOAF"> <foaf:homepage rdf:resource="http://rdfweb.org/"/> ! </foaf:Project> ! <foaf:Project rdf:ID="genid4" foaf:name="Studierstube"> <foaf:homepage rdf:resource="http://www.studierstube.org/"/> ! </foaf:Project> ! <foaf:Project rdf:ID="genid5" foaf:name="Wind Machines"> <foaf:homepage rdf:resource="http://www.greeleynet.com/~cmorrison/WindMachine.html"/> ! </foaf:Project> ! <foaf:Project rdf:ID="genid6" foaf:name="APRIL"> <foaf:homepage rdf:resource="http://www.studierstube.org/APRIL/"/> ! </foaf:Project> ! <foaf:Project rdf:ID="genid7" foaf:name="The Virtual Showcase"> <foaf:homepage rdf:resource="http://www.studierstube.org/virtualshowcase/"/> ! </foaf:Project> ! <foaf:Project rdf:ID="genid8" foaf:name="mprox"> <foaf:homepage rdf:resource="http://mprox.subnet.at/"/> ! </foaf:Project> ! <foaf:Project rdf:ID="genid9" foaf:name="Mudfuzz"> ! <foaf:homepage rdf:resource="http://www.mudfuzz.com/"/> ! </foaf:Project> ! <foaf:Project rdf:ID="genid10" foaf:name="subnet"> <foaf:homepage rdf:resource="http://www.subnet.at/"/> </foaf:Project> <foaf:Person rdf:ID="genid11" ! foaf:name="Axel Goldmann"/> <foaf:Person rdf:ID="genid12" ! foaf:name="Ruediger Suppin"/> <foaf:Person rdf:ID="genid13" foaf:name="Bruno Randolf"> <foaf:pastProject rdf:resource="#genid10"/> <foaf:pastProject rdf:resource="#genid8"/> </foaf:Person> <foaf:Person rdf:ID="genid15" --- 95,145 ---- <foaf:Document rdf:about="http://www.ims.tuwien.ac.at/"/> <foaf:Document rdf:about="http://www.ims.tuwien.ac.at/~flo"/> ! <foaf:Project rdf:ID="genid2" ! foaf:name="Mozilla"> <foaf:homepage rdf:resource="http://www.mozilla.org/"/> </foaf:Project> ! <foaf:Project rdf:ID="genid3" ! foaf:name="FOAF"> <foaf:homepage rdf:resource="http://rdfweb.org/"/> ! </foaf:Project> ! <foaf:Project rdf:ID="genid4" ! foaf:name="Studierstube"> <foaf:homepage rdf:resource="http://www.studierstube.org/"/> ! </foaf:Project> ! <foaf:Project rdf:ID="genid5" ! foaf:name="Wind Machines"> <foaf:homepage rdf:resource="http://www.greeleynet.com/~cmorrison/WindMachine.html"/> ! </foaf:Project> ! <foaf:Project rdf:ID="genid6" ! foaf:name="APRIL"> <foaf:homepage rdf:resource="http://www.studierstube.org/APRIL/"/> ! <graphl:connectedTo rdf:resource="#genid4"/> ! </foaf:Project> ! <foaf:Project rdf:ID="genid7" ! foaf:name="The Virtual Showcase"> <foaf:homepage rdf:resource="http://www.studierstube.org/virtualshowcase/"/> ! <graphl:connectedTo rdf:resource="#genid4"/> ! </foaf:Project> ! <foaf:Project rdf:ID="genid8" ! foaf:name="mprox"> <foaf:homepage rdf:resource="http://mprox.subnet.at/"/> ! </foaf:Project> ! <foaf:Project rdf:ID="genid10" ! foaf:name="subnet"> <foaf:homepage rdf:resource="http://www.subnet.at/"/> </foaf:Project> <foaf:Person rdf:ID="genid11" ! foaf:name="Axel Goldmann"> ! <foaf:knows rdf:resource="#genid116"/> ! </foaf:Person> <foaf:Person rdf:ID="genid12" ! foaf:name="Ruediger Suppin"> ! <foaf:member rdf:resource="#genid119"/> ! </foaf:Person> <foaf:Person rdf:ID="genid13" foaf:name="Bruno Randolf"> <foaf:pastProject rdf:resource="#genid10"/> <foaf:pastProject rdf:resource="#genid8"/> + <foaf:currentProject rdf:resource="#genid113"/> </foaf:Person> <foaf:Person rdf:ID="genid15" *************** *** 100,120 **** <foaf:knows rdf:resource="#genid11"/> <foaf:pastProject rdf:resource="#genid9"/> </foaf:Person> <foaf:Person rdf:ID="genid17" foaf:name="David Baum"> <foaf:knows rdf:resource="#genid12"/> </foaf:Person> <foaf:Person rdf:ID="genid18" foaf:name="Tamer Fahmy"> <foaf:knows rdf:resource="#genid20"/> ! <foaf:currentProject rdf:resource="#genid4"/> </foaf:Person> <foaf:Person rdf:ID="genid19" foaf:name="Michael Kalkusch"> <foaf:knows rdf:resource="#genid18"/> </foaf:Person> <foaf:Person rdf:ID="genid20" foaf:name="Gerhard Reitmayr"> <foaf:workplaceHomepage rdf:resource="http://www.ims.tuwien.ac.at/"/> <foaf:currentProject rdf:resource="#genid4"/> </foaf:Person> --- 149,191 ---- <foaf:knows rdf:resource="#genid11"/> <foaf:pastProject rdf:resource="#genid9"/> + <foaf:currentProject rdf:resource="#genid112"/> </foaf:Person> <foaf:Person rdf:ID="genid17" foaf:name="David Baum"> <foaf:knows rdf:resource="#genid12"/> + <foaf:member rdf:resource="#genid122"/> </foaf:Person> <foaf:Person rdf:ID="genid18" foaf:name="Tamer Fahmy"> <foaf:knows rdf:resource="#genid20"/> ! <foaf:pastProject rdf:resource="#genid4"/> ! <foaf:member rdf:resource="#genid126"/> ! <foaf:knows rdf:resource="#genid128"/> </foaf:Person> <foaf:Person rdf:ID="genid19" foaf:name="Michael Kalkusch"> <foaf:knows rdf:resource="#genid18"/> + <foaf:member rdf:resource="#genid124"/> </foaf:Person> <foaf:Person rdf:ID="genid20" foaf:name="Gerhard Reitmayr"> <foaf:workplaceHomepage rdf:resource="http://www.ims.tuwien.ac.at/"/> + <foaf:pastProject rdf:resource="#genid4"/> + </foaf:Person> + <foaf:Document rdf:about="http://www.mudfuzz.com/"/> + <foaf:Project rdf:ID="genid114" + foaf:name="graphl"/> + <foaf:Person rdf:ID="genid115" + foaf:name="Padme Pistazie"> + <foaf:knows rdf:resource="#genid116"/> + </foaf:Person> + <foaf:Group rdf:ID="genid121" + foaf:name="Interactive Media Systems Group"> + <foaf:member rdf:resource="#genid120"/> + <foaf:homepage rdf:resource="http://www.ims.tuwien.ac.at/~flo"/> + </foaf:Group> + <foaf:Person rdf:ID="genid125" + foaf:name="Dieter Schmalstieg"> + <foaf:currentProject rdf:resource="#genid124"/> <foaf:currentProject rdf:resource="#genid4"/> </foaf:Person> *************** *** 126,131 **** <foaf:Document rdf:about="http://www.studierstube.org/virtualshowcase/"/> <foaf:Document rdf:about="http://mprox.subnet.at/"/> - <foaf:Document rdf:about="http://www.mudfuzz.com/"/> <foaf:Document rdf:about="http://www.subnet.at/"/> </rdf:RDF> --- 197,241 ---- <foaf:Document rdf:about="http://www.studierstube.org/virtualshowcase/"/> <foaf:Document rdf:about="http://mprox.subnet.at/"/> <foaf:Document rdf:about="http://www.subnet.at/"/> + <foaf:Person rdf:ID="genid116" + foaf:name="Suso"/> + <foaf:Group rdf:ID="genid119" + foaf:name="Klasse Prix"> + <foaf:member rdf:resource="#genid118"/> + </foaf:Group> + <foaf:Project rdf:ID="genid113" + foaf:name="Meshcube"/> + <foaf:Project rdf:ID="genid9" + foaf:name="Mudfuzz"> + <foaf:homepage rdf:resource="http://www.mudfuzz.com/"/> + </foaf:Project> + <foaf:Project rdf:ID="genid112" + foaf:name="Monomania"/> + <foaf:Group rdf:ID="genid122" + foaf:name="Klasse Lynn"> + <foaf:member rdf:resource="#genid118"/> + </foaf:Group> + <foaf:Organization rdf:ID="genid126" + foaf:name="Systems in Motion"/> + <foaf:Person rdf:ID="genid128" + foaf:name="Kyrah"> + <foaf:member rdf:resource="#genid126"/> + </foaf:Person> + <foaf:Organization rdf:ID="genid124" + foaf:name="Institut fuer maschinelles Sehen und Darstellen"> + <foaf:member rdf:resource="#genid127"/> + </foaf:Organization> + <foaf:Organization rdf:ID="genid120" + foaf:name="Institute for Software Technology"> + <foaf:member rdf:resource="#genid117"/> + </foaf:Organization> + <foaf:Organization rdf:ID="genid118" + foaf:name="Die Angewandte"/> + <foaf:Organization rdf:ID="genid127" + foaf:name="TU Graz"/> + <foaf:Organization rdf:ID="genid117" + foaf:name="TU Wien"/> + <foaf:Person rdf:ID="genid129" + foaf:name="David Danzmayr"/> </rdf:RDF> |
From: Flo L. <fl...@us...> - 2005-09-07 11:48:02
|
Update of /cvsroot/graphl/graphl/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15256/config Modified Files: config.rdf Log Message: minor default config adjustment Index: config.rdf =================================================================== RCS file: /cvsroot/graphl/graphl/config/config.rdf,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** config.rdf 17 Aug 2005 15:52:53 -0000 1.14 --- config.rdf 7 Sep 2005 11:47:51 -0000 1.15 *************** *** 735,739 **** <graphl:EdgePainter graphl:javaClass="org.mediavirus.graphl.painter.StraightLineEdgePainter" ! graphl:paintArrow="true" graphl:paintLabel="false" graphl:stroke="1.5 5 5"> --- 735,739 ---- <graphl:EdgePainter graphl:javaClass="org.mediavirus.graphl.painter.StraightLineEdgePainter" ! graphl:paintArrow="false" graphl:paintLabel="false" graphl:stroke="1.5 5 5"> |
From: Flo L. <fl...@us...> - 2005-09-05 15:53:04
|
Update of /cvsroot/graphl/graphl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16283 Modified Files: changelog.txt Log Message: updated changelog Index: changelog.txt =================================================================== RCS file: /cvsroot/graphl/graphl/changelog.txt,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** changelog.txt 24 Aug 2005 16:12:56 -0000 1.15 --- changelog.txt 5 Sep 2005 15:52:53 -0000 1.16 *************** *** 2,5 **** --- 2,15 ---- ================== + 2005-09-05, f/0: + - FEATURE: updated save machanism to new multi-souurce paradigm + - BUG: FilteredGraph: corrected update behavior upon changes + - CODE: added methods to access filtered and unfiltered versions of the graph in GraphlPane + - CODE: added static method to RDFGraph to write arbitrary graph to RDF + - CODE: removed getLabel() method from GraphElements + - CODE: Node: added invertPin() method to update node if an edge is inverted + - DOC: added long-term todo list + + 2005-08-24, f/0: - FEATURE: files are now loaded in addition to existing graph |
From: Flo L. <fl...@us...> - 2005-09-05 15:52:34
|
Update of /cvsroot/graphl/graphl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16134 Added Files: todo.txt Log Message: added long-term todo list --- NEW FILE: todo.txt --- graphl projects: - rewrite Load, Save, ... to new global graph paradigm - performance optimization session - refactor into NodeView, EdgeView, GraphView (= FilteredGraph + GraphlPane features ?) - label genaration has to be solved properly - RDF stylesheets (property based layout)? |