org.progeeks.tool.xml
Class ObjectXmlProfile

java.lang.Object
  extended by org.progeeks.tool.xml.ObjectXmlProfile

public class ObjectXmlProfile
extends java.lang.Object

Contains information and code for validating files intended for a specific ObjectXmlReader configuration.

Version:
$Revision: 1.3 $
Author:
Paul Speed

Constructor Summary
ObjectXmlProfile()
           
 
Method Summary
 boolean canHandleSignature(java.lang.String signature)
          Returns true if this validator can handle the specified XML signature.
 java.util.List getImports()
          Returns the list of standard imported packages the will be applied to handlers.
 java.lang.Exception getLastError()
          Returns the any exception processed during the last isValid() call.
 java.util.List getObjectHandlers()
          Returns the list of handlers needed to read the XML correctly.
 java.lang.String getRootTag()
           
 java.lang.String getSignaturePattern()
          Returns a single signature pattern that will be used to determine if this validator should handle a particular XML signature.
 java.util.List getSignaturePatterns()
          Returns a list of regular expressions that will be used to determine if this validator should handle a particular XML signature.
protected  ObjectXmlReader getXmlReader()
          Returns an appropriately configured reader.
 boolean isValid(java.io.Reader in)
          Returns true if the XML in the reader is valid for this profile.
 void setImports(java.util.List imports)
          Sets the list of standard imported packages that will be applied to handlers.
 void setObjectHandlers(java.util.List handlers)
          Sets the list of handlers needed to read the XML correctly.
 void setRootTag(java.lang.String tag)
          Sets the root tag for the profile.
 void setSignaturePattern(java.lang.String pattern)
          Sets a single signature pattern that will be used to determine if this validator should handle a particular XML signature.
 void setSignaturePatterns(java.util.List patterns)
          Sets a list of regular expressions that will be used to determine if this validator should handle a particular XML signature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectXmlProfile

public ObjectXmlProfile()
Method Detail

setRootTag

public void setRootTag(java.lang.String tag)
Sets the root tag for the profile. The root tag when set represents a dummy outer tag that will mostly be ignored by the reader so that it can read a list of beans. This would be the same value passed to the ObjectXmlReader constructor if you use one.


getRootTag

public java.lang.String getRootTag()

getXmlReader

protected ObjectXmlReader getXmlReader()
Returns an appropriately configured reader.


canHandleSignature

public boolean canHandleSignature(java.lang.String signature)
Returns true if this validator can handle the specified XML signature.


isValid

public boolean isValid(java.io.Reader in)
Returns true if the XML in the reader is valid for this profile.


getLastError

public java.lang.Exception getLastError()
Returns the any exception processed during the last isValid() call. This will return null if that last isValid() call returned true.


setSignaturePatterns

public void setSignaturePatterns(java.util.List patterns)
Sets a list of regular expressions that will be used to determine if this validator should handle a particular XML signature.


getSignaturePatterns

public java.util.List getSignaturePatterns()
Returns a list of regular expressions that will be used to determine if this validator should handle a particular XML signature.


setSignaturePattern

public void setSignaturePattern(java.lang.String pattern)
Sets a single signature pattern that will be used to determine if this validator should handle a particular XML signature.


getSignaturePattern

public java.lang.String getSignaturePattern()
Returns a single signature pattern that will be used to determine if this validator should handle a particular XML signature.


setImports

public void setImports(java.util.List imports)
Sets the list of standard imported packages that will be applied to handlers.


getImports

public java.util.List getImports()
Returns the list of standard imported packages the will be applied to handlers.


setObjectHandlers

public void setObjectHandlers(java.util.List handlers)
Sets the list of handlers needed to read the XML correctly.


getObjectHandlers

public java.util.List getObjectHandlers()
Returns the list of handlers needed to read the XML correctly.



Copyright © 2002-2003 Paul Speed. All Rights Reserved.