edu.stanford.rt.parser
Class RTParser

java.lang.Object
  |
  +--edu.stanford.rt.parser.RTParser
All Implemented Interfaces:
Constants, TagNameConstants

public class RTParser
extends java.lang.Object
implements TagNameConstants, Constants

Author:
Ninghui Li, Sandra Qiu
RTParser parses a XML-format CredentialStore document and transforms the various elements into their corresponding Java objects.

Field Summary
private  org.apache.xerces.parsers.DOMParser parser
           
 
Fields inherited from interface edu.stanford.rt.parser.TagNameConstants
ACCESS_RULE, ADVANCED_DELEGATION, APP_DOMAIN_SPEC, BASE, BASE_ROLE, CONTROL, CREDENTIAL, CREDENTIAL_IDENTIFIER, CREDENTIAL_STORE, DECIMAL_TYPE, DECIMAL_VALUE, DELEGATE_TO, DIMENSION, DOMAIN, DSA_KEY_VALUE, ENUM_TYPE, ENUM_VALUE, EQUALS, EXCLUSIVE_PRODUCT, EXCLUSIVE_PRODUCT_CONTAINMENT, EXTENSION, EXTERNAL_ROLE, FIELD, FROM, HEAD_ROLE_TERM, ID, IDENTITY, IDREF, IGNORE_CASE, IMPORT_DOMAIN, INCLUDE_CHILDREN, INCLUDE_CURRENT, INCLUDE_DESCENDENTS, INCLUDE_MAX, INCLUDE_MIN, INTEGER_TYPE, INTEGER_VALUE, INTERSECTION, INTERSECTION_CONTAINMENT, INTERVAL, IS_IDENTITY, ISSUE_AT, ISSUER, ISSUER_TRACES, KEY_HASH, KEY_VALUE, LINKED_CONTAINMENT, LINKED_ROLE, MAX, MIN, NAME, ORDER, ORDERED, PARAMETER, PLAIN, PREAMBLE, PRINCIPAL, PRINCIPAL_INFO, PRINCIPAL_REF, PRINCIPAL_TYPE, PRODUCT, PRODUCT_CONTAINMENT, PROJECTION, RECORD, RECORD_TYPE, REF, RESTRICTION, ROLE_DECLARATION, ROLE_TERM, ROOT_FIRST, ROOT_LAST, RSA_KEY_VALUE, RULE_IDENTIFIER, SEPARATOR, SET, SHORT_NAME, SIMPLE_CONTAINMENT, SIMPLE_DELEGATION, SIMPLE_MEMBER, SIZE, SPECIAL_PRINCIPAL, STEP, STRING_TYPE, STRING_VALUE, SUBJECT_TRACES, TIME_VALUE, TO, TREE_TYPE, TREE_VALUE, TYPE, URI, VALID_FROM, VALID_TO, VALIDITY_RULE, VALIDITY_TIME
 
Fields inherited from interface edu.stanford.rt.util.Constants
COLON, illegal_value_for, improper_sub_element_for, INDENT, ISSUER_TRACES_ALL, ISSUER_TRACES_DEF, ISSUER_TRACES_NONE, ISSUER_TRACES_RULE, missing_attr_value, no_support_for, SUBJECT_TRACES_ALL, SUBJECT_TRACES_FACT, SUBJECT_TRACES_NONE
 
Constructor Summary
RTParser()
          Constructor for RTParser.
 
Method Summary
 ApplicationDomain createSystemDomain()
          Method createSystemDomain.
static org.w3c.dom.Element[] getChildElements(org.w3c.dom.Element parent)
          Method getChildElements.
static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Element parent)
          Method getFirstChildElement.
static org.w3c.dom.Element getFirstChildElementByTagName(org.w3c.dom.Element parent, java.lang.String tagName)
           
private  ApplicationDomain locateDomain(java.lang.String idref, java.lang.String uri, RTContext rtContext)
          Method locateDomain.
 void parseCredentialStore(java.io.InputStream in, RTContext rtContext, CredentialStore credentialStore)
          Method parseCredentialStore.
 ApplicationDomain parseSystemDomain(java.io.InputStream in)
          Method parseSystemDomain.
 CredentialDomain transformAccessRule(org.w3c.dom.Element ele, RTContext rtContext)
           
