Java Doc for TypeInfo.java in  » 6.0-JDK-Core » w3c » org » w3c » dom » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » w3c » org.w3c.dom 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.w3c.dom.TypeInfo

TypeInfo
public interface TypeInfo (Code)
The TypeInfo interface represents a type referenced from Element or Attr nodes, specified in the schemas associated with the document. The type is a pair of a namespace URI and name properties, and depends on the document's schema.

If the document's schema is an XML DTD [XML 1.0], the values are computed as follows:

  • If this type is referenced from an Attr node, typeNamespace is "http://www.w3.org/TR/REC-xml" and typeName represents the [attribute type] property in the [XML Information Set] . If there is no declaration for the attribute, typeNamespace and typeName are null.
  • If this type is referenced from an Element node, typeNamespace and typeName are null.

If the document's schema is an XML Schema [XML Schema Part 1] , the values are computed as follows using the post-schema-validation infoset contributions (also called PSVI contributions):

  • If the [validity] property exists AND is "invalid" or "notKnown": the {target namespace} and {name} properties of the declared type if available, otherwise null.

    Note: At the time of writing, the XML Schema specification does not require exposing the declared type. Thus, DOM implementations might choose not to provide type information if validity is not valid.

  • If the [validity] property exists and is "valid":
    1. If [member type definition] exists:
      1. If {name} is not absent, then expose {name} and {target namespace} properties of the [member type definition] property;
      2. Otherwise, expose the namespace and local name of the corresponding anonymous type name.
    2. If the [type definition] property exists:
      1. If {name} is not absent, then expose {name} and {target namespace} properties of the [type definition] property;
      2. Otherwise, expose the namespace and local name of the corresponding anonymous type name.
    3. If the [member type definition anonymous] exists:
      1. If it is false, then expose [member type definition name] and [member type definition namespace] properties;
      2. Otherwise, expose the namespace and local name of the corresponding anonymous type name.
    4. If the [type definition anonymous] exists:
      1. If it is false, then expose [type definition name] and [type definition namespace] properties;
      2. Otherwise, expose the namespace and local name of the corresponding anonymous type name.

Note: Other schema languages are outside the scope of the W3C and therefore should define how to represent their type systems using TypeInfo.

See also the Document Object Model (DOM) Level 3 Core Specification.
since:
   DOM Level 3



Field Summary
final public static  intDERIVATION_EXTENSION
     If the document's schema is an XML Schema [XML Schema Part 1] , this constant represents the derivation by extension.
final public static  intDERIVATION_LIST
     If the document's schema is an XML Schema [XML Schema Part 1] , this constant represents the list.
final public static  intDERIVATION_RESTRICTION
     If the document's schema is an XML Schema [XML Schema Part 1] , this constant represents the derivation by restriction if complex types are involved, or a restriction if simple types are involved.
final public static  intDERIVATION_UNION
     If the document's schema is an XML Schema [XML Schema Part 1] , this constant represents the union if simple types are involved.


Method Summary
public  StringgetTypeName()
     The name of a type declared for the associated element or attribute, or null if unknown.
public  StringgetTypeNamespace()
     The namespace of the type declared for the associated element or attribute or null if the element does not have declaration or if no namespace information is available.
public  booleanisDerivedFrom(String typeNamespaceArg, String typeNameArg, int derivationMethod)
     This method returns if there is a derivation between the reference type definition, i.e.

Field Detail
DERIVATION_EXTENSION
final public static int DERIVATION_EXTENSION(Code)
If the document's schema is an XML Schema [XML Schema Part 1] , this constant represents the derivation by extension.
The reference type definition is derived by extension from the other type definition if the other type definition can be reached recursively following the {base type definition} property from the reference type definition, and at least one of the derivation methods involved is an extension.



DERIVATION_LIST
final public static int DERIVATION_LIST(Code)
If the document's schema is an XML Schema [XML Schema Part 1] , this constant represents the list.
The reference type definition is derived by list from the other type definition if there exists two type definitions T1 and T2 such as the reference type definition is derived from T1 by DERIVATION_RESTRICTION or DERIVATION_EXTENSION, T2 is derived from the other type definition by DERIVATION_RESTRICTION, T1 has {variety} list, and T2 is the {item type definition}. Note that T1 could be the same as the reference type definition, and T2 could be the same as the other type definition.



DERIVATION_RESTRICTION
final public static int DERIVATION_RESTRICTION(Code)
If the document's schema is an XML Schema [XML Schema Part 1] , this constant represents the derivation by restriction if complex types are involved, or a restriction if simple types are involved.
The reference type definition is derived by restriction from the other type definition if the other type definition is the same as the reference type definition, or if the other type definition can be reached recursively following the {base type definition} property from the reference type definition, and all the derivation methods involved are restriction.



DERIVATION_UNION
final public static int DERIVATION_UNION(Code)
If the document's schema is an XML Schema [XML Schema Part 1] , this constant represents the union if simple types are involved.
The reference type definition is derived by union from the other type definition if there exists two type definitions T1 and T2 such as the reference type definition is derived from T1 by DERIVATION_RESTRICTION or DERIVATION_EXTENSION, T2 is derived from the other type definition by DERIVATION_RESTRICTION, T1 has {variety} union, and one of the {member type definitions} is T2. Note that T1 could be the same as the reference type definition, and T2 could be the same as the other type definition.





Method Detail
getTypeName
public String getTypeName()(Code)
The name of a type declared for the associated element or attribute, or null if unknown.



getTypeNamespace
public String getTypeNamespace()(Code)
The namespace of the type declared for the associated element or attribute or null if the element does not have declaration or if no namespace information is available.



isDerivedFrom
public boolean isDerivedFrom(String typeNamespaceArg, String typeNameArg, int derivationMethod)(Code)
This method returns if there is a derivation between the reference type definition, i.e. the TypeInfo on which the method is being called, and the other type definition, i.e. the one passed as parameters.
Parameters:
  typeNamespaceArg - the namespace of the other type definition.
Parameters:
  typeNameArg - the name of the other type definition.
Parameters:
  derivationMethod - the type of derivation and conditions applied between two types, as described in the list of constants provided in this interface. If the document's schema is a DTD or no schema is associated with the document, this method will always return false. If the document's schema is an XML Schema, the method will returntrue if the reference type definition is derived from the other type definition according to the derivation parameter. If the value of the parameter is 0 (no bit is set to 1 for the derivationMethod parameter), the method will return true if the other type definition can be reached by recursing any combination of {base type definition}, {item type definition}, or {member type definitions} from the reference type definition.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.