88 |
|
|
89 |
// set coords |
// set coords |
90 |
note.addProperty(PP.CoordX, ""+x); |
note.addProperty(PP.CoordX, ""+x); |
91 |
note.addProperty(PP.CoordX, ""+x); |
note.addProperty(PP.CoordY, ""+y); |
92 |
|
|
93 |
// set depth... |
// set depth... |
94 |
note.addProperty(PP.Depth, "5"); |
note.addProperty(PP.Depth, "10"); |
95 |
|
|
96 |
// scale etc.. XXX |
// scale etc.. XXX |
97 |
|
|
217 |
{ synchronized(model) { try { |
{ synchronized(model) { try { |
218 |
Resource note = model.getResource(noteURI); |
Resource note = model.getResource(noteURI); |
219 |
Resource assoc = model.getResource(assocURI); |
Resource assoc = model.getResource(assocURI); |
220 |
|
|
221 |
// check if already associated |
if (note == assoc) { |
222 |
Selector slctr = new SelectorImpl(note, PP.Association, assoc); |
pa("link to itself???"); |
|
StmtIterator iter = model.listStatements(slctr); |
|
|
if (iter.hasNext()) { |
|
|
pa("Already associated!"); |
|
223 |
return; |
return; |
224 |
} |
} |
225 |
|
|
226 |
// assoc |
if (side < 0) { |
227 |
note.addProperty(PP.Association, assoc); |
// check if already associated |
228 |
|
Selector slctr = new SelectorImpl(assoc, PP.Association, note); |
229 |
|
StmtIterator iter = model.listStatements(slctr); |
230 |
|
if (iter.hasNext()) { |
231 |
|
pa("Already associated!"); |
232 |
|
return; |
233 |
|
} |
234 |
|
|
235 |
|
// assoc |
236 |
|
assoc.addProperty(PP.Association, note); |
237 |
|
} else { |
238 |
|
// check if already associated |
239 |
|
Selector slctr = new SelectorImpl(note, PP.Association, assoc); |
240 |
|
StmtIterator iter = model.listStatements(slctr); |
241 |
|
if (iter.hasNext()) { |
242 |
|
pa("Already associated!"); |
243 |
|
return; |
244 |
|
} |
245 |
|
|
246 |
|
// assoc |
247 |
|
note.addProperty(PP.Association, assoc); |
248 |
|
} |
249 |
} catch (RDFException e) { |
} catch (RDFException e) { |
250 |
pa("Fault associationing notes: "+e); |
pa("Fault associationing notes: "+e); |
251 |
}}} |
}}} |