soapical.util
Class XMLArgCheck

java.lang.Object
  extended byunannoy.util.ArgCheck
      extended bysoapical.util.XMLArgCheck

public class XMLArgCheck
extends unannoy.util.ArgCheck

Handy functions for checking XML arguments

Version:
$Revision: 1.1.1.1 $
$Date: 2003/04/21 09:43:18 $
Author:
Eric Kow (kow at loria point fr)

Constructor Summary
XMLArgCheck()
           
 
Method Summary
static void nonNullAttrNamespace(java.lang.String location, java.lang.String qName, org.xml.sax.helpers.NamespaceSupport namespaces)
          Checks that the namespace URI associated with the prefix of the qName argument is not null.
static void nonNullNamespace(java.lang.String qName, org.xml.sax.helpers.NamespaceSupport namespaces)
          Checks that the namespace URI associated with the prefix of the qName argument is not null
static void nonNullNamespace(java.lang.String location, java.lang.String qName, org.xml.sax.helpers.NamespaceSupport namespaces)
          Checks that the namespace URI associated with the prefix of the qName argument is not null
static void notQName(java.lang.String location, java.lang.String argName, java.lang.String argValue)
          Checks that the ncName is not a qualified XML name
 
Methods inherited from class unannoy.util.ArgCheck
argString, argString, beginMessage, beginMessage, beginMessage, notNull, notNull, notNullOrEmpty, notNullOrEmpty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLArgCheck

public XMLArgCheck()
Method Detail

nonNullAttrNamespace

public static void nonNullAttrNamespace(java.lang.String location,
                                        java.lang.String qName,
                                        org.xml.sax.helpers.NamespaceSupport namespaces)
                                 throws NsPrefixUnresolvedException
Checks that the namespace URI associated with the prefix of the qName argument is not null. The difference between this and nonNullNamespace is that here we will do NOT check the default namespace.

Parameters:
location - a description of where the error occured; this would most likely be a function name in your code (this may be null)
qName - a qualifed XML name - if there is no prefix, we will never throw an exception, because unprefixed attributes do not belong to any namespace
namespaces - where to check the namespace URI
Throws:
NsPrefixUnresolvedException - if the namespace is null

nonNullNamespace

public static void nonNullNamespace(java.lang.String location,
                                    java.lang.String qName,
                                    org.xml.sax.helpers.NamespaceSupport namespaces)
                             throws NsPrefixUnresolvedException
Checks that the namespace URI associated with the prefix of the qName argument is not null

Parameters:
location - a description of where the error occured; this would most likely be a function name in your code (this may be null)
qName - either a qualifed XML name or a localName (NCName), if the latter, we assume the default namespace is what's worrying you
namespaces - where to check the namespace URI
Throws:
NsPrefixUnresolvedException - if the namespace is null

nonNullNamespace

public static void nonNullNamespace(java.lang.String qName,
                                    org.xml.sax.helpers.NamespaceSupport namespaces)
                             throws NsPrefixUnresolvedException
Checks that the namespace URI associated with the prefix of the qName argument is not null

Throws:
NsPrefixUnresolvedException - if the namespace is null

notQName

public static void notQName(java.lang.String location,
                            java.lang.String argName,
                            java.lang.String argValue)
                     throws java.lang.IllegalArgumentException
Checks that the ncName is not a qualified XML name

Parameters:
location - a description of the check was performed this would most likely be a function name in your code (this may be null)
argName - the name of the argument to check
argValue - the value of the argument to check (that is, the allegedly non-qualified name)
Throws:
java.lang.IllegalArgumentException - if the argument is qualified