/[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.16 by mudyc, Tue Apr 15 18:09:18 2003 UTC revision 1.17 by tjl, Tue Apr 15 19:10:09 2003 UTC
# Line 18  public static final String rcsid = "$Id$ Line 18  public static final String rcsid = "$Id$
18      protected static void pa(String s) { System.out.println("PPActionsImpl: "+s); }      protected static void pa(String s) { System.out.println("PPActionsImpl: "+s); }
19    
20      private Fen fen = null;      private Fen fen = null;
21      public void setSwamp(Fen fen) { this.fen = fen; }      private AlphContent alphContent;
22        public void setSwamp(Fen fen) {
23            this.fen = fen;
24            this.alphContent = new AlphContent(fen);
25        }
26    
27      public PPActionsImpl(Fen fen)  throws RemoteException {      public PPActionsImpl(Fen fen)  throws RemoteException {
28          super();          super();
# Line 90  public static final String rcsid = "$Id$ Line 94  public static final String rcsid = "$Id$
94          // set depth...          // set depth...
95          fen.graph.set1_11X(note, PP.depth,  Nodes.getStringLiteral("10") );          fen.graph.set1_11X(note, PP.depth,  Nodes.getStringLiteral("10") );
96    
97            // Set text
98            alphContent.setText(note, text, true);
99    
100          // scale etc..  XXX          // scale etc..  XXX
101          return note.toString();          return note.toString();
102      }}      }}
# Line 215  public static final String rcsid = "$Id$ Line 222  public static final String rcsid = "$Id$
222    
223      public void insertText(String noteURI, int offs, String text)      public void insertText(String noteURI, int offs, String text)
224          throws RemoteException          throws RemoteException
225      { synchronized(fen) { //try {      { synchronized(fen) {
226              /*              alphContent.insertText(
227          Cell note = space.getCell(noteId);                      Nodes.get(noteURI), offs, text, true
228          note.insertText(offs, text);                      );
             */  
   
         /*  
         Resource note = model.getResource(noteURI);  
           
         // find actual data  
         Selector s =  
             new SelectorImpl(note, PP.LinkToContentRef, (RDFNode) null);  
         StmtIterator iter = model.listStatements(s);  
         Statement stmt = null;  
         while (iter.hasNext()) {  
             if (stmt != null) throw new Error("Too many data!!");  
             stmt = iter.next();  
         }  
   
         Resource data = (Resource) stmt.getObject();  
   
         // find literal  
         s = new SelectorImpl(data, PP.Data, (RDFNode) null);  
         iter = model.listStatements(s);  
         stmt = null;  
         while (iter.hasNext()) {  
             if (stmt != null) throw new Error("Too many data!!");  
             stmt = iter.next();  
         }  
   
         StringBuffer str = new StringBuffer(stmt.getObject().toString());  
         model.remove(stmt);  
         str.insert(offs, text);  
         data.addProperty(PP.Data, str.toString());  
   
     } catch (RDFException e) {  
         pa("Fault inserting text to note: "+e);  
     }   */  
229      }}      }}
230    
231    
232      public void deleteText(String noteURI, int begin, int end)      public void deleteText(String noteURI, int begin, int end)
233          throws RemoteException          throws RemoteException
234      { synchronized(fen) { // try {      { synchronized(fen) {
235              /*              alphContent.deleteText(
236          Cell note = space.getCell(noteId);                      Nodes.get(noteURI), begin, end);
         note.deleteText(begin, end);  
             */  
   
         /*  
         Resource note = model.getResource(noteURI);  
           
         // find actual data  
         Selector s =  
             new SelectorImpl(note, PP.LinkToContentRef, (RDFNode) null);  
         StmtIterator iter = model.listStatements(s);  
         Statement stmt = null;  
         while (iter.hasNext()) {  
             if (stmt != null) throw new Error("Too many data!!");  
             stmt = iter.next();  
         }  
   
         Resource data = (Resource) stmt.getObject();  
   
         // find literal  
         s = new SelectorImpl(data, PP.Data, (RDFNode) null);  
         iter = model.listStatements(s);  
         stmt = null;  
         while (iter.hasNext()) {  
             if (stmt != null) throw new Error("Too many data!!");  
             stmt = iter.next();  
         }  
   
         StringBuffer str = new StringBuffer(stmt.getObject().toString());  
         model.remove(stmt);  
         str.delete(begin, end);  
         data.addProperty(PP.Data, str.toString());  
   
     } catch (RDFException e) {  
         pa("Fault deleting text from the note: "+e);  
     }  
         */  
237      }}      }}
238  }  }

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

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