private  PrincipalExpression transformBody(Principal issuer, CredentialDomain credDomain, org.w3c.dom.Element ele)
          Method transformBody.
 CredentialDomain transformCredential(org.w3c.dom.Element ele, RTContext rtContext)
          Method transformCredential.
 void transformCredentialStore(org.w3c.dom.Element root, RTContext rtContext, CredentialStore credentialStore)
          Method transformCredentialStore.
private  java.util.Date transformDateTime(java.lang.String typeName, java.lang.String dateTime)
          Method transformDateTime.
private  DecimalType transformDecimalTypeDeclaration(org.w3c.dom.Element ele)
          Method transformDecimalTypeDeclaration.
private  DecimalValue transformDecimalValue(DecimalType type, org.w3c.dom.Element ele)
          Method transformDecimalValue.
private  DelegationRole transformDelegation(Principal issuer, CredentialDomain credDomain, org.w3c.dom.Element delegationElement, org.w3c.dom.Element controlElement)
          Method transformDelegation.
 ApplicationDomain transformDomain(org.w3c.dom.Element ele, RTContext rtContext)
          Method parseDomain.
private  EnumType transformEnumTypeDeclaration(org.w3c.dom.Element ele, DomainSpecification currentSpec)
          Method transformEnumTypeDeclaration.
private  EnumValue transformEnumValue(EnumType type, org.w3c.dom.Element ele)
          Method transformEnumValue.
private  Role transformExternalRole(org.w3c.dom.Element ele, CredentialDomain credDomain)
          Method transformExternalRole.
private  IntegerType transformIntegerTypeDeclaration(org.w3c.dom.Element ele)
          Method transformIntegerTypeDeclaration.
private  IntegerValue transformIntegerValue(IntegerType type, org.w3c.dom.Element ele)
          Method transformIntegerValue.
private  IntervalValueSet transformIntervalValue(OrderedType type, org.w3c.dom.Element ele)
          Method transformIntervalValue.
private  DataValue transformOrderedValue(OrderedType type, org.w3c.dom.Element ele)
          Method transformOrderedValue.
private  void transformParameter(org.w3c.dom.Element ele, java.lang.StringBuffer prefix, RoleTerm roleTerm, CredentialDomain credDomain)
          Method transformParameter.
private  OrderedMap transformParameters(org.w3c.dom.NodeList nodes, DomainSpecification currentSpec)
          Method parseParameters.
private  SimpleType transformPrincipalTypeDeclaration(org.w3c.dom.Element ele, DomainSpecification currentSpec)
          Method transformPrincipalTypeDeclaration.
private  PrincipalValue transformPrincipalValue(org.w3c.dom.Element ele, CredentialDomain credDomain)
          Method transformPrincipalValue.
private  RecordType transformRecordTypeDeclaration(org.w3c.dom.Element ele, DomainSpecification currentSpec)
          Method transformRecordTypeDeclaration.
private  RoleDeclaration transformRoleDeclaration(org.w3c.dom.Element ele, DomainSpecification currentSpec)
          Method transformRoleDeclaration.
private  RoleDefinition transformRoleDefinition(Principal issuer, CredentialDomain credDomain, org.w3c.dom.Element ele)
          Method transformRoleDefinition.
private  RoleIntersection transformRoleIntersection(org.w3c.dom.Element ele, CredentialDomain credDomain)
          Method transformRoleIntersection.
private  RoleTerm transformRoleTerm(org.w3c.dom.Element ele, CredentialDomain credDomain)
          Method transformRoleTerm.
private  StringType transformStringTypeDeclaration(org.w3c.dom.Element ele)
          Method transformStringTypeDeclaration.
private  StringValue transformStringValue(StringType type, org.w3c.dom.Element ele)
          Method transformStringValue.
 ApplicationDomain transformSystemDomain(org.w3c.dom.Element root)
          Method transformSystemDomain.
private  TimeValue transformTimeValue(TimeType type, org.w3c.dom.Element ele)
          Method transformTimeValue.
private  TreeType transformTreeTypeDeclaration(org.w3c.dom.Element ele)
          Method transformTreeTypeDeclaration.
private  TreeValueSet transformTreeValue(TreeType type, org.w3c.dom.Element ele)
          Method transformTreeValue.
private  void transformValueGroup(SimpleType type, org.w3c.dom.Element ele, java.lang.StringBuffer prefix, RoleTerm roleTerm, CredentialDomain credDomain)
          Method transformValueGroup.
private  void transformValueSetGroup(DataType type, org.w3c.dom.Element ele, java.lang.StringBuffer prefix, RoleTerm roleTerm, CredentialDomain credDomain)
          Method transformValueSetGroup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parser

