org.hibernate.validator.internal.xml
Class XmlParserHelper

java.lang.Object
  extended by org.hibernate.validator.internal.xml.XmlParserHelper

public class XmlParserHelper
extends Object

Provides common functionality used within the different XML descriptor parsers.

Author:
Gunnar Morling

Constructor Summary
XmlParserHelper()
           
 
Method Summary
 Schema getSchema(String schemaResource)
           
 String getSchemaVersion(String resourceName, InputStream xmlInputStream)
          Retrieves the schema version applying for the given XML input stream as represented by the "version" attribute of the root element of the stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlParserHelper

public XmlParserHelper()
Method Detail

getSchemaVersion

public String getSchemaVersion(String resourceName,
                               InputStream xmlInputStream)
Retrieves the schema version applying for the given XML input stream as represented by the "version" attribute of the root element of the stream.

Parameters:
resourceName - The name of the represented XML resource.
xmlInputStream - An input stream representing an XML resource. Must support the InputStream.mark(int) and InputStream.reset() methods.
Returns:
The value of the "version" attribute. For compatibility with BV 1.0, "1.0" will be returned if the given stream doesn't have a "version" attribute.

getSchema

public Schema getSchema(String schemaResource)


Copyright © 2007-2013 Red Hat, Inc. All Rights Reserved