79 |
final Statement stmt = model.listStatements().next(); |
final Statement stmt = model.listStatements().next(); |
80 |
final GraphicsAPI api = GraphicsAPI.getInstance(); |
final GraphicsAPI api = GraphicsAPI.getInstance(); |
81 |
|
|
82 |
final Comparator order = new Comparator() { |
final Comparator subjOrder = new Comparator() { |
83 |
public int compare(Object o1, Object o2) { |
public int compare(Object o1, Object o2) { |
84 |
return o1.toString().compareTo(o2.toString()); |
Statement s1 = (Statement)o1, s2 = (Statement)o2; |
85 |
|
int cmp = s1.getPredicate().toString() |
86 |
|
.compareTo(s2.getPredicate().toString()); |
87 |
|
if(cmp == 0) |
88 |
|
cmp = s1.getSubject().toString() |
89 |
|
.compareTo(s2.getSubject().toString()); |
90 |
|
return cmp; |
91 |
} |
} |
92 |
}; |
}; |
93 |
|
final Comparator objOrder = new Comparator() { |
94 |
|
public int compare(Object o1, Object o2) { |
95 |
|
Statement s1 = (Statement)o1, s2 = (Statement)o2; |
96 |
|
int cmp = s1.getPredicate().toString() |
97 |
|
.compareTo(s2.getPredicate().toString()); |
98 |
|
if(cmp == 0) |
99 |
|
cmp = s1.getObject().toString() |
100 |
|
.compareTo(s2.getObject().toString()); |
101 |
|
return cmp; |
102 |
|
} |
103 |
|
}; |
104 |
|
|
105 |
final Cursor cursor = |
final Cursor cursor = |
106 |
new Cursor(order, stmt.getSubject(), 1, stmt.getObject()); |
new Cursor(subjOrder, objOrder, |
107 |
|
stmt.getSubject(), 1, stmt.getObject()); |
108 |
|
|
109 |
final TextStyle style = api.getTextStyle("Serif", 0, 12); |
final TextStyle style = api.getTextStyle("Serif", 0, 12); |
110 |
final NodeView nodeView = new NodeView() { |
final NodeView nodeView = new NodeView() { |