You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by dl...@apache.org on 2001/12/31 23:19:37 UTC
cvs commit: jakarta-turbine-stratum/src/java/org/apache/stratum/xo Mapper.java
dlr 01/12/31 14:19:37
Modified: src/java/org/apache/stratum/xo Mapper.java
Log:
o Minor formatting fixes.
o Added comments to isPlural(String) regarding I18N-ability and
default return value.
Revision Changes Path
1.2 +14 -10 jakarta-turbine-stratum/src/java/org/apache/stratum/xo/Mapper.java
Index: Mapper.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-stratum/src/java/org/apache/stratum/xo/Mapper.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -u -r1.1 -r1.2
--- Mapper.java 30 Dec 2001 18:00:38 -0000 1.1
+++ Mapper.java 31 Dec 2001 22:19:37 -0000 1.2
@@ -134,7 +134,7 @@
*
*
* @author <a href="mailto:jvanzyl@zenplex.com">Jason van Zyl</a>
- * @version $Id: Mapper.java,v 1.1 2001/12/30 18:00:38 jvanzyl Exp $
+ * @version $Id: Mapper.java,v 1.2 2001/12/31 22:19:37 dlr Exp $
*/
// How to use the resources package to pull in the
@@ -166,11 +166,11 @@
*/
private String basePackage;
- /**
- * Instructions for the inclusion of external files.
- * If there is a rule that matches the element than files
- * will be included from an external source.
- */
+ /**
+ * Instructions for the inclusion of external files.
+ * If there is a rule that matches the element than files
+ * will be included from an external source.
+ */
private Map inclusionRules;
/**
@@ -238,7 +238,7 @@
Object bean = Class.forName(beanClass).newInstance();
// Determine the base package to use for object creation.
- basePackage = beanClass.substring(0,beanClass.lastIndexOf("."));
+ basePackage = beanClass.substring(0, beanClass.lastIndexOf('.'));
return treeWalk(document.getRootElement(), bean);
}
@@ -461,7 +461,8 @@
elementToClassName(name);
String id = ((Element)node).attributeValue(EID);
- x = map(baseDirectory + "/" + inclusionRule + "/" + id + ".xml", className);
+ x = map(baseDirectory + "/" + inclusionRule + "/" + id + ".xml",
+ className);
if (x == null)
{
@@ -544,6 +545,8 @@
/**
* A very simple plural stemmer to determine whether
* a noun is of singular or plural form.
+ * <p>
+ * FIXME: This cannot be easily I18N'd
*
* @param String name to test for plurality
* @return boolean
@@ -566,8 +569,9 @@
{
return true;
}
-
- return false;
+
+ // None of the tests detected a plural
+ return false;
}
/**
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>