[Idrs-commit] CVS: Idrs/dev/src/net/sourceforge/idrs/deploy/macro MacroToXMLHandler.java,1.5,1.6
Brought to you by:
bigman921
|
From: Marc B. <big...@us...> - 2002-01-23 19:46:48
|
Update of /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/macro In directory usw-pr-cvs1:/tmp/cvs-serv11933/net/sourceforge/idrs/deploy/macro Modified Files: MacroToXMLHandler.java Log Message: added javadoc comments Index: MacroToXMLHandler.java =================================================================== RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/macro/MacroToXMLHandler.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MacroToXMLHandler.java 2002/01/23 13:54:08 1.5 --- MacroToXMLHandler.java 2002/01/23 19:46:44 1.6 *************** *** 1,2 **** --- 1,14 ---- + /* + MacroToXMLHandler.java + Copyright (C) 2001 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.macro; *************** *** 7,21 **** public class MacroToXMLHandler extends DefaultHandler { static final String RML = "rml", ! TEXT_TAG = "texttag", ! SCHEMA_LOCATION = "schemalocation", ! SCHEMA_NAMESPACE = "schemanamespace", ! SCRIPT_CHAR = "scriptchar", ! SCRIPT_TAG = "scripttag", ! ECHO_SCRIPT_TAG = "echoscripttag", ! RML_TRANS = "rmltrans", ! IS_SIMPLE = "simple", ! OWN_LINE = "ownLine"; String nameSpace,rmlSchema,textTag,scriptTag,echoScriptTag; --- 19,36 ---- + /** + *Used to parse out the transformation xml document and suply information obout that document + */ public class MacroToXMLHandler extends DefaultHandler { static final String RML = "rml", ! TEXT_TAG = "texttag", ! SCHEMA_LOCATION = "schemalocation", ! SCHEMA_NAMESPACE = "schemanamespace", ! SCRIPT_CHAR = "scriptchar", ! SCRIPT_TAG = "scripttag", ! ECHO_SCRIPT_TAG = "echoscripttag", ! RML_TRANS = "rmltrans", ! IS_SIMPLE = "simple", ! OWN_LINE = "ownLine"; String nameSpace,rmlSchema,textTag,scriptTag,echoScriptTag; *************** *** 86,109 **** --- 101,145 ---- } + /** + *Retrieves the character identified by the transformation document as the script character, + *the default is $ for <$ $>, <$= $> + *@return + */ public char getScriptChar() { return this.scriptChar; } + /** + *Returns the tag specified in the transformation document that will be used for scripts + */ public String getScriptTag() { return this.scriptTag; } + /** + *Returns the tag used for echo scripts, <$= $> + */ public String getEchoScriptTag() { return this.echoScriptTag; } + /** + *Returns the rml name space used for full XML tags specified in the transformation document + */ public String getNameSpace() { return nameSpace; } + /** + *Returns the tag that will identify plain text + */ public String getTextTag() { return textTag; } + /** + *Returns wether or not a suplied tag is rml + *@param tag Tag being tested + */ public boolean isRMLTag(String tag) { System.out.println("is a rml tag? : " + tag); *************** *** 111,118 **** --- 147,162 ---- } + /** + *Returns the case-sensitive version of the rml tag for use in final xml document + *@param tag Tag to be transformed in any case + */ public String getCorrectRMLTagName(String tag) { return ((Tag) rmlTags.get(tag.toLowerCase().trim())).name; } + /** + *Determines if a tag contains only one type of content, wether tags only or text only + *@param tag Tag to test + */ public boolean isTagSimple(String tag) { System.out.println("tag " + tag + " exits " + isRMLTag(tag)); *************** *** 120,124 **** } ! public boolean isTagWonLine(String tag) { System.out.println("tag " + tag + " exits " + isRMLTag(tag)); return ((Tag) rmlTags.get(tag.toLowerCase().trim())).ownLine; --- 164,172 ---- } ! /** ! *Determines if a tag must apear on it's own line ! *@param tag Tag to test ! */ ! public boolean isTagOwnLine(String tag) { System.out.println("tag " + tag + " exits " + isRMLTag(tag)); return ((Tag) rmlTags.get(tag.toLowerCase().trim())).ownLine; *************** *** 128,131 **** --- 176,182 ---- } + /** + *Structure for holding the structure of tags + */ class Tag { String name; |