private org.apache.xerces.parsers.DOMParser parser
Constructor Detail

RTParser

public RTParser()
         throws java.lang.Exception
Constructor for RTParser.

Method Detail

createSystemDomain

public ApplicationDomain createSystemDomain()
                                     throws java.lang.Exception
Method createSystemDomain. The method for creating system domain. *** Only useful for our parser.

Returns:
ApplicationDomain
Throws:
java.lang.Exception

parseSystemDomain

public ApplicationDomain parseSystemDomain(java.io.InputStream in)
                                    throws java.lang.Exception
Method parseSystemDomain. parses system domain from a XML input source, typically a XML file. The system domain element in the source should be the root element.

Parameters:
in -
Returns:
ApplicationDomain
Throws:
java.lang.Exception

transformSystemDomain

public ApplicationDomain transformSystemDomain(org.w3c.dom.Element root)
                                        throws DomainSpecException
Method transformSystemDomain. transforms the XML element to the built-in system ApplicationDomain.

Parameters:
root - XML element of system domain.
Returns:
ApplicationDomain
Throws:
DomainSpecException

getFirstChildElement

public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Element parent)
Method getFirstChildElement. Returns the first child element of ELEMENT_NODE type for the given parent element.

Parameters:
parent -
Returns:
Element

getFirstChildElementByTagName

public static org.w3c.dom.Element getFirstChildElementByTagName(org.w3c.dom.Element parent,
                                                                java.lang.String tagName)

getChildElements

public static org.w3c.dom.Element[] getChildElements(org.w3c.dom.Element parent)
Method getChildElements. returns an array of child elements of ELEMNENT_NODE type.

Parameters:
parent -
Returns:
Element[]

parseCredentialStore

public void parseCredentialStore(java.io.InputStream in,
                                 RTContext rtContext,
                                 CredentialStore credentialStore)
                          throws java.lang.Exception
Method parseCredentialStore. parses credential store from an XML input source, typically an XML file. The CredentialStore element should be a root element.

Parameters:
in -
rtContext - the context in which the parsing occurs.
credentialStore - the credential store being constructed.
Throws:
DomainSpecException
java.lang.Exception

transformCredentialStore

public void transformCredentialStore(org.w3c.dom.Element root,
                                     RTContext rtContext,
                                     CredentialStore credentialStore)
                              throws DomainSpecException,
                                     CredException
Method transformCredentialStore.

Parameters:
root - the XML element of credential store
rtContext -
credentialStore -
Throws:
DomainSpecException
CredException

transformDomain

public ApplicationDomain transformDomain(org.w3c.dom.Element ele,
                                         RTContext rtContext)
                                  throws DomainSpecException
Method parseDomain. parses non-system ApplicationDomain.

Parameters:
ele - the ApplicationDomain element
rtContext - the context in which the transformation occurs.
Returns:
ApplicationDomain
Throws:
DomainSpecException

locateDomain

private ApplicationDomain locateDomain(java.lang.String idref,
                                       java.lang.String uri,
                                       RTContext rtContext)
                                throws DomainSpecException
Method locateDomain.

Parameters:
rtContext -
idref - the hash value of the target ApplicationDomainSpecification object.
uri -
Returns:
ApplicationDomain
Throws:
DomainSpecException - if cannot find the domain by the given idref.

transformIntegerTypeDeclaration

private IntegerType transformIntegerTypeDeclaration(org.w3c.dom.Element ele)
                                             throws DomainSpecException
Method transformIntegerTypeDeclaration. Parses IntegerType declaration in ADSD. Returns an IntegerType object by parsing element:
                 <IntegerType name="" min="" max=""/>
             

Parameters:
ele -
Returns:
IntegerType
Throws:
DomainSpecException

transformDecimalTypeDeclaration

private DecimalType transformDecimalTypeDeclaration(org.w3c.dom.Element ele)
                                             throws DomainSpecException
Method transformDecimalTypeDeclaration. Parses DecimalType declaration in ADSD. Returns a DecimalType object by parsing element:
                 <DecimalType name="" min="" max=""/>
             

Parameters:
ele -
Returns:
DecimalType
Throws:
DomainSpecException

transformStringTypeDeclaration

private StringType transformStringTypeDeclaration(org.w3c.dom.Element ele)
                                           throws DomainSpecException
Method transformStringTypeDeclaration. Parses StringType declaration in ADSD. Returns a StringType object by parsing element:
             <StringType name="" ignoreCase="false" ordered="false"/>
         

