com.samskivert.xml
Class CheckVersionRule

java.lang.Object
  extended by org.apache.commons.digester.Rule
      extended by com.samskivert.xml.CheckVersionRule

public class CheckVersionRule
extends org.apache.commons.digester.Rule

Used to compare a file format version number in an XML file with the one compiled into the parsing code.


Field Summary
protected  String _parserIdentifier
           
protected  int _version
           
 
Fields inherited from class org.apache.commons.digester.Rule
digester, namespaceURI
 
Constructor Summary
CheckVersionRule(int version, String parserIdentifier)
          Constructs a check version rule with the specified know version number.
 
Method Summary
 void body(String namespace, String name, String bodyText)
           
 
Methods inherited from class org.apache.commons.digester.Rule
begin, begin, body, end, end, finish, getDigester, getNamespaceURI, setDigester, setNamespaceURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_version

protected int _version

_parserIdentifier

protected String _parserIdentifier
Constructor Detail

CheckVersionRule

public CheckVersionRule(int version,
                        String parserIdentifier)
Constructs a check version rule with the specified know version number. If a version newer than the specified version is parsed, a big fat warning will be issued.

Parameters:
version - the version number that the compiled code expects to see.
parserIdentifier - the name of the parser using this rule which will be reported in the event of a version mismatch.
Method Detail

body

public void body(String namespace,
                 String name,
                 String bodyText)
          throws Exception
Overrides:
body in class org.apache.commons.digester.Rule
Throws:
Exception


Copyright © 2000-2008 Michael Bayne. All Rights Reserved.