org.apache.xerces.impl.validation.datatypes.eTypes.Data
Class uri

java.lang.Object
  |
  +--org.apache.xerces.impl.validation.datatypes.eTypes.Models.AbstractProperty
        |
        +--org.apache.xerces.impl.validation.datatypes.eTypes.Models.PartialOrder
              |
              +--org.apache.xerces.impl.validation.datatypes.eTypes.Data.BasicStringProperty
                    |
                    +--org.apache.xerces.impl.validation.datatypes.eTypes.Data.uri

public class uri
extends BasicStringProperty

Pieces of a uri are available using getComponent

Version:
$Id: uri.java,v 1.1.2.1 2000/10/28 00:04:42 jeffreyr Exp $
Author:
Leonard C. Berman, Jeffrey Rodriguez

Inner classes inherited from class org.apache.xerces.impl.validation.datatypes.eTypes.Models.AbstractProperty
AbstractProperty.AbstractSummary
 
Field Summary
 java.util.Vector stack
           
 
Fields inherited from class org.apache.xerces.impl.validation.datatypes.eTypes.Data.BasicStringProperty
classNumberSubProperties, evalMaxLenClosed, evalMaxLenOpen, evalMinLenClosed, evalMinLenOpen, evalPattern, MAX_LEN, MIN_LEN, PATTERN, sValue
 
Fields inherited from class org.apache.xerces.impl.validation.datatypes.eTypes.Models.PartialOrder
classNumberSubProperties, CLOSED_ABOVE, CLOSED_BELOW, MAX, MIN
 
Fields inherited from class org.apache.xerces.impl.validation.datatypes.eTypes.Models.AbstractProperty
classNumberSubProperties, ht, required
 
Constructor Summary
uri()
          Returns the substring of the uri, which is matched by the non-terminal specified by request.
 
Method Summary
 java.lang.String getComponent(java.lang.String request)
           
static void main(java.lang.String[] args)
           
 boolean validate(java.lang.String str)
          Determines whethr a string matches uriReference from rfc2396
 boolean validateAs(java.lang.String str, java.lang.String type)
          Determines whether the first parameter, is an instance of the rfc 2396 non-terminal contained in the second parameter.
 
Methods inherited from class org.apache.xerces.impl.validation.datatypes.eTypes.Data.BasicStringProperty
accumulate, compareTo, enableSubProp, evalMaxLenClosed, evalMaxLenOpen, evalMinLenClosed, evalMinLenOpen, evalPattern, getMaxLength, getMinLength, getPattern, getPatternOptions, getSValue, mapString, setMaxLength, setMinLength, setPattern, setPattern, setSValue, twin
 
Methods inherited from class org.apache.xerces.impl.validation.datatypes.eTypes.Models.PartialOrder
getBound, getClosed, glb, gt, isBounded, isClosed, lt, lub, merge, merge, setBound, setClosed
 
Methods inherited from class org.apache.xerces.impl.validation.datatypes.eTypes.Models.AbstractProperty
accumulate, add2Report, clone, getJClass, getName, getPossible, getReport, getSubProp, getSubPropEval, getSubPropMerge, getSubPropName, getSubPropNameIndex, merge, msg, resetAccumulator, resetConstraint, resetInstance, setJClass, setName, setPossible, setRequired, setSubProp, setSubProp, setSubPropEval, setSubPropMerge, setSubPropName, toString, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

stack

public java.util.Vector stack
Constructor Detail

uri

public uri()
Returns the substring of the uri, which is matched by the non-terminal specified by request.

The search for the appropriate string traverses the parse tree of the uri. Only values, which occur on the right hand side of a production beginning with one of the following 31 rfc 2396 non-terminals, can return non-null:

"$IPv4address", "$URIreference", "$abs_path", "$absoluteURI", "$alpha", "$alphanum", "$authority", "$domainlabel", "$escaped", "$fragment", "$hex", "$hier_part", "$host", "$hostname", "$hostport", "$mark", "$net_path", "$opaque_part", "$param", "$path", "$path_segments", "$pchar", "$port", "$query", "$reg_name", "$rel_path", "$rel_segment", "$relativeURI", "$reserved", "$scheme", "$segment", "$server", "$toplabel", "$unreserved", "$uric", "$uric_no_slash", "$userinfo",

Parameters:
request - java.lang.String. request should be a non-terminal from the grammar contained in rfc2396
Method Detail

getComponent

public java.lang.String getComponent(java.lang.String request)

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException,
                        java.io.FileNotFoundException

validate

public boolean validate(java.lang.String str)
Determines whethr a string matches uriReference from rfc2396
Overrides:
validate in class BasicStringProperty
Parameters:
str - java.lang.String
Returns:
boolean

validateAs

public boolean validateAs(java.lang.String str,
                          java.lang.String type)
Determines whether the first parameter, is an instance of the rfc 2396 non-terminal contained in the second parameter. Valid second parameters are:

"$IPv4address", "$URIreference", "$abs_path", "$absoluteURI", "$alpha", "$alphanum", "$authority", "$domainlabel", "$escaped", "$fragment", "$hex", "$hier_part", "$host", "$hostname", "$hostport", "$mark", "$net_path", "$opaque_part", "$param", "$path", "$path_segments", "$pchar", "$port", "$query", "$reg_name", "$rel_path", "$rel_segment", "$relativeURI", "$reserved", "$scheme", "$segment", "$server", "$toplabel", "$unreserved", "$uric", "$uric_no_slash", "$userinfo",

Parameters:
str - java.lang.String
type - java.lang.String - rfc 2396 non-terminal
Returns:
boolean


Copyright © 1999-2001 Apache XML Project. All Rights Reserved.