/[fenfire]/fenfire/org/fenfire/modules/pp/PPActionsImpl.java
ViewVC logotype

Diff of /fenfire/org/fenfire/modules/pp/PPActionsImpl.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by mudyc, Sun Mar 9 11:30:05 2003 UTC revision 1.11 by mudyc, Tue Mar 25 23:27:15 2003 UTC
# Line 88  public static final String rcsid = "$Id$ Line 88  public static final String rcsid = "$Id$
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    
# Line 217  public static final String rcsid = "$Id$ Line 217  public static final String rcsid = "$Id$
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      }}}      }}}

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26