Parameters:
ele -
Returns:
StringType
Throws:
DomainSpecException

transformEnumTypeDeclaration

private EnumType transformEnumTypeDeclaration(org.w3c.dom.Element ele,
                                              DomainSpecification currentSpec)
                                       throws DomainSpecException
Method transformEnumTypeDeclaration. Parses EnumType declaration in ADSD. Returns an EnumType object by parsing element:
             <EnumType name="" ignoreCase="false" ordered="false"/>
                 <EnumValue>Monday</EnumValue>
                 <EnumValue>Wednesday</EnumValue>
                 <EnumValue>Friday</EnumValue>
                 ...
             </EnumType>
         

Parameters:
ele -
currentSpec -
Returns:
EnumType
Throws:
DomainSpecException

transformTreeTypeDeclaration

private TreeType transformTreeTypeDeclaration(org.w3c.dom.Element ele)
                                       throws DomainSpecException
Method transformTreeTypeDeclaration. Parses TreeType declaration in ADSD. Returns a TreeType object by parsing element:
             <TreeType name="DNSType" sparator="." order="rootLast"/>
         

Parameters:
ele -
Returns:
TreeType
Throws:
DomainSpecException

transformRecordTypeDeclaration

private RecordType transformRecordTypeDeclaration(org.w3c.dom.Element ele,
                                                  DomainSpecification currentSpec)
                                           throws DomainSpecException
Method transformRecordTypeDeclaration. Parses RecordType declaration in ADSD. Returns a RecordType object by parsing element:
             <RecordType name="record">
                 <Field name="field1">
                     <Type domain="" name=""/>
                 </Field>
                 <Field name="field2">
                     <Type domain="" name=""/>
                 </Field>
                 ...
             </RecordType>
         

Parameters:
ele -
currentSpec -
Returns:
RecordType
Throws:
DomainSpecException

transformPrincipalTypeDeclaration

private SimpleType transformPrincipalTypeDeclaration(org.w3c.dom.Element ele,
                                                     DomainSpecification currentSpec)
                                              throws DomainSpecException
Method transformPrincipalTypeDeclaration. Parses PrincipalType declaration in ADSD. Returns a SimpleType object by parsing element:
             <PrincialType name="prinType">
                 <TypeRef domain="" name=""/>
             </PrincialType>
         

Parameters:
ele -
currentSpec -
Returns:
SimpleType
Throws:
DomainSpecException

transformRoleDeclaration

private RoleDeclaration transformRoleDeclaration(org.w3c.dom.Element ele,
                                                 DomainSpecification currentSpec)
                                          throws DomainSpecException
Method transformRoleDeclaration. Parses RoleDeclaration in ADSD. Returns a RoleDeclaration object by parsing element:
             <RoleDeclaration name="record">
                 <Parameter name="param1">
                     <Type domain="" name=""/>
                 </Parameter>
                 <Parameter name="param2">
                     <Type domain="" name=""/>
                 </Parameter>
                 ...
             </RoleDeclaration>
         

Parameters:
ele -
currentSpec - the DomainSpecification in which the role is declared.
Returns:
RoleDeclaration
Throws:
DomainSpecException

transformParameters

private OrderedMap transformParameters(org.w3c.dom.NodeList nodes,
                                       DomainSpecification currentSpec)
                                throws DomainSpecException
Method parseParameters. parses Parameter declarations in RoleDeclaration element.

Parameters:
nodes - the list of Parameter elements
Returns:
OrderedMap an OrderedMap of parameter declarations with parameter names as keys.
DomainSpecException

transformCredential

public CredentialDomain transformCredential(org.w3c.dom.Element ele,
                                            RTContext rtContext)
                                     throws DomainSpecException,
                                            CredException
Method transformCredential. Returns a CredentialDomain object by parsing element:
       <Credential>
           ...
       </Credential>
   

Parameters:
ele -
rtContext -
Returns:
CredentialDomain
Throws:
DomainSpecException
CredException

transformAccessRule

public CredentialDomain transformAccessRule(org.w3c.dom.Element ele,
                                            RTContext rtContext)
                                     throws DomainSpecException,
                                            CredException
DomainSpecException
CredException

transformPrincipalValue

private PrincipalValue transformPrincipalValue(org.w3c.dom.Element ele,
                                               CredentialDomain credDomain)
                                        throws DomainSpecException
Method transformPrincipalValue.

Parameters:
ele -
credDomain -
Returns:
PrincipalValue
Throws:
DomainSpecException

