ruper2/src/java/core/org/krysalis/ruper/util/xml XMLEntryTable.java,1.6,1.7 XMLHandler.java,1.7,1.8 XMLTagConstants.java,1.1,1.2

[email protected]
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/util/xml
In directory sc8-pr-cvs1:/tmp/cvs-serv4208/src/java/core/org/krysalis/ruper/util/xml

Modified Files:
	XMLEntryTable.java XMLHandler.java XMLTagConstants.java 
Log Message:
Class attribute  in the ruper.xml file is coped in XMLHandler and tested

Index: XMLEntryTable.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/util/xml/XMLEntryTable.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** XMLEntryTable.java	10 Sep 2003 16:09:37 -0000	1.6
--- XMLEntryTable.java	10 Sep 2003 21:19:33 -0000	1.7
***************
*** 23,27 ****
  		super();
  		this.m_entryToClassMap.put(XMLTagConstants.CONFIG_TAG, XMLTagConstants.XML_GROUPER_ELEMENT);
- 		this.m_entryToClassMap.put(XMLTagConstants.REPOSITORY_TAG, XMLTagConstants.DEFAULT_REPOSITORY);
  	}
  
--- 23,26 ----

Index: XMLHandler.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/util/xml/XMLHandler.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** XMLHandler.java	10 Sep 2003 21:05:02 -0000	1.7
--- XMLHandler.java	10 Sep 2003 21:19:36 -0000	1.8
***************
*** 61,64 ****
--- 61,69 ----
  			else
  			{
+ 				// handle the case where the class is different from the one in xmltable
+ 				String classAttributeName = attributes.getValue(XMLTagConstants.XML_CLASS_ATTRIBUTE);
+ 				if(classAttributeName != null && !classAttributeName.equals(""))
+ 				m_xmlEntryTable.put(tag, classAttributeName);
+ 				
  				// find out if the tag - class is defined in the XMLEntryTable
  				String clazzName = (String) m_xmlEntryTable.get(tag);
***************
*** 151,155 ****
  			String attributeName = attributes.getLocalName(j);
  			String attributeValue = attributes.getValue(j);
! 
  			// add it to the entrytable
  			this.m_xmlEntryTable.put(attributeName, attributeValue);
--- 156,160 ----
  			String attributeName = attributes.getLocalName(j);
  			String attributeValue = attributes.getValue(j);
! 		
  			// add it to the entrytable
  			this.m_xmlEntryTable.put(attributeName, attributeValue);
***************
*** 267,281 ****
  			String attributeValue = attributes.getValue(j);
  
! 			// invoke the setMethod if Found 
! 			boolean attributeSet =
! 				setMethods(tagObject, attributeName, attributeValue);
! 
! 			if (!attributeSet)
  			{
! 				Logger.getLog().error(
! 					"Attribute :"
! 						+ attributeName
! 						+ " is not available in the class :"
! 						+ clazz.getName());
  			}
  		}
--- 272,293 ----
  			String attributeValue = attributes.getValue(j);
  
! 			// tag, ref id and class attributes are already handled
! 			if(attributeName != XMLTagConstants.XML_TAG_ID ||
! 			attributeName != XMLTagConstants.XML_TAG_REF_ID ||
! 			attributeName != XMLTagConstants.XML_CLASS_ATTRIBUTE)
  			{
! 	
! 				// invoke the setMethod if Found 
! 				boolean attributeSet =
! 					setMethods(tagObject, attributeName, attributeValue);
! 	
! 				if (!attributeSet)
! 				{
! 					Logger.getLog().error(
! 						"Attribute :"
! 							+ attributeName
! 							+ " is not available in the class :"
! 							+ clazz.getName());
! 				}
  			}
  		}

Index: XMLTagConstants.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/util/xml/XMLTagConstants.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** XMLTagConstants.java	10 Sep 2003 16:09:37 -0000	1.1
--- XMLTagConstants.java	10 Sep 2003 21:19:37 -0000	1.2
***************
*** 21,24 ****
--- 21,26 ----
  	public final static String DEFAULT_REPOSITORY = "org.krysalis.ruper.repository.DefaultRepository";
  
+ 	// Attributes
+ 	public final static String XML_CLASS_ATTRIBUTE = "class";
  	
  	/**




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.