[Idrs-commit] CVS: Idrs/dev/src/net/sourceforge/idrs/deploy/compile/units IfChange.java,NONE,1.1 IfR
Brought to you by:
bigman921
|
From: Marc B. <big...@us...> - 2002-03-04 23:05:39
|
Update of /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/compile/units
In directory usw-pr-cvs1:/tmp/cvs-serv28790/src/net/sourceforge/idrs/deploy/compile/units
Modified Files:
Body.java Constructor.java Db.java Head.java Method.java
Object.java Repeat.java Rml.java SQL.java StoredProc.java
VarList.java
Added Files:
IfChange.java IfResults.java No.java Yes.java
Log Message:
Completed initial xml compilation system
--- NEW FILE: IfChange.java ---
/*
IfChange.java
Copyright (C) 2002 Marc Boorshtein
The contents of this file are subject to the Mozilla Public License Version 1.0 (the License);
you may not use this file except in compliance with the License. You may obtain a copy of the
License at http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific
language governing rights and limitations under the License.
*/
/**
*Implements IfChange tag
*/
package net.sourceforge.idrs.deploy.compile.units;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
import javax.xml.parsers.*;
import java.util.*;
import net.sourceforge.idrs.core.report.*;
import net.sourceforge.idrs.deploy.compile.Compiler;
import net.sourceforge.idrs.deploy.compile.CompilerState;
public class IfChange extends net.sourceforge.idrs.deploy.compile.units.Body {
IfChangeChunk ifck;
/** Creates new IfChange */
public IfChange() {
}
/**
* allows for the execution of any wrap-up code at the hitting of the end tag
*/
public void seal() throws Exception {
if (! state.isLineNull())
state.sealLine();
Vector lines = state.popLines();
this.ifck.setLines(lines);
ifck.seal();
state.setLine(ifck);
state.sealLine();
}
/**
* allows for the compiler to work with the current state of the page compilation
*/
public void setState(CompilerState state) throws Exception {
this.state = state;
if (! state.isLineNull())
state.sealLine();
state.pushLines();
}
/**
* allows for a compiler to use the attributes of the calling tag
*/
public void setAttributes(Attributes atts) throws Exception {
this.atts = atts;
String fieldname = atts.getValue("field");
String dbname = fieldname.substring(0,fieldname.indexOf("."));
System.out.println("IfChange DbName : " + dbname);
fieldname = fieldname.substring(fieldname.indexOf(".") + 1);
System.out.println("IfChange FieldName : " + fieldname);
ifck = new IfChangeChunk(dbname,fieldname);
state.getReport().getBody().regIfChange(ifck);
}
}
--- NEW FILE: IfResults.java ---
/*
IfResults.java
Copyright (C) 2002 Marc Boorshtein
The contents of this file are subject to the Mozilla Public License Version 1.0 (the License);
you may not use this file except in compliance with the License. You may obtain a copy of the
License at http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific
language governing rights and limitations under the License.
*/
/**
*Implements IfResults tag
*/
package net.sourceforge.idrs.deploy.compile.units;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
import javax.xml.parsers.*;
import java.util.*;
import net.sourceforge.idrs.core.report.*;
import net.sourceforge.idrs.deploy.compile.Compiler;
import net.sourceforge.idrs.deploy.compile.CompilerState;
public class IfResults extends net.sourceforge.idrs.deploy.compile.Compiler {
net.sourceforge.idrs.core.report.IfResultsChunk ifrs;
/** Creates new IfResults */
public IfResults() {
}
/**
*Retrieves the IfResults chunk
*/
public IfResultsChunk getIfResults() {
return this.ifrs;
}
/**
* allows for a compiler to use the attributes of the calling tag
*/
public void setAttributes(Attributes atts) throws Exception {
super.setAttributes(atts);
ifrs = new IfResultsChunk(atts.getValue("db"));
}
/**
* allows for the compiler to work with the current state of the page compilation
*/
public void setState(CompilerState state) throws Exception {
super.setState(state);
if (! state.isLineNull())
state.sealLine();
this.state = state;
}
/**
* allows for the execution of any wrap-up code at the hitting of the end tag
*/
public void seal() throws Exception {
state.setLine(ifrs);
state.sealLine();
ifrs.seal();
}
}
--- NEW FILE: No.java ---
/*
Head.java
Copyright (C) 2002 Marc Boorshtein
The contents of this file are subject to the Mozilla Public License Version 1.0 (the License);
you may not use this file except in compliance with the License. You may obtain a copy of the
License at http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific
language governing rights and limitations under the License.
*/
/**
*Implements No tag
*/
package net.sourceforge.idrs.deploy.compile.units;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
import javax.xml.parsers.*;
import java.util.*;
import net.sourceforge.idrs.core.report.*;
import net.sourceforge.idrs.deploy.compile.Compiler;
import net.sourceforge.idrs.deploy.compile.CompilerState;
public class No extends net.sourceforge.idrs.deploy.compile.units.Yes {
/** Creates new No */
public No() {
}
}
--- NEW FILE: Yes.java ---
/*
Yes.java
Copyright (C) 2002 Marc Boorshtein
The contents of this file are subject to the Mozilla Public License Version 1.0 (the License);
you may not use this file except in compliance with the License. You may obtain a copy of the
License at http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific
language governing rights and limitations under the License.
*/
/**
*Implements Yes tag
*/
package net.sourceforge.idrs.deploy.compile.units;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
import javax.xml.parsers.*;
import java.util.*;
import net.sourceforge.idrs.core.report.*;
import net.sourceforge.idrs.deploy.compile.Compiler;
import net.sourceforge.idrs.deploy.compile.CompilerState;
public class Yes extends net.sourceforge.idrs.deploy.compile.units.Body {
/** Creates new Yes */
public Yes() {
}
/**
* allows for a compiler to use the attributes of the calling tag
*/
public void setAttributes(Attributes atts) throws Exception {
this.atts=atts;
}
/**
* allows for the compiler to work with the current state of the page compilation
*/
public void setState(CompilerState state) throws Exception {
this.state=state;
state.pushLines();
}
/**
* allows for the execution of any wrap-up code at the hitting of the end tag
*/
public void seal() throws Exception {
state.sealLine();
Vector lines = state.popLines();
IfResultsChunk ifrs = ((IfResults) state.peekNode()).getIfResults();
ifrs.setLines(lines);
}
}
Index: Body.java
===================================================================
RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/compile/units/Body.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Body.java 27 Feb 2002 23:56:31 -0000 1.1
--- Body.java 4 Mar 2002 23:05:35 -0000 1.2
***************
*** 1,8 ****
/*
! * Body.java
! *
! * Created on February 12, 2002, 12:56 PM
*/
-
package net.sourceforge.idrs.deploy.compile.units;
--- 1,14 ----
/*
! Body.java
! Copyright (C) 2002 Marc Boorshtein
!
! The contents of this file are subject to the Mozilla Public License Version 1.0 (the License);
! you may not use this file except in compliance with the License. You may obtain a copy of the
! License at http://www.mozilla.org/MPL/
!
! Software distributed under the License is distributed on an "AS IS" basis,
! WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific
! language governing rights and limitations under the License.
*/
package net.sourceforge.idrs.deploy.compile.units;
***************
*** 17,23 ****
/**
! *
! * @author mlb
! * @version
*/
public class Body extends net.sourceforge.idrs.deploy.compile.Compiler {
--- 23,27 ----
/**
! *Implements the RML body tag
*/
public class Body extends net.sourceforge.idrs.deploy.compile.Compiler {
***************
*** 26,64 ****
public Body() {
}
!
/**
*allows for a compiler to use the attributes of the calling tag
*/
public void setAttributes(Attributes atts) throws Exception {
!
super.setAttributes(atts);
!
! state.sealLine();
if (state.getReport().getBody().isHTML()) {
Line line = state.getCurrentLine();
! line.addChunk(new net.sourceforge.idrs.core.report.TextChunk("<BODY "));
for (int i=0,m=atts.getLength();i<m;i++) {
! line.addChunk(new TextChunk(atts.getLocalName(i) + "=\"" + atts.getValue(i) + "\" "));
}
! line.addChunk(new TextChunk(">"));
state.sealLine();
}
!
!
}
!
!
!
public void useMethod(String val,Attributes atts) throws Exception {
!
String objid = atts.getValue("objid");
String varlistId = atts.getValue("varlist");
LinkedList varList = (LinkedList) ((HashMap) state.getAttribute("IDRS_VAR_LISTS")).get(varlistId);
Line curr = state.getCurrentLine();
!
curr.addChunk(new ObjectChunk(val,varList.toArray(),varlistId,objid));
!
}
!
public void field(String val,Attributes atts) throws Exception {
String format = atts.getValue("format");
--- 30,79 ----
public Body() {
}
!
! /**
! *allows for the compiler to work with the current state of the page compilation
! */
! public void setState(CompilerState state) throws Exception {
! super.setState(state);
! state.pushLines();
! }
!
/**
*allows for a compiler to use the attributes of the calling tag
*/
public void setAttributes(Attributes atts) throws Exception {
!
super.setAttributes(atts);
! String bodyTag;
!
if (state.getReport().getBody().isHTML()) {
Line line = state.getCurrentLine();
! //line.addChunk(new net.sourceforge.idrs.core.report.TextChunk("<BODY "));
! bodyTag="<BODY ";
for (int i=0,m=atts.getLength();i<m;i++) {
! bodyTag += atts.getLocalName(i) + "=\"" + atts.getValue(i) + "\" ";
}
! bodyTag += ">";
! System.out.println("Body tag : " + bodyTag);
! line.addChunk(new TextChunk(bodyTag));
state.sealLine();
}
!
!
}
!
!
!
public void useMethod(String val,Attributes atts) throws Exception {
!
String objid = atts.getValue("objid");
String varlistId = atts.getValue("varlist");
LinkedList varList = (LinkedList) ((HashMap) state.getAttribute("IDRS_VAR_LISTS")).get(varlistId);
Line curr = state.getCurrentLine();
!
curr.addChunk(new ObjectChunk(val,varList.toArray(),varlistId,objid));
!
}
!
public void field(String val,Attributes atts) throws Exception {
String format = atts.getValue("format");
***************
*** 67,88 ****
field = val.substring(val.indexOf(".")+1);
Line line = state.getCurrentLine();
line.addChunk(new net.sourceforge.idrs.core.report.FieldChunk(id,field,format,state.getCurrentRepeatLine()));
}
!
public void inputResults(String val,Attributes atts) throws Exception {
Line line = state.getCurrentLine();
line.addChunk(new net.sourceforge.idrs.core.report.InputResultsChunk(val));
}
!
public void script(String val, Attributes atts) throws Exception {
state.getCurrentLine().addChunk(new net.sourceforge.idrs.core.report.ShortScriptChunk(val));
}
!
! public void evalScript(String val,Attributes atts) throws Exception {
state.getCurrentLine().addChunk(new net.sourceforge.idrs.core.report.EvalScriptChunk(val));
}
!
public void text(String val,Attributes atts) throws Exception {
! if (val.indexOf('\n') != -1) {
StringTokenizer tok = new StringTokenizer(val,"\n",false);
Line line;
--- 82,105 ----
field = val.substring(val.indexOf(".")+1);
Line line = state.getCurrentLine();
+
line.addChunk(new net.sourceforge.idrs.core.report.FieldChunk(id,field,format,state.getCurrentRepeatLine()));
}
!
public void inputResults(String val,Attributes atts) throws Exception {
Line line = state.getCurrentLine();
line.addChunk(new net.sourceforge.idrs.core.report.InputResultsChunk(val));
}
!
public void script(String val, Attributes atts) throws Exception {
state.getCurrentLine().addChunk(new net.sourceforge.idrs.core.report.ShortScriptChunk(val));
}
!
! public void echoScript(String val,Attributes atts) throws Exception {
state.getCurrentLine().addChunk(new net.sourceforge.idrs.core.report.EvalScriptChunk(val));
}
!
public void text(String val,Attributes atts) throws Exception {
! System.out.println("val = \"" + val + "\"");
! /*if (val.indexOf('\n') != -1) {
StringTokenizer tok = new StringTokenizer(val,"\n",false);
Line line;
***************
*** 95,99 ****
else {
state.getCurrentLine().addChunk(new TextChunk(val));
! }
}
--- 112,117 ----
else {
state.getCurrentLine().addChunk(new TextChunk(val));
! }*/
! state.getCurrentLine().addChunk(new TextChunk(val));
}
***************
*** 102,107 ****
*/
public void seal() throws Exception {
!
}
!
}
--- 120,136 ----
*/
public void seal() throws Exception {
! if (state.getCurrentLine() != null)
! state.sealLine();
! if (state.getReport().getBody().isHTML()) {
! Line line = state.getCurrentLine();
! line.addChunk(new TextChunk("</BODY>"));
! state.sealLine();
! }
!
! Vector lines = state.popLines();
! System.out.println("body lines : " + lines.size());
! state.getReport().getBody().setLines(lines);
! state.getReport().getBody().seal();
}
!
}
Index: Constructor.java
===================================================================
RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/compile/units/Constructor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Constructor.java 27 Feb 2002 23:56:31 -0000 1.1
--- Constructor.java 4 Mar 2002 23:05:35 -0000 1.2
***************
*** 1,8 ****
/*
! * Constructor.java
! *
! * Created on February 6, 2002, 3:26 PM
*/
package net.sourceforge.idrs.deploy.compile.units;
--- 1,18 ----
/*
! Constructor.java
! Copyright (C) 2002 Marc Boorshtein
!
! The contents of this file are subject to the Mozilla Public License Version 1.0 (the License);
! you may not use this file except in compliance with the License. You may obtain a copy of the
! License at http://www.mozilla.org/MPL/
!
! Software distributed under the License is distributed on an "AS IS" basis,
! WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific
! language governing rights and limitations under the License.
*/
+ /**
+ *Compiles the constructor tag
+ */
package net.sourceforge.idrs.deploy.compile.units;
Index: Db.java
===================================================================
RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/compile/units/Db.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Db.java 27 Feb 2002 23:56:31 -0000 1.1
--- Db.java 4 Mar 2002 23:05:35 -0000 1.2
***************
*** 1,8 ****
/*
! * Db.java
! *
! * Created on February 6, 2002, 3:50 PM
*/
package net.sourceforge.idrs.deploy.compile.units;
--- 1,18 ----
/*
! Db.java
! Copyright (C) 2002 Marc Boorshtein
!
! The contents of this file are subject to the Mozilla Public License Version 1.0 (the License);
! you may not use this file except in compliance with the License. You may obtain a copy of the
! License at http://www.mozilla.org/MPL/
!
! Software distributed under the License is distributed on an "AS IS" basis,
! WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific
! language governing rights and limitations under the License.
*/
+ /**
+ *Handles the db RML tag
+ */
package net.sourceforge.idrs.deploy.compile.units;
***************
*** 34,38 ****
*/
public void seal() throws Exception {
! db.seal();
this.state.getReport().getHead().addDB(db);
}
--- 44,48 ----
*/
public void seal() throws Exception {
! //db.seal();
this.state.getReport().getHead().addDB(db);
}
***************
*** 43,46 ****
--- 53,58 ----
public void setAttributes(Attributes atts) throws Exception {
super.setAttributes(atts);
+
+
id = atts.getValue("id");
db = new DB(id);
***************
*** 49,53 ****
public void dbName(String val, Attributes atts) throws Exception {
! db.setDBName(val);
}
--- 61,65 ----
public void dbName(String val, Attributes atts) throws Exception {
! db.setDBName(val,false);
}
Index: Head.java
===================================================================
RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/compile/units/Head.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Head.java 27 Feb 2002 23:56:31 -0000 1.1
--- Head.java 4 Mar 2002 23:05:35 -0000 1.2
***************
*** 1,6 ****
/*
! * Head.java
! *
! * Created on February 4, 2002, 9:05 AM
*/
--- 1,16 ----
/*
! Head.java
! Copyright (C) 2002 Marc Boorshtein
!
! The contents of this file are subject to the Mozilla Public License Version 1.0 (the License);
! you may not use this file except in compliance with the License. You may obtain a copy of the
! License at http://www.mozilla.org/MPL/
!
! Software distributed under the License is distributed on an "AS IS" basis,
! WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific
! language governing rights and limitations under the License.
! */
! /**
! *Implements Head tag
*/
***************
*** 29,36 ****
this.state.getReport().getHead().addText("</HEAD>");
}
!
this.state.getReport().getHead().seal();
}
/**
* allows for a compiler to use the attributes of the calling tag
--- 39,50 ----
this.state.getReport().getHead().addText("</HEAD>");
}
!
this.state.getReport().getHead().seal();
}
+
+
+
+
/**
* allows for a compiler to use the attributes of the calling tag
***************
*** 39,43 ****
String tag;
int i;
! if (this.state.getReport().getBody().isHTML()) {
tag = "<HEAD ";
for (i=0; i < atts.getLength(); i++) {
--- 53,66 ----
String tag;
int i;
!
! if (this.state==null) System.out.println("state null");
! IDRSRep rep = this.state.getReport();
! if (rep == null) System.out.println("Rep Null");
! IDRSBody body = rep.getBody();
! if (body == null) System.out.println("Body Null");
!
! boolean ishtml = body.isHTML();
!
! if (ishtml) {
tag = "<HEAD ";
for (i=0; i < atts.getLength(); i++) {
***************
*** 48,55 ****
}
}
!
public void text(java.lang.String val, Attributes atts) throws Exception {
this.state.getReport().getHead().addText(val);
}
!
}
--- 71,78 ----
}
}
!
public void text(java.lang.String val, Attributes atts) throws Exception {
this.state.getReport().getHead().addText(val);
}
!
}
Index: Method.java
===================================================================
RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/compile/units/Method.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Method.java 27 Feb 2002 23:56:31 -0000 1.1
--- Method.java 4 Mar 2002 23:05:35 -0000 1.2
***************
*** 1,8 ****
/*
! * Method.java
! *
! * Created on February 6, 2002, 3:41 PM
*/
package net.sourceforge.idrs.deploy.compile.units;
--- 1,19 ----
/*
! Method.java
! Copyright (C) 2002 Marc Boorshtein
!
! The contents of this file are subject to the Mozilla Public License Version 1.0 (the License);
! you may not use this file except in compliance with the License. You may obtain a copy of the
! License at http://www.mozilla.org/MPL/
!
! Software distributed under the License is distributed on an "AS IS" basis,
! WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific
! language governing rights and limitations under the License.
! */
! /**
! *Implements Method tag
*/
+
package net.sourceforge.idrs.deploy.compile.units;
***************
*** 16,23 ****
import net.sourceforge.idrs.utils.ObjectStore;
- /**
- * Encapsulates the method tag
- * @author Marc Boorshtein
- */
public class Method extends net.sourceforge.idrs.deploy.compile.units.Constructor {
String name;
--- 27,30 ----
***************
*** 52,56 ****
*/
public void name(String val, Attributes atts) {
! this.name=name;
}
--- 59,63 ----
*/
public void name(String val, Attributes atts) {
! this.name=val;
}
Index: Object.java
===================================================================
RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/compile/units/Object.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Object.java 27 Feb 2002 23:56:31 -0000 1.1
--- Object.java 4 Mar 2002 23:05:35 -0000 1.2
***************
*** 1,8 ****
/*
! * Object.java
! *
! * Created on February 6, 2002, 2:59 PM
*/
package net.sourceforge.idrs.deploy.compile.units;
--- 1,19 ----
/*
! Object.java
! Copyright (C) 2002 Marc Boorshtein
!
! The contents of this file are subject to the Mozilla Public License Version 1.0 (the License);
! you may not use this file except in compliance with the License. You may obtain a copy of the
! License at http://www.mozilla.org/MPL/
!
! Software distributed under the License is distributed on an "AS IS" basis,
! WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific
! language governing rights and limitations under the License.
! */
! /**
! *Implements object tag
*/
+
package net.sourceforge.idrs.deploy.compile.units;
***************
*** 16,23 ****
import net.sourceforge.idrs.utils.ObjectStore;
! /**
! * Encapsulates the object tag
! * @author Marc Boorshtein
! */
public class Object extends net.sourceforge.idrs.deploy.compile.Compiler {
--- 27,31 ----
import net.sourceforge.idrs.utils.ObjectStore;
!
public class Object extends net.sourceforge.idrs.deploy.compile.Compiler {
Index: Repeat.java
===================================================================
RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/compile/units/Repeat.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Repeat.java 27 Feb 2002 23:56:31 -0000 1.1
--- Repeat.java 4 Mar 2002 23:05:35 -0000 1.2
***************
*** 1,8 ****
/*
! * Repeat.java
! *
! * Created on February 19, 2002, 1:28 PM
*/
package net.sourceforge.idrs.deploy.compile.units;
import org.xml.sax.*;
--- 1,19 ----
/*
! Repeat.java
! Copyright (C) 2002 Marc Boorshtein
!
! The contents of this file are subject to the Mozilla Public License Version 1.0 (the License);
! you may not use this file except in compliance with the License. You may obtain a copy of the
! License at http://www.mozilla.org/MPL/
!
! Software distributed under the License is distributed on an "AS IS" basis,
! WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific
! language governing rights and limitations under the License.
! */
! /**
! *Implements repeat tag
*/
+
package net.sourceforge.idrs.deploy.compile.units;
import org.xml.sax.*;
***************
*** 15,25 ****
import net.sourceforge.idrs.utils.ObjectStore;
! /**
! *
! * @author mlb
! * @version
! */
public class Repeat extends net.sourceforge.idrs.deploy.compile.units.Body {
String id, color1, color2;
/** Creates new Repeat */
--- 26,33 ----
import net.sourceforge.idrs.utils.ObjectStore;
!
public class Repeat extends net.sourceforge.idrs.deploy.compile.units.Body {
String id, color1, color2;
+ RepeatLine repLine;
/** Creates new Repeat */
***************
*** 32,48 ****
*/
public void setAttributes(Attributes atts) throws Exception {
- super.setAttributes(atts);
this.atts = atts;
id = atts.getValue("id");
color1 = atts.getValue("color1");
color2 = atts.getValue("color2");
}
/**
*allows for the compiler to work with the current state of the page compilation
*/
public void setState(CompilerState state) throws Exception {
! super.setState(state);
! state.addRepeatLine(id,color1,color2);
}
--- 40,66 ----
*/
public void setAttributes(Attributes atts) throws Exception {
this.atts = atts;
id = atts.getValue("id");
color1 = atts.getValue("color1");
color2 = atts.getValue("color2");
+ repLine = new RepeatLine(id,color1,color2);
}
+
/**
*allows for the compiler to work with the current state of the page compilation
*/
public void setState(CompilerState state) throws Exception {
! this.state = state;
! state.sealLine();
! state.pushLines();
! //state.addRepeatLine(id,color1,color2);
! }
!
! /**
! *Retrieves the current repeat line
! */
! public RepeatLine getRepeatLine() {
! return this.repLine;
}
***************
*** 51,55 ****
*/
public void seal() throws Exception {
! state.setRepeatLine();
}
--- 69,80 ----
*/
public void seal() throws Exception {
! //if (state.getCurrentLine() != null)
! state.sealLine();
! Vector lines = state.popLines();
! System.out.println("num lines repeat : " + lines.size());
! repLine.setLines(lines);
!
! state.setLine(repLine);
! state.sealLine();
}
Index: Rml.java
===================================================================
RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/compile/units/Rml.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Rml.java 27 Feb 2002 23:56:31 -0000 1.1
--- Rml.java 4 Mar 2002 23:05:35 -0000 1.2
***************
*** 1,6 ****
/*
! * Rml.java
! *
! * Created on February 2, 2002, 8:57 PM
*/
--- 1,16 ----
/*
! Rml.java
! Copyright (C) 2002 Marc Boorshtein
!
! The contents of this file are subject to the Mozilla Public License Version 1.0 (the License);
! you may not use this file except in compliance with the License. You may obtain a copy of the
! License at http://www.mozilla.org/MPL/
!
! Software distributed under the License is distributed on an "AS IS" basis,
! WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific
! language governing rights and limitations under the License.
! */
! /**
! *Implements Rml tag
*/
***************
*** 15,23 ****
import net.sourceforge.idrs.deploy.compile.CompilerState;
! /**
! *
! * @author mlb
! * @version
! */
public class Rml extends net.sourceforge.idrs.deploy.compile.Compiler {
--- 25,29 ----
import net.sourceforge.idrs.deploy.compile.CompilerState;
!
public class Rml extends net.sourceforge.idrs.deploy.compile.Compiler {
***************
*** 39,42 ****
--- 45,49 ----
public void isHtml(String val, Attributes atts) throws Exception {
this.state.getReport().getBody().isHTML(Boolean.valueOf(val).booleanValue());
+ System.out.println("Set HTML");
}
Index: SQL.java
===================================================================
RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/compile/units/SQL.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SQL.java 27 Feb 2002 23:56:31 -0000 1.1
--- SQL.java 4 Mar 2002 23:05:35 -0000 1.2
***************
*** 1,7 ****
/*
! * SQL.java
! *
! * Created on February 6, 2002, 4:01 PM
*/
package net.sourceforge.idrs.deploy.compile.units;
--- 1,18 ----
/*
! SQL.java
! Copyright (C) 2002 Marc Boorshtein
!
! The contents of this file are subject to the Mozilla Public License Version 1.0 (the License);
! you may not use this file except in compliance with the License. You may obtain a copy of the
! License at http://www.mozilla.org/MPL/
!
! Software distributed under the License is distributed on an "AS IS" basis,
! WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific
! language governing rights and limitations under the License.
*/
+ /**
+ *Implements SQL tag
+ */
+
package net.sourceforge.idrs.deploy.compile.units;
***************
*** 16,24 ****
import net.sourceforge.idrs.utils.*;
! /**
! *
! * @author mlb
! * @version
! */
public class SQL extends net.sourceforge.idrs.deploy.compile.Compiler {
protected DB db;
--- 27,31 ----
import net.sourceforge.idrs.utils.*;
!
public class SQL extends net.sourceforge.idrs.deploy.compile.Compiler {
protected DB db;
***************
*** 48,56 ****
}
! void varType(String val, Attributes att) throws Exception {
db.addVarType(val);
}
!
! void src(String val, Attributes atts) {
db.setSQL(val);
}
--- 55,63 ----
}
! public void varType(String val, Attributes att) throws Exception {
db.addVarType(val);
}
!
! public void src(String val, Attributes atts) throws Exception {
db.setSQL(val);
}
Index: StoredProc.java
===================================================================
RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/compile/units/StoredProc.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** StoredProc.java 27 Feb 2002 23:56:31 -0000 1.1
--- StoredProc.java 4 Mar 2002 23:05:35 -0000 1.2
***************
*** 1,8 ****
/*
! * StoredProc.java
! *
! * Created on February 6, 2002, 4:05 PM
*/
package net.sourceforge.idrs.deploy.compile.units;
--- 1,19 ----
/*
! StoredProc.java
! Copyright (C) 2002 Marc Boorshtein
!
! The contents of this file are subject to the Mozilla Public License Version 1.0 (the License);
! you may not use this file except in compliance with the License. You may obtain a copy of the
! License at http://www.mozilla.org/MPL/
!
! Software distributed under the License is distributed on an "AS IS" basis,
! WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific
! language governing rights and limitations under the License.
! */
! /**
! *Implements StoredProc tag
*/
+
package net.sourceforge.idrs.deploy.compile.units;
***************
*** 16,24 ****
import net.sourceforge.idrs.utils.*;
! /**
! *
! * @author mlb
! * @version
! */
public class StoredProc extends net.sourceforge.idrs.deploy.compile.units.SQL {
--- 27,31 ----
import net.sourceforge.idrs.utils.*;
!
public class StoredProc extends net.sourceforge.idrs.deploy.compile.units.SQL {
Index: VarList.java
===================================================================
RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/compile/units/VarList.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** VarList.java 27 Feb 2002 23:56:31 -0000 1.1
--- VarList.java 4 Mar 2002 23:05:35 -0000 1.2
***************
*** 1,8 ****
/*
! * VarList.java
! *
! * Created on February 6, 2002, 2:43 PM
*/
package net.sourceforge.idrs.deploy.compile.units;
--- 1,19 ----
/*
! VarList.java
! Copyright (C) 2002 Marc Boorshtein
!
! The contents of this file are subject to the Mozilla Public License Version 1.0 (the License);
! you may not use this file except in compliance with the License. You may obtain a copy of the
! License at http://www.mozilla.org/MPL/
!
! Software distributed under the License is distributed on an "AS IS" basis,
! WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific
! language governing rights and limitations under the License.
! */
! /**
! *Implements VarList tag
*/
+
package net.sourceforge.idrs.deploy.compile.units;
***************
*** 15,23 ****
import net.sourceforge.idrs.deploy.compile.CompilerState;
- /**
- *
- * @author mlb
- * @version
- */
public class VarList extends net.sourceforge.idrs.deploy.compile.Compiler {
LinkedList list;
--- 26,29 ----
|