transformRoleDefinition

private RoleDefinition transformRoleDefinition(Principal issuer,
                                               CredentialDomain credDomain,
                                               org.w3c.dom.Element ele)
                                        throws CredException,
                                               DomainSpecException
Method transformRoleDefinition. Returns a role definition object.

A role definition may be one the the following elements, i.e. SimpleMember, SimpleContainment, LinkedContainment, IntersectionContainment, ProductContainment, ExclusiveProductContainment, SimpleDelegation, or AdvancedDelegation. Each role definition has a head and a body. The head part is defined by a HeadRoleTerm. The difference between the above 8 elements lies in the body part.

The product role definition represented by ProductContainment and ExclusiveProductContainment has not been supported yet.

Parameters:
issuer -
credDomain -
ele -
Returns:
RoleDefinition
Throws:
CredException
DomainSpecException

transformBody

private PrincipalExpression transformBody(Principal issuer,
                                          CredentialDomain credDomain,
                                          org.w3c.dom.Element ele)
                                   throws CredException,
                                          DomainSpecException
Method transformBody. Returns a PrincipalExpression for the body of a role definition.

The body can be one of the following: PrincipalValue, RoleTerm, ExternalRole, LinkedRole, Intersection, Product, or a Delegation. The method handles all types of the role definition body except the Delegation role body.

Parameters:
issuer -
credDomain -
ele -
Returns:
PrincipalExpression
Throws:
CredException
DomainSpecException

transformDelegation

private DelegationRole transformDelegation(Principal issuer,
                                           CredentialDomain credDomain,
                                           org.w3c.dom.Element delegationElement,
                                           org.w3c.dom.Element controlElement)
                                    throws DomainSpecException,
                                           CredException
Method transformDelegation. Returns a DelegationRole object for the body of a role definition by parsing element:
             <SimpleDelegation>
                 ...
             </SimpleDelegation>
             
             Or
             
             <AdvancedDelegation>
                 ...
             </AdvancedDelegation>
         

Parameters:
issuer -
credDomain -
delegationElement -
controlElement -
Returns:
DelegationRole
Throws:
DomainSpecException
CredException

transformExternalRole

private Role transformExternalRole(org.w3c.dom.Element ele,
                                   CredentialDomain credDomain)
                            throws CredException,
                                   DomainSpecException
Method transformExternalRole. Returns an ExternalRole object by parsing element:
             <ExternalRole>
                 ...
             </ExternalRole>
         

Parameters:
ele -
credDomain -
Returns:
Role
Throws:
CredException
DomainSpecException

transformRoleIntersection

private RoleIntersection transformRoleIntersection(org.w3c.dom.Element ele,
                                                   CredentialDomain credDomain)
                                            throws CredException,
                                                   DomainSpecException
Method transformRoleIntersection. Returns an ExternalRole object by parsing element:
             <Intersection>
                 ...
             </Intersection>
         

Parameters:
ele -
credDomain -
Returns:
RoleIntersection
Throws:
CredException
DomainSpecException

transformRoleTerm

private RoleTerm transformRoleTerm(org.w3c.dom.Element ele,
                                   CredentialDomain credDomain)
                            throws CredException,
                                   DomainSpecException
Method transformRoleTerm. Returns a RoleTerm object by parsing element:
             <RoleTerm>
                 ...
             </RoleTerm> 
         

Parameters:
ele -
credDomain -
Returns:
RoleTerm
Throws:
CredException
DomainSpecException

transformParameter

private void transformParameter(org.w3c.dom.Element ele,
                                java.lang.StringBuffer prefix,
                                RoleTerm roleTerm,
                                CredentialDomain credDomain)
                         throws DomainSpecException
Method transformParameter. parses element:
             <Parameter name="aa" id="s">
                 ...
             </Parameter>
         

Parameters:
ele -
prefix -
roleTerm -
credDomain -
Throws:
DomainSpecException

transformValueSetGroup

private void transformValueSetGroup(DataType type,
                                    org.w3c.dom.Element ele,
                                    java.lang.StringBuffer prefix,
                                    RoleTerm roleTerm,
                                    CredentialDomain credDomain)
                             throws DomainSpecException
Method transformValueSetGroup. Parses Parameter value elements and stores the prefix and value mapping in the RoleTerm object.

Parameters:
type -
ele -
prefix -
roleTerm -
credDomain -
Throws:
DomainSpecException

transformValueGroup

