From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- .../external/w3c_dom/org/w3c/dom/TypeInfo.java | 185 +++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/TypeInfo.java (limited to 'libjava/classpath/external/w3c_dom/org/w3c/dom/TypeInfo.java') diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/TypeInfo.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/TypeInfo.java new file mode 100644 index 000000000..d36f3cc37 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/TypeInfo.java @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom; + +/** + * 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 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): + *

+ *

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 + */ +public interface TypeInfo { + /** + * The name of a type declared for the associated element or attribute, + * or null if unknown. + */ + public String getTypeName(); + + /** + * 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 String getTypeNamespace(); + + // DerivationMethods + /** + * 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. + */ + public static final int DERIVATION_RESTRICTION = 0x00000001; + /** + * 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. + */ + public static final int DERIVATION_EXTENSION = 0x00000002; + /** + * 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. + */ + public static final int DERIVATION_UNION = 0x00000004; + /** + * 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. + */ + public static final int DERIVATION_LIST = 0x00000008; + + /** + * 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. + * @param typeNamespaceArg the namespace of the other type definition. + * @param typeNameArg the name of the other type definition. + * @param derivationMethod the type of derivation and conditions applied + * between two types, as described in the list of constants provided + * in this interface. + * @return 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 + * true 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. + */ + public boolean isDerivedFrom(String typeNamespaceArg, + String typeNameArg, + int derivationMethod); + +} -- cgit v1.2.3