/[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.5 by mudyc, Fri Mar 7 16:47:20 2003 UTC revision 1.6 by mudyc, Sat Mar 8 23:32:39 2003 UTC
# Line 103  public static final String rcsid = "$Id$ Line 103  public static final String rcsid = "$Id$
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    
# Line 139  public static final String rcsid = "$Id$ Line 139  public static final String rcsid = "$Id$
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)

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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