private void transformValueGroup(SimpleType type,
                                 org.w3c.dom.Element ele,
                                 java.lang.StringBuffer prefix,
                                 RoleTerm roleTerm,
                                 CredentialDomain credDomain)
                          throws DomainSpecException
Method transformValueGroup. Parses Value choice group, which can be one of the following: IntegerValue, DecimalValue, StringValue, EnumValue, TimeValue, or PrincipalValue.

Parameters:
type -
ele -
prefix -
roleTerm -
credDomain -
Throws:
DomainSpecException

transformIntervalValue

private IntervalValueSet transformIntervalValue(OrderedType type,
                                                org.w3c.dom.Element ele)
                                         throws DomainSpecException
Method transformIntervalValue. Returns an IntervalValue object by parsing element:
             <Interval includeMin="true" includeMax="true">
                 <min> ... </min>
                 <max> ... </max>
             </Interval>
         

Parameters:
type -
ele -
Returns:
IntervalValueSet
Throws:
DomainSpecException

transformOrderedValue

private DataValue transformOrderedValue(OrderedType type,
                                        org.w3c.dom.Element ele)
                                 throws DomainSpecException
Method transformOrderedValue. Returns DataValue by parsing elements:
             <IntegerValue> ... </IntegerValue> or 
     
             <DecimalValue> ... </DecimalValue> or
     
             <StirngValue> ... </StringValue> or
     
             <EnumValue> ... </EnumValue> or
     
             <TimeValue> ... </timeValue>
         

Parameters:
type -
ele -
Returns:
DataValue
Throws:
DomainSpecException

transformIntegerValue

private IntegerValue transformIntegerValue(IntegerType type,
                                           org.w3c.dom.Element ele)
                                    throws DomainSpecException
Method transformIntegerValue. Returns an IntegerValue object by parsing element:
             <IntegerValue>
                 123
             </IntegerValue>
         

Parameters:
type -
ele -
Returns:
IntegerValue
Throws:
DomainSpecException

transformDecimalValue

private DecimalValue transformDecimalValue(DecimalType type,
                                           org.w3c.dom.Element ele)
                                    throws DomainSpecException
Method transformDecimalValue. Returns a DecimalValue object by parsing element:
             <DecimalValue>
                 123
             </DecimalValue>
         

Parameters:
type -
ele -
Returns:
DecimalValue
Throws:
DomainSpecException

transformStringValue

private StringValue transformStringValue(StringType type,
                                         org.w3c.dom.Element ele)
                                  throws DomainSpecException
Method transformStringValue. Returns a StringValue object by parsing element:
             <StringValue>
                 123
             </StringValue>
         

Parameters:
type -
ele -
Returns:
StringValue
Throws:
DomainSpecException

transformEnumValue

private EnumValue transformEnumValue(EnumType type,
                                     org.w3c.dom.Element ele)
                              throws DomainSpecException
Method transformEnumValue. Returns an EnumValue object by parsing element:
             <EnumValue>
                 123
             </EnumValue>
         

Parameters:
type -
ele -
Returns:
EnumValue
Throws:
DomainSpecException

transformTreeValue

private TreeValueSet transformTreeValue(TreeType type,
                                        org.w3c.dom.Element ele)
                                 throws DomainSpecException
Method transformTreeValue. Returns a TreeValueSet object by parsing element:
             <TreeValue includeCurrent="true" 
                        includeChildren="true" 
                        includeDescendents="false">    
                 cs.stanford.edu
             </TreeValue>
         

Parameters:
type -
ele -
Returns:
TreeValueSet
Throws:
DomainSpecException

transformTimeValue

private TimeValue transformTimeValue(TimeType type,
                                     org.w3c.dom.Element ele)
                              throws DomainSpecException
Method transformTimeValue. Returns a TimeValue object by parsing element:
             <TimeValue>
                 2002-08-29T09:31:32
             </TimeValue>
         

Parameters:
type -
ele -
Returns:
TimeValue
Throws:
DomainSpecException

transformDateTime

private java.util.Date transformDateTime(java.lang.String typeName,
                                         java.lang.String dateTime)
                                  throws DomainSpecException
Method transformDateTime. Returns a java.uti.Date object from the given XML Schema datetype name and the dateTime stirng. By using Sun XML Datetype Library, we validate dateTime against the corresonding datetype specified by typeName. DomainSpecExeption is thrown when validation fails.

Parameters:
typeName -
dateTime -
Returns:
Date
Throws:
DomainSpecException