103 |
|
|
104 |
public void deleteNote(String noteURI) |
public void deleteNote(String noteURI) |
105 |
throws RemoteException |
throws RemoteException |
106 |
{ synchronized(model) { |
{ synchronized(model) { try { |
107 |
/* |
/* |
108 |
// MUST DELETE ALL ASSOCS FIRST |
// MUST DELETE ALL ASSOCS FIRST |
109 |
|
|
139 |
// not implemented |
// not implemented |
140 |
// =============== |
// =============== |
141 |
|
|
142 |
|
Resource note = model.getResource(noteURI); |
143 |
|
|
144 |
}} |
} catch (RDFException e) { |
145 |
|
pa("Fault deleting a note: "+e); |
146 |
|
}}} |
147 |
|
|
148 |
public void moveNote(String noteURI, int x, int y) |
public void moveNote(String noteURI, int x, int y) |
149 |
throws RemoteException { synchronized(model) { |
throws RemoteException |
150 |
/* |
{ synchronized(model) { try { |
|
Cell note = space.getCell(noteId); |
|
|
Cell arg = note.s(d.pan); |
|
|
arg.setText("" + x); |
|
|
arg = arg.s(d.pan); |
|
|
arg.setText("" + y); |
|
|
*/ |
|
|
|
|
|
// not implemented |
|
|
// =============== |
|
151 |
|
|
152 |
|
Resource note = model.getResource(noteURI); |
153 |
|
if (note == null) return; |
154 |
|
|
155 |
}} |
// delete all old coords |
156 |
|
RDFNode empty = null; |
157 |
|
Selector selector = new SelectorImpl(note, PP.CoordX, empty); |
158 |
|
StmtIterator it = model.listStatements(selector); |
159 |
|
while (it.hasNext()) { |
160 |
|
Statement stmt = it.next(); |
161 |
|
p("deleting "+stmt); |
162 |
|
model.remove(stmt); |
163 |
|
} |
164 |
|
selector = new SelectorImpl(note, PP.CoordY, empty); |
165 |
|
it = model.listStatements(selector); |
166 |
|
while (it.hasNext()) { |
167 |
|
Statement stmt = it.next(); |
168 |
|
p("deleting "+stmt); |
169 |
|
model.remove(stmt); |
170 |
|
} |
171 |
|
|
172 |
|
// set coords |
173 |
|
note.addProperty(PP.CoordX, ""+x); |
174 |
|
note.addProperty(PP.CoordX, ""+x); |
175 |
|
} catch (RDFException e) { |
176 |
|
pa("Fault moving note: "+e); |
177 |
|
}}} |
178 |
|
|
179 |
|
|
180 |
public void assocNotes(String noteURI, int side, String assocURI) |
public void assocNotes(String noteURI, int side, String assocURI) |