[Idrs-commit] CVS: Idrs/dev/src/net/sourceforge/idrs/deploy/compile/units Tag.java,NONE,1.1 Attribut
Brought to you by:
bigman921
|
From: Marc B. <big...@us...> - 2004-08-22 23:52:48
|
Update of /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/compile/units In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18432/src/net/sourceforge/idrs/deploy/compile/units Modified Files: Rml.java Added Files: Tag.java Attribute.java Log Message: * Added tags to handle the creation of XML tags <tag name="xmltag"> <attribute name="attribname"> . . . </attribute> . . . </tag> The tags work in text mode, but are designed for XML mode * Added the ability for an IDRS report to be generated to a DOM. This eliminates the performance loss die to parsing the resulting XML before it is added to a SOAP Body. --- NEW FILE: Tag.java --- /* * Created on Aug 22, 2004 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package net.sourceforge.idrs.deploy.compile.units; import java.util.Vector; import net.sourceforge.idrs.core.report.RepeatLine; import net.sourceforge.idrs.core.report.TagLine; import net.sourceforge.idrs.deploy.compile.CompilerState; import org.xml.sax.Attributes; /** * @author mlb * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ public class Tag extends Body { String name; private TagLine tagLine; /** *allows for a compiler to use the attributes of the calling tag */ public void setAttributes(Attributes atts) throws Exception { this.atts = atts; name = atts.getValue("name"); this.tagLine = new TagLine(name,true); } /** *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 TagLine getTagLine() { return this.tagLine; } /** * allows for the execution of any wrap-up code at the hitting of the end tag */ public void seal() throws Exception { //if (state.getCurrentLine() != null) state.sealLine(); Vector lines = state.popLines(); //System.out.println("num lines repeat : " + lines.size()); tagLine.setLines(lines); state.setLine(tagLine); state.sealLine(); } } --- NEW FILE: Attribute.java --- /* * Created on Aug 22, 2004 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package net.sourceforge.idrs.deploy.compile.units; import java.util.Vector; import net.sourceforge.idrs.core.report.AttributeLine; import net.sourceforge.idrs.core.report.TagLine; import net.sourceforge.idrs.deploy.compile.CompilerState; import org.xml.sax.Attributes; /** * @author mlb * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ public class Attribute extends Body { String name; private AttributeLine attribLine; /** *allows for a compiler to use the attributes of the calling tag */ public void setAttributes(Attributes atts) throws Exception { this.atts = atts; name = atts.getValue("name"); this.attribLine = new AttributeLine(name); } /** *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 AttributeLine getAttributeLine() { return this.attribLine; } /** * allows for the execution of any wrap-up code at the hitting of the end tag */ public void seal() throws Exception { //if (state.getCurrentLine() != null) state.sealLine(); Vector lines = state.popLines(); //System.out.println("num lines repeat : " + lines.size()); attribLine.setLines(lines); state.setLine(attribLine); state.sealLine(); } } Index: Rml.java =================================================================== RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/compile/units/Rml.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Rml.java 4 Mar 2002 23:05:35 -0000 1.2 --- Rml.java 22 Aug 2004 23:52:31 -0000 1.3 *************** *** 57,59 **** --- 57,63 ---- } + public void text(String val, Attributes atts) throws Exception { + + } + } |