/[fenfire]/fenfire/org/fenfire/modules/pp/lava/RSTActionsImpl.java
ViewVC logotype

Diff of /fenfire/org/fenfire/modules/pp/lava/RSTActionsImpl.java

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

revision 1.1 by mudyc, Wed May 14 12:32:53 2003 UTC revision 1.2 by mudyc, Fri May 23 14:26:07 2003 UTC
# Line 43  public static final String rcsid = "$Id$ Line 43  public static final String rcsid = "$Id$
43      public Object newRSTCanvas() throws RemoteException      public Object newRSTCanvas() throws RemoteException
44      { synchronized(fen) {      { synchronized(fen) {
45          if(dbg) p("make a new rst canvas");          if(dbg) p("make a new rst canvas");
46          Object canvas = RDFUtil.N(fen, RST.Canvas);          Object canvas = RDFUtil.N(fen.graph, RST.Canvas);
47          fen.graph.add(canvas, RDF.type, CANVAS2D.Canvas);          fen.graph.add(canvas, RDF.type, CANVAS2D.Canvas);
48          return canvas;          return canvas;
49      }}      }}
# Line 51  public static final String rcsid = "$Id$ Line 51  public static final String rcsid = "$Id$
51      public Object newParagraph(Object canvas, int width, int x, int y)      public Object newParagraph(Object canvas, int width, int x, int y)
52          throws RemoteException          throws RemoteException
53      { synchronized(fen) {      { synchronized(fen) {
54          if (! RDFUtil.isNodeType(fen, canvas, RST.Canvas))          if (! RDFUtil.isNodeType(fen.graph, canvas, RST.Canvas))
55              throw new Error("canvas is not canvas! "+canvas);              throw new Error("canvas is not canvas! "+canvas);
56          if (canvas == null) throw new Error("canvas is null!");          if (canvas == null) throw new Error("canvas is null!");
57          Object parag = RDFUtil.N(fen, RST.Paragraph);          Object parag = RDFUtil.N(fen.graph, RST.Paragraph);
58    
59          fen.graph.set1_11X(parag, RST.width, Nodes.getStringLiteral(""+width) );          fen.graph.set1_11X(parag, RST.width, Nodes.getStringLiteral(""+width) );
60    
# Line 73  public static final String rcsid = "$Id$ Line 73  public static final String rcsid = "$Id$
73      public Object newSentence(Object paragraph, int num)      public Object newSentence(Object paragraph, int num)
74          throws RemoteException          throws RemoteException
75      { synchronized(fen) {      { synchronized(fen) {
76          if (! RDFUtil.isNodeType(fen, paragraph, RST.Paragraph))          if (! RDFUtil.isNodeType(fen.graph, paragraph, RST.Paragraph))
77              throw new Error("paragraph is not paragraph! "+paragraph);              throw new Error("paragraph is not paragraph! "+paragraph);
78          Object senten = RDFUtil.N(fen, RST.Sentence);          Object senten = RDFUtil.N(fen.graph, RST.Sentence);
79    
80          if (num < 0) throw new Error("Num is too small"+num);          if (num < 0) throw new Error("Num is too small"+num);
81          else if (num == 0) {          else if (num == 0) {
# Line 119  public static final String rcsid = "$Id$ Line 119  public static final String rcsid = "$Id$
119      public void insertNode(Object sentence, Object node, int offset)      public void insertNode(Object sentence, Object node, int offset)
120          throws RemoteException          throws RemoteException
121      { synchronized(fen) {      { synchronized(fen) {
122          if (! RDFUtil.isNodeType(fen, sentence, RST.Sentence))          if (! RDFUtil.isNodeType(fen.graph, sentence, RST.Sentence))
123              throw new Error("sentence is not sentence! "+sentence);              throw new Error("sentence is not sentence! "+sentence);
124    
125          if (offset < 0) throw new Error("Offset is too small"+offset);          if (offset < 0) throw new Error("Offset is too small"+offset);
# Line 151  public static final String rcsid = "$Id$ Line 151  public static final String rcsid = "$Id$
151              if (next != null)              if (next != null)
152                  fen.graph.set1_11X(node, RST.nextNode, next);                  fen.graph.set1_11X(node, RST.nextNode, next);
153          }                    }          
154          if (! RDFUtil.isNodeType(fen, node, RST.Node))          if (! RDFUtil.isNodeType(fen.graph, node, RST.Node))
155              fen.graph.add(node, RDF.type, RST.Node);              fen.graph.add(node, RDF.type, RST.Node);
156    
157          Object canvas = util.getCanvas(          Object canvas = util.getCanvas(

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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