You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hivemind.apache.org by kn...@apache.org on 2004/08/10 23:24:58 UTC
cvs commit: jakarta-hivemind/framework/src/java/org/apache/hivemind/parse DescriptorParser.java
knut 2004/08/10 14:24:58
Modified: framework/src/java/org/apache/hivemind/parse
DescriptorParser.java
Log:
zeros are now also allowed in positions of version segments other than the very last
Revision Changes Path
1.25 +4 -15 jakarta-hivemind/framework/src/java/org/apache/hivemind/parse/DescriptorParser.java
Index: DescriptorParser.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/parse/DescriptorParser.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- DescriptorParser.java 9 Aug 2004 14:53:46 -0000 1.24
+++ DescriptorParser.java 10 Aug 2004 21:24:58 -0000 1.25
@@ -174,7 +174,7 @@
private static final int STATE_NO_CONTENT = 300;
- private static final String SIMPLE_ID = "_?[a-zA-Z0-9_]+";
+ private static final String SIMPLE_ID = "[a-zA-Z0-9_]+";
/**
* Format for configuration point ids, service point ids and schema ids.
@@ -190,7 +190,7 @@
*/
public static final String MODULE_ID_PATTERN = "^" + SIMPLE_ID + "(\\." + SIMPLE_ID + ")*$";
- public static final String VERSION_PATTERN = "^[1-9]*[0-9](\\.[1-9]*[0-9]){2}$";
+ public static final String VERSION_PATTERN = "[0-9]+(\\.[0-9]+){2}$";
/**
*
@@ -337,9 +337,8 @@
}
/**
- * Invoked when a new element starts within STATE_EXTENSION_POINT.
+ * Invoked when a new element starts within STATE_CONFIGURATION_POINT.
*/
-
private void beginConfigurationPoint(String elementName)
{
if (elementName.equals("schema"))
@@ -593,7 +592,6 @@
/**
* begin outermost element, expect "module".
*/
-
private void beginStart(String elementName)
{
if (!elementName.equals("module"))
@@ -661,9 +659,7 @@
/**
* Checks that only known attributes are specified.
* Checks that all required attribute are specified.
- *
*/
-
private void checkAttributes(String elementName)
{
Iterator i = _attributes.keySet().iterator();
@@ -977,7 +973,7 @@
rule.setMethodName(getAttribute("method"));
- if (isAttribute("depth"))
+ if (_attributes.containsKey("depth"))
rule.setDepth(getIntAttribute("depth"));
elementModel.addRule(rule);
@@ -1286,7 +1282,6 @@
/**
* Invoked from the constructor to read the properties file that defines
* certain aspects of the operation of the parser.
- *
*/
private void initializeFromPropertiesFile()
{
@@ -1358,11 +1353,6 @@
}
}
- private boolean isAttribute(String name)
- {
- return _attributes.containsKey(name);
- }
-
/**
* Obtains a {@link Schema} based on a local or fully qualifed schema id. If the schema
* has not yet been defined, then a {@link RegistryAssembly#addPostProcessor(Runnable) post processor}
@@ -1405,7 +1395,6 @@
* implements {@link ILocationHolder} then its location property
* is set to the current location.
*/
-
public ModuleDescriptor parse(Resource resource, ClassResolver resolver)
{
try
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-cvs-help@jakarta.apache.org