jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [04/24] jena git commit: JENA-1537: Remove dependency on Xerces. Import needed code
Date Fri, 04 May 2018 09:03:05 GMT
http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSModelGroupDefinition.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSModelGroupDefinition.java b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSModelGroupDefinition.java
new file mode 100644
index 0000000..0817480
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSModelGroupDefinition.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.ext.xerces.xs;
+
+/**
+ * This interface represents the Model Group Definition schema component.
+ */
+public interface XSModelGroupDefinition extends XSObject {
+    /**
+     * A model group. 
+     */
+    public XSModelGroup getModelGroup();
+
+    /**
+     * An annotation if it exists, otherwise <code>null</code>. If not null
+     * then the first [annotation] from the sequence of annotations.
+     */
+    public XSAnnotation getAnnotation();
+
+    /**
+     * A sequence of [annotations] or an empty <code>XSObjectList</code>.
+     */
+    public XSObjectList getAnnotations();    
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSMultiValueFacet.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSMultiValueFacet.java b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSMultiValueFacet.java
new file mode 100644
index 0000000..abcd829
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSMultiValueFacet.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.ext.xerces.xs;
+
+import org.apache.jena.ext.xerces.xs.datatypes.ObjectList;
+
+/**
+ * Describes a multi-value constraining facets: pattern and enumeration.
+ */
+public interface XSMultiValueFacet extends XSObject {
+    /**
+     * The name of the facet, i.e. <code>FACET_ENUMERATION</code> and 
+     * <code>FACET_PATTERN</code> (see <code>XSSimpleTypeDefinition</code>). 
+     */
+    public short getFacetKind();
+
+    /**
+     * Values of this facet. 
+     */
+    public StringList getLexicalFacetValues();
+
+    /**
+     * A list of XSValue objects. The actual enumeration values.
+     */
+    public ObjectList getEnumerationValues();
+
+    /**
+     * A sequence of [annotations] or an empty <code>XSObjectList</code>.
+     */
+    public XSObjectList getAnnotations();
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSNamedMap.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSNamedMap.java b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSNamedMap.java
new file mode 100644
index 0000000..2594460
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSNamedMap.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.ext.xerces.xs;
+
+import java.util.Map;
+
+/**
+ * Objects implementing the <code>XSNamedMap</code> interface are used to 
+ * represent immutable collections of XML Schema components that can be 
+ * accessed by name. Note that <code>XSNamedMap</code> does not inherit from 
+ * <code>XSObjectList</code>. The <code>XSObject</code>s in 
+ * <code>XSNamedMap</code>s are not maintained in any particular order. 
+ */
+@SuppressWarnings("all")
+public interface XSNamedMap extends Map {
+    /**
+     * The number of <code>XSObjects</code> in the <code>XSObjectList</code>. 
+     * The range of valid child object indices is 0 to <code>length-1</code> 
+     * inclusive. 
+     */
+    public int getLength();
+
+    /**
+     *  Returns the <code>index</code>th item in the collection or 
+     * <code>null</code> if <code>index</code> is greater than or equal to 
+     * the number of objects in the list. The index starts at 0. 
+     * @param index  index into the collection. 
+     * @return  The <code>XSObject</code> at the <code>index</code>th 
+     *   position in the <code>XSObjectList</code>, or <code>null</code> if 
+     *   the index specified is not valid. 
+     */
+    public XSObject item(int index);
+
+    /**
+     * Retrieves an <code>XSObject</code> specified by local name and 
+     * namespace URI.
+     * <br>Per XML Namespaces, applications must use the value <code>null</code> as the 
+     * <code>namespace</code> parameter for methods if they wish to specify 
+     * no namespace.
+     * @param namespace The namespace URI of the <code>XSObject</code> to 
+     *   retrieve, or <code>null</code> if the <code>XSObject</code> has no 
+     *   namespace. 
+     * @param localName The local name of the <code>XSObject</code> to 
+     *   retrieve.
+     * @return A <code>XSObject</code> (of any type) with the specified local 
+     *   name and namespace URI, or <code>null</code> if they do not 
+     *   identify any object in this map.
+     */
+    public XSObject itemByName(String namespace, 
+                               String localName);
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSNamespaceItem.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSNamespaceItem.java b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSNamespaceItem.java
new file mode 100644
index 0000000..cca0d79
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSNamespaceItem.java
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.ext.xerces.xs;
+
+/**
+ * The interface represents the namespace schema information information item. 
+ * Each namespace schema information information item corresponds to an XML 
+ * Schema with a unique namespace name.
+ */
+public interface XSNamespaceItem {
+    /**
+     * [schema namespace]: A namespace name or <code>null</code> if absent.
+     */
+    public String getSchemaNamespace();
+
+    /**
+     * [schema components]: a list of top-level components, i.e. element 
+     * declarations, attribute declarations, etc. Identity-constraint
+     * definitions are also considered top-level.
+     * 
+     * @param objectType The type of the declaration, i.e. 
+     *   <code>ELEMENT_DECLARATION</code>. Note that 
+     *   <code>XSTypeDefinition.SIMPLE_TYPE</code> and 
+     *   <code>XSTypeDefinition.COMPLEX_TYPE</code> can also be used as the 
+     *   <code>objectType</code> to retrieve only complex types or simple 
+     *   types, instead of all types.
+     * @return  A list of top-level definition of the specified type in 
+     *   <code>objectType</code> or an empty <code>XSNamedMap</code> if no 
+     *   such definitions exist. 
+     */
+    public XSNamedMap getComponents(short objectType);
+
+    /**
+     *  [annotations]: a set of annotations if it exists, otherwise an empty 
+     * <code>XSObjectList</code>.
+     */
+    public XSObjectList getAnnotations();
+
+    /**
+     * Convenience method. Returns a top-level element declaration. 
+     * @param name The name of the declaration.
+     * @return A top-level element declaration or <code>null</code> if such a 
+     *   declaration does not exist. 
+     */
+    public XSElementDeclaration getElementDeclaration(String name);
+
+    /**
+     * Convenience method. Returns a top-level attribute declaration. 
+     * @param name The name of the declaration.
+     * @return A top-level attribute declaration or <code>null</code> if such 
+     *   a declaration does not exist. 
+     */
+    public XSAttributeDeclaration getAttributeDeclaration(String name);
+
+    /**
+     * Convenience method. Returns a top-level simple or complex type 
+     * definition. 
+     * @param name The name of the definition.
+     * @return An <code>XSTypeDefinition</code> or <code>null</code> if such 
+     *   a definition does not exist. 
+     */
+    public XSTypeDefinition getTypeDefinition(String name);
+
+    /**
+     * Convenience method. Returns a top-level attribute group definition. 
+     * @param name The name of the definition.
+     * @return A top-level attribute group definition or <code>null</code> if 
+     *   such a definition does not exist. 
+     */
+    public XSAttributeGroupDefinition getAttributeGroup(String name);
+
+    /**
+     * Convenience method. Returns a top-level model group definition. 
+     * @param name The name of the definition.
+     * @return A top-level model group definition definition or 
+     *   <code>null</code> if such a definition does not exist. 
+     */
+    public XSModelGroupDefinition getModelGroupDefinition(String name);
+
+    /**
+     * Convenience method. Returns a top-level notation declaration. 
+     * @param name The name of the declaration.
+     * @return A top-level notation declaration or <code>null</code> if such 
+     *   a declaration does not exist. 
+     */
+    public XSNotationDeclaration getNotationDeclaration(String name);
+
+    /**
+     * Convenience method. Returns an identity-constraint definition.
+     * @param name The name of the definition.
+     * @return An identity-constraint definition or <code>null</code> if such 
+     *   a declaration does not exist. 
+     */
+    public XSIDCDefinition getIDCDefinition(String name);
+
+    /**
+     * [document location] - a list of location URIs for the documents that 
+     * contributed to the <code>XSModel</code>.
+     */
+    public StringList getDocumentLocations();
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSNamespaceItemList.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSNamespaceItemList.java b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSNamespaceItemList.java
new file mode 100644
index 0000000..11932c4
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSNamespaceItemList.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.ext.xerces.xs;
+
+import java.util.List;
+
+/**
+ *  The <code>XSNamesaceItemList</code> interface provides the abstraction of 
+ * an immutable ordered collection of <code>XSNamespaceItem</code>s, without 
+ * defining or constraining how this collection is implemented. 
+ */
+@SuppressWarnings("rawtypes")
+public interface XSNamespaceItemList extends List {
+    /**
+     *  The number of <code>XSNamespaceItem</code>s in the list. The range of 
+     * valid child object indices is 0 to <code>length-1</code> inclusive. 
+     */
+    public int getLength();
+
+    /**
+     *  Returns the <code>index</code>th item in the collection or 
+     * <code>null</code> if <code>index</code> is greater than or equal to 
+     * the number of objects in the list. The index starts at 0. 
+     * @param index  index into the collection. 
+     * @return  The <code>XSNamespaceItem</code> at the <code>index</code>th 
+     *   position in the <code>XSNamespaceItemList</code>, or 
+     *   <code>null</code> if the index specified is not valid. 
+     */
+    public XSNamespaceItem item(int index);
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSNotationDeclaration.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSNotationDeclaration.java b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSNotationDeclaration.java
new file mode 100644
index 0000000..cca1e2b
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSNotationDeclaration.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.ext.xerces.xs;
+
+/**
+ *  This interface represents the Notation Declaration schema component. 
+ */
+public interface XSNotationDeclaration extends XSObject {
+    /**
+     *  The URI reference representing the system identifier for the notation 
+     * declaration, if present, <code>null</code> otherwise. 
+     */
+    public String getSystemId();
+
+    /**
+     *  The string representing the public identifier for this notation 
+     * declaration, if present; <code>null</code> otherwise. 
+     */
+    public String getPublicId();
+
+    /**
+     * An annotation if it exists, otherwise <code>null</code>. If not null
+     * then the first [annotation] from the sequence of annotations.
+     */
+    public XSAnnotation getAnnotation();
+
+    /**
+     * A sequence of [annotations] or an empty <code>XSObjectList</code>.
+     */
+    public XSObjectList getAnnotations();    
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSObject.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSObject.java b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSObject.java
new file mode 100644
index 0000000..bd09dd6
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSObject.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.ext.xerces.xs;
+
+/**
+ * The <code>XSObject</code> is a base object for the XML Schema component 
+ * model. 
+ */
+public interface XSObject {
+    /**
+     *  The <code>type</code> of this object, i.e. 
+     * <code>ELEMENT_DECLARATION</code>. 
+     */
+    public short getType();
+
+    /**
+     * The name of type <code>NCName</code>, as defined in XML Namespaces, of 
+     * this declaration specified in the <code>{name}</code> property of the 
+     * component or <code>null</code> if the definition of this component 
+     * does not have a <code>{name}</code> property. For anonymous types, 
+     * the processor must construct and expose an anonymous type name that 
+     * is distinct from the name of every named type and the name of every 
+     * other anonymous type.
+     */
+    public String getName();
+
+    /**
+     *  The [target namespace] of this object, or <code>null</code> if it is 
+     * unspecified. 
+     */
+    public String getNamespace();
+
+    /**
+     * A namespace schema information item corresponding to the target 
+     * namespace of the component, if it is globally declared; or 
+     * <code>null</code> otherwise.
+     */
+    public XSNamespaceItem getNamespaceItem();
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSObjectList.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSObjectList.java b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSObjectList.java
new file mode 100644
index 0000000..aec24ed
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSObjectList.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.ext.xerces.xs;
+
+import java.util.List;
+
+/**
+ *  The <code>XSObjectList</code> interface provides the abstraction of an 
+ * immutable ordered collection of <code>XSObject</code>s, without defining 
+ * or constraining how this collection is implemented. 
+ */
+@SuppressWarnings("rawtypes")
+public interface XSObjectList extends List {
+    /**
+     *  The number of <code>XSObjects</code> in the list. The range of valid 
+     * child object indices is 0 to <code>length-1</code> inclusive. 
+     */
+    public int getLength();
+
+    /**
+     *  Returns the <code>index</code>th item in the collection or 
+     * <code>null</code> if <code>index</code> is greater than or equal to 
+     * the number of objects in the list. The index starts at 0. 
+     * @param index  index into the collection. 
+     * @return  The <code>XSObject</code> at the <code>index</code>th 
+     *   position in the <code>XSObjectList</code>, or <code>null</code> if 
+     *   the index specified is not valid. 
+     */
+    public XSObject item(int index);
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSParticle.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSParticle.java b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSParticle.java
new file mode 100644
index 0000000..ee61a48
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSParticle.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.ext.xerces.xs;
+
+/**
+ * This interface represents the Particle schema component.
+ */
+public interface XSParticle extends XSObject {
+    /**
+     * [min occurs]: determines the minimum number of terms that can occur. 
+     */
+    public int getMinOccurs();
+
+    /**
+     *  [max occurs]: determines the maximum number of terms that can occur. 
+     * To query for the value of unbounded use 
+     * <code>maxOccursUnbounded</code>. When the value of 
+     * <code>maxOccursUnbounded</code> is <code>true</code>, the value of 
+     * <code>maxOccurs</code> is unspecified. 
+     */
+    public int getMaxOccurs();
+
+    /**
+     * [max occurs]: whether the maxOccurs value is unbounded.
+     */
+    public boolean getMaxOccursUnbounded();
+
+    /**
+     * [term]: one of a model group, a wildcard, or an element declaration. 
+     */
+    public XSTerm getTerm();
+
+    /**
+     * A sequence of [annotations] or an empty <code>XSObjectList</code>.
+     */
+    public XSObjectList getAnnotations();    
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSSimpleTypeDefinition.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSSimpleTypeDefinition.java b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSSimpleTypeDefinition.java
new file mode 100644
index 0000000..0c5d23f
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSSimpleTypeDefinition.java
@@ -0,0 +1,244 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.ext.xerces.xs;
+
+/**
+ * This interface represents the Simple Type Definition schema component. This 
+ * interface provides several query operations for facet components. Users 
+ * can either retrieve the defined facets as XML Schema components, using 
+ * the <code>facets</code> and the <code>multiValueFacets</code> attributes; 
+ * or users can separately query a facet's properties using methods such as 
+ * <code>getLexicalFacetValue</code>, <code>isFixedFacet</code>, etc. 
+ */
+public interface XSSimpleTypeDefinition extends XSTypeDefinition {
+    // Variety definitions
+    /**
+     * The variety is absent for the anySimpleType definition.
+     */
+    public static final short VARIETY_ABSENT            = 0;
+    /**
+     * <code>Atomic</code> type.
+     */
+    public static final short VARIETY_ATOMIC            = 1;
+    /**
+     * <code>List</code> type.
+     */
+    public static final short VARIETY_LIST              = 2;
+    /**
+     * <code>Union</code> type.
+     */
+    public static final short VARIETY_UNION             = 3;
+
+    // Facets
+    /**
+     * No facets defined.
+     */
+    public static final short FACET_NONE                = 0;
+    /**
+     * 4.3.1 Length
+     */
+    public static final short FACET_LENGTH              = 1;
+    /**
+     * 4.3.2 minLength. 
+     */
+    public static final short FACET_MINLENGTH           = 2;
+    /**
+     * 4.3.3 maxLength.
+     */
+    public static final short FACET_MAXLENGTH           = 4;
+    /**
+     * 4.3.4 pattern.
+     */
+    public static final short FACET_PATTERN             = 8;
+    /**
+     * 4.3.5 whitespace.
+     */
+    public static final short FACET_WHITESPACE          = 16;
+    /**
+     * 4.3.7 maxInclusive.
+     */
+    public static final short FACET_MAXINCLUSIVE        = 32;
+    /**
+     * 4.3.9 maxExclusive.
+     */
+    public static final short FACET_MAXEXCLUSIVE        = 64;
+    /**
+     * 4.3.9 minExclusive.
+     */
+    public static final short FACET_MINEXCLUSIVE        = 128;
+    /**
+     * 4.3.10 minInclusive.
+     */
+    public static final short FACET_MININCLUSIVE        = 256;
+    /**
+     * 4.3.11 totalDigits .
+     */
+    public static final short FACET_TOTALDIGITS         = 512;
+    /**
+     * 4.3.12 fractionDigits.
+     */
+    public static final short FACET_FRACTIONDIGITS      = 1024;
+    /**
+     * 4.3.5 enumeration.
+     */
+    public static final short FACET_ENUMERATION         = 2048;
+
+    /**
+     * A constant defined for the 'ordered' fundamental facet: not ordered.
+     */
+    public static final short ORDERED_FALSE             = 0;
+    /**
+     * A constant defined for the 'ordered' fundamental facet: partially 
+     * ordered.
+     */
+    public static final short ORDERED_PARTIAL           = 1;
+    /**
+     * A constant defined for the 'ordered' fundamental facet: total ordered.
+     */
+    public static final short ORDERED_TOTAL             = 2;
+    /**
+     * [variety]: one of {atomic, list, union} or absent. 
+     */
+    public short getVariety();
+
+    /**
+     * If variety is <code>atomic</code> the primitive type definition (a 
+     * built-in primitive datatype definition or the simple ur-type 
+     * definition) is available, otherwise <code>null</code>. 
+     */
+    public XSSimpleTypeDefinition getPrimitiveType();
+
+    /**
+     * Returns the closest built-in type category this type represents or 
+     * derived from. For example, if this simple type is a built-in derived 
+     * type integer the <code>INTEGER_DV</code> is returned.
+     */
+    public short getBuiltInKind();
+
+    /**
+     * If variety is <code>list</code> the item type definition (an atomic or 
+     * union simple type definition) is available, otherwise 
+     * <code>null</code>. 
+     */
+    public XSSimpleTypeDefinition getItemType();
+
+    /**
+     * If variety is <code>union</code> the list of member type definitions (a 
+     * non-empty sequence of simple type definitions) is available, 
+     * otherwise an empty <code>XSObjectList</code>. 
+     */
+    public XSObjectList getMemberTypes();
+
+    /**
+     * [facets]: all facets defined on this type. The value is a bit 
+     * combination of FACET_XXX constants of all defined facets. 
+     */
+    public short getDefinedFacets();
+
+    /**
+     * Convenience method. [Facets]: check whether a facet is defined on this 
+     * type.
+     * @param facetName  The name of the facet. 
+     * @return  True if the facet is defined, false otherwise.
+     */
+    public boolean isDefinedFacet(short facetName);
+
+    /**
+     * [facets]: all defined facets for this type which are fixed.
+     */
+    public short getFixedFacets();
+
+    /**
+     * Convenience method. [Facets]: check whether a facet is defined and 
+     * fixed on this type. 
+     * @param facetName  The name of the facet. 
+     * @return  True if the facet is fixed, false otherwise.
+     */
+    public boolean isFixedFacet(short facetName);
+
+    /**
+     * Convenience method. Returns a value of a single constraining facet for 
+     * this simple type definition. This method must not be used to retrieve 
+     * values for <code>enumeration</code> and <code>pattern</code> facets. 
+     * @param facetName The name of the facet, i.e. 
+     *   <code>FACET_LENGTH, FACET_TOTALDIGITS</code>.
+     *   To retrieve the value for a pattern or 
+     *   an enumeration, see <code>enumeration</code> and 
+     *   <code>pattern</code>.
+     * @return A value of the facet specified in <code>facetName</code> for 
+     *   this simple type definition or <code>null</code>. 
+     */
+    public String getLexicalFacetValue(short facetName);
+
+    /**
+     * A list of enumeration values if it exists, otherwise an empty 
+     * <code>StringList</code>. 
+     */
+    public StringList getLexicalEnumeration();
+
+    /**
+     * A list of pattern values if it exists, otherwise an empty 
+     * <code>StringList</code>. 
+     */
+    public StringList getLexicalPattern();
+
+    /**
+     *  Fundamental Facet: ordered. 
+     */
+    public short getOrdered();
+
+    /**
+     * Fundamental Facet: cardinality. 
+     */
+    public boolean getFinite();
+
+    /**
+     * Fundamental Facet: bounded. 
+     */
+    public boolean getBounded();
+
+    /**
+     * Fundamental Facet: numeric. 
+     */
+    public boolean getNumeric();
+
+    /**
+     *  A list of constraining facets if it exists, otherwise an empty 
+     * <code>XSObjectList</code>. Note: This method must not be used to 
+     * retrieve values for <code>enumeration</code> and <code>pattern</code> 
+     * facets. 
+     */
+    public XSObjectList getFacets();
+
+    /**
+     *  A list of enumeration and pattern constraining facets if it exists, 
+     * otherwise an empty <code>XSObjectList</code>. 
+     */
+    public XSObjectList getMultiValueFacets();
+
+    /**
+     * A constraining facet object. An instance of XSFacet or XSMultiValueFacet.
+     */
+    public XSObject getFacet(int facetType);
+
+    /**
+     * A sequence of [annotations] or an empty <code>XSObjectList</code>.
+     */
+    public XSObjectList getAnnotations();
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSTerm.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSTerm.java b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSTerm.java
new file mode 100644
index 0000000..c07065a
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSTerm.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.ext.xerces.xs;
+
+/**
+ * Describes a term that can be one of a model group, a wildcard, or an 
+ * element declaration. Objects implementing 
+ * <code>XSElementDeclaration</code>, <code>XSModelGroup</code> and 
+ * <code>XSWildcard</code> interfaces also implement this interface. 
+ */
+public interface XSTerm extends XSObject {
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSTypeDefinition.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSTypeDefinition.java b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSTypeDefinition.java
new file mode 100644
index 0000000..f1dde67
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSTypeDefinition.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.ext.xerces.xs;
+
+/**
+ * This interface represents a complex or simple type definition.
+ */
+public interface XSTypeDefinition extends XSObject {
+    /**
+     * The object describes a complex type.
+     */
+    public static final short COMPLEX_TYPE              = 15;
+    /**
+     * The object describes a simple type.
+     */
+    public static final short SIMPLE_TYPE               = 16;
+    /**
+     * Return whether this type definition is a simple type or complex type.
+     */
+    public short getTypeCategory();
+
+    /**
+     * {base type definition}: either a simple type definition or a complex 
+     * type definition. 
+     */
+    public XSTypeDefinition getBaseType();
+
+    /**
+     * {final}. For a complex type definition it is a subset of {extension, 
+     * restriction}. For a simple type definition it is a subset of 
+     * {extension, list, restriction, union}. 
+     * @param restriction  Extension, restriction, list, union constants 
+     *   (defined in <code>XSConstants</code>). 
+     * @return True if <code>restriction</code> is in the final set, 
+     *   otherwise false.
+     */
+    public boolean isFinal(short restriction);
+
+    /**
+     * For complex types the returned value is a bit combination of the subset 
+     * of {<code>DERIVATION_EXTENSION, DERIVATION_RESTRICTION</code>} 
+     * corresponding to <code>final</code> set of this type or 
+     * <code>DERIVATION_NONE</code>. For simple types the returned value is 
+     * a bit combination of the subset of { 
+     * <code>DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST</code>
+     * } corresponding to <code>final</code> set of this type or 
+     * <code>DERIVATION_NONE</code>. 
+     */
+    public short getFinal();
+
+    /**
+     *  Convenience attribute. A boolean that specifies if the type definition 
+     * is anonymous. 
+     */
+    public boolean getAnonymous();
+
+    /**
+     * Convenience method which checks if this type is derived from the given 
+     * <code>ancestorType</code>. 
+     * @param ancestorType  An ancestor type definition. 
+     * @param derivationMethod  A bit combination representing a subset of {
+     *   <code>DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST</code>
+     *   }. 
+     * @return  True if this type is derived from <code>ancestorType</code> 
+     *   using only derivation methods from the <code>derivationMethod</code>
+     *   . 
+     */
+    public boolean derivedFromType(XSTypeDefinition ancestorType, 
+                                   short derivationMethod);
+
+    /**
+     * Convenience method which checks if this type is derived from the given 
+     * ancestor type. 
+     * @param namespace  An ancestor type namespace. 
+     * @param name  An ancestor type name. 
+     * @param derivationMethod  A bit combination representing a subset of {
+     *   <code>DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST</code>
+     *   }. 
+     * @return  True if this type is derived from <code>ancestorType</code> 
+     *   using only derivation methods from the <code>derivationMethod</code>
+     *   . 
+     */
+    public boolean derivedFrom(String namespace, 
+                               String name, 
+                               short derivationMethod);
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSValue.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSValue.java b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSValue.java
new file mode 100644
index 0000000..a1d49ff
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSValue.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.ext.xerces.xs;
+
+/**
+ * Represents an actual value of a simple type.
+ */
+public interface XSValue {
+    
+    /**
+     * The schema normalized value.
+     */
+    public String getNormalizedValue();
+
+    /**
+     * The actual value. <code>null</code> if the value is in error. 
+     */
+    public Object getActualValue();
+
+    /**
+     * The declared simple type definition used to validate this value.
+     * It can be a union type.
+     */
+    public XSSimpleTypeDefinition getTypeDefinition();
+
+    /**
+     * If the declared simple type definition is a union, return the member
+     * type actually used to validate the value. Otherwise null.
+     */
+    public XSSimpleTypeDefinition getMemberTypeDefinition();
+
+    /**
+     * If <code>getTypeDefinition()</code> returns a list type whose item type
+     * is a union type, then this method returns a list with the same length
+     * as the value list, for simple types that actually validated
+     * the corresponding item in the value. 
+     */
+    public XSObjectList getMemberTypeDefinitions();
+
+    /**
+     * The actual value built-in datatype, e.g. 
+     * <code>STRING_DT, SHORT_DT</code>. If the type definition of this 
+     * value is a list type definition, this method returns 
+     * <code>LIST_DT</code>. If the type definition of this value is a list 
+     * type definition whose item type is a union type definition, this 
+     * method returns <code>LISTOFUNION_DT</code>. To query the actual value 
+     * of the list or list of union type definitions use 
+     * <code>itemValueTypes()</code>.
+     */
+    public short getActualValueType();
+
+    /**
+     * In the case the actual value represents a list, i.e. the 
+     * <code>actualNormalizedValueType</code> is <code>LIST_DT</code>, the 
+     * returned array consists of one type kind which represents the itemType
+     * . For example: 
+     * <pre> &lt;simpleType name="listtype"&gt; &lt;list 
+     * itemType="positiveInteger"/&gt; &lt;/simpleType&gt; &lt;element 
+     * name="list" type="listtype"/&gt; ... &lt;list&gt;1 2 3&lt;/list&gt; </pre>
+     *  
+     * The <code>schemaNormalizedValue</code> value is "1 2 3", the 
+     * <code>actualNormalizedValueType</code> value is <code>LIST_DT</code>, 
+     * and the <code>itemValueTypes</code> is an array of size 1 with the 
+     * value <code>POSITIVEINTEGER_DT</code>. 
+     * <br> If the actual value represents a list type definition whose item 
+     * type is a union type definition, i.e. <code>LISTOFUNION_DT</code>, 
+     * for each actual value in the list the array contains the 
+     * corresponding memberType kind. For example: 
+     * <pre> &lt;simpleType 
+     * name='union_type' memberTypes="integer string"/&gt; &lt;simpleType 
+     * name='listOfUnion'&gt; &lt;list itemType='union_type'/&gt; 
+     * &lt;/simpleType&gt; &lt;element name="list" type="listOfUnion"/&gt; 
+     * ... &lt;list&gt;1 2 foo&lt;/list&gt; </pre>
+     *  The 
+     * <code>schemaNormalizedValue</code> value is "1 2 foo", the 
+     * <code>actualNormalizedValueType</code> is <code>LISTOFUNION_DT</code>
+     * , and the <code>itemValueTypes</code> is an array of size 3 with the 
+     * following values: <code>INTEGER_DT, INTEGER_DT, STRING_DT</code>. 
+     */
+    public ShortList getListValueTypes();
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSWildcard.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSWildcard.java b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSWildcard.java
new file mode 100644
index 0000000..68cc912
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/XSWildcard.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.ext.xerces.xs;
+
+/**
+ * This interface represents the Wildcard schema component.
+ */
+public interface XSWildcard extends XSTerm {
+    // Namespace Constraint
+    /**
+     * Namespace Constraint: any namespace is allowed.
+     */
+    public static final short NSCONSTRAINT_ANY          = 1;
+    /**
+     * Namespace Constraint: namespaces in the list are not allowed.
+     */
+    public static final short NSCONSTRAINT_NOT          = 2;
+    /**
+     * Namespace Constraint: namespaces in the list are allowed.
+     */
+    public static final short NSCONSTRAINT_LIST         = 3;
+
+    // Process contents
+    /**
+     * There must be a top-level declaration for the item available, or the 
+     * item must have an xsi:type, and the item must be valid as appropriate.
+     */
+    public static final short PC_STRICT                 = 1;
+    /**
+     * No constraints at all: the item must simply be well-formed XML. 
+     */
+    public static final short PC_SKIP                   = 2;
+    /**
+     * If the item, or any items among its [children] is an element 
+     * information item, has a uniquely determined declaration available, it 
+     * must be valid with respect to that definition, that is, validate 
+     * where you can and do not worry when you cannot.
+     */
+    public static final short PC_LAX                    = 3;
+
+    /**
+     * Namespace constraint: A constraint type: any, not, list. 
+     */
+    public short getConstraintType();
+
+    /**
+     * Namespace constraint: For <code>constraintType</code> 
+     * <code>NSCONSTRAINT_LIST</code>, the list contains allowed namespaces. 
+     * For <code>constraintType</code> <code>NSCONSTRAINT_NOT</code>, the 
+     * list contains disallowed namespaces. For <code>constraintType</code> 
+     * <code>NSCONSTRAINT_ANY</code>, the <code>StringList</code> is empty. 
+     */
+    public StringList getNsConstraintList();
+
+    /**
+     * [process contents]: one of skip, lax or strict. Valid constants values 
+     * are: <code>PC_LAX</code>, <code>PC_SKIP</code> and 
+     * <code>PC_STRICT</code>. 
+     */
+    public short getProcessContents();
+
+    /**
+     * An annotation if it exists, otherwise <code>null</code>. If not null
+     * then the first [annotation] from the sequence of annotations.
+     */
+    public XSAnnotation getAnnotation();
+
+    /**
+     * A sequence of [annotations] or an empty <code>XSObjectList</code>.
+     */
+    public XSObjectList getAnnotations();    
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/ByteList.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/ByteList.java b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/ByteList.java
new file mode 100644
index 0000000..d1cae22
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/ByteList.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jena.ext.xerces.xs.datatypes;
+
+import java.util.List;
+
+import org.apache.jena.ext.xerces.xs.XSException;
+
+/**
+ * <p>The <code>ByteList</code> is an immutable ordered collection of 
+ * <code>byte</code>.</p>
+ * 
+ * @author Ankit Pasricha, IBM
+ * 
+ * @version $Id: ByteList.java 1024038 2010-10-18 22:06:35Z sandygao $
+ */
+@SuppressWarnings("rawtypes")
+public interface ByteList extends List {
+    
+    /**
+     * The number of <code>byte</code>s in the list. The range of 
+     * valid child object indices is 0 to <code>length-1</code> inclusive. 
+     */
+    public int getLength();
+    
+    /**
+     * Checks if the <code>byte</code> <code>item</code> is a 
+     * member of this list. 
+     * @param item  <code>byte</code> whose presence in this list 
+     *   is to be tested. 
+     * @return  True if this list contains the <code>byte</code> 
+     *   <code>item</code>. 
+     */
+    public boolean contains(byte item);
+    
+    /**
+     * Returns the <code>index</code>th item in the collection. The index 
+     * starts at 0. 
+     * @param index  index into the collection. 
+     * @return  The <code>byte</code> at the <code>index</code>th 
+     *   position in the <code>ByteList</code>. 
+     * @exception XSException
+     *   INDEX_SIZE_ERR: if <code>index</code> is greater than or equal to the 
+     *   number of objects in the list or less than zero.
+     */
+    public byte item(int index) throws XSException;
+    
+    /**
+     * Construct and return a byte array for bytes contained in this list.
+     */
+    public byte[] toByteArray();
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/ObjectList.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/ObjectList.java b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/ObjectList.java
new file mode 100644
index 0000000..751a4f5
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/ObjectList.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jena.ext.xerces.xs.datatypes;
+
+import java.util.List;
+
+/**
+ * <p>The <code>ObjectList</code> is an immutable ordered collection of 
+ * <code>Object</code>.</p> 
+ * 
+ * @author Ankit Pasricha, IBM
+ * 
+ * @version $Id: ObjectList.java 744816 2009-02-16 06:03:18Z mrglavas $
+ */
+public interface ObjectList extends List<Object> {
+    
+    /**
+     * The number of <code>Object</code>s in the list. The range of 
+     * valid child object indices is 0 to <code>length-1</code> inclusive. 
+     */
+    public int getLength();
+    
+    /**
+     * Checks if the <code>Object</code> <code>item</code> is a 
+     * member of this list. 
+     * @param item  <code>Object</code> whose presence in this list 
+     *   is to be tested. 
+     * @return  True if this list contains the <code>Object</code> 
+     *   <code>item</code>. 
+     */
+    @Override
+    public boolean contains(Object item);
+    
+    /**
+     * Returns the <code>index</code>th item in the collection or 
+     * <code>null</code> if <code>index</code> is greater than or equal to 
+     * the number of objects in the list. The index starts at 0. 
+     * @param index  index into the collection. 
+     * @return  The <code>Object</code> at the <code>index</code>th 
+     *   position in the <code>ObjectList</code>, or <code>null</code> if 
+     *   the index specified is not valid - greater than or equal to the
+     *   number of items in the list or less than zero. 
+     */
+    public Object item(int index);
+    
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/XSDateTime.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/XSDateTime.java b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/XSDateTime.java
new file mode 100644
index 0000000..42357cc
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/XSDateTime.java
@@ -0,0 +1,291 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jena.ext.xerces.xs.datatypes;
+
+import javax.xml.datatype.Duration;
+import javax.xml.datatype.XMLGregorianCalendar;
+
+/**
+ * <p>Interface to expose the values for all date-time related types. The following 
+ * table shows the methods defined for various XML Schema 1.0 built-in types. 'X' 
+ * marks whether a particular method is defined for a particular type. Accessing undefined
+ * methods may return unexpected values.
+ * 
+ * <table border="1">
+ * <br/>
+ * <tr>
+ * <td> XML Schema Datatype </td>
+ * <td> getYears() </td>
+ * <td> getMonths() </td>
+ * <td> getDays() </td>
+ * <td> getHours() </td>
+ * <td> getMinutes() </td>
+ * <td> getSeconds() </td>
+ * <td> getTimeZoneHours() </td>
+ * <td> getTimeZoneMinutes() </td>
+ * <td> getXMLGregorianCalendar() </td>
+ * <td> getDuration() </td>
+ * <td> hasTimeZone() </td>
+ * <td> normalize() </td>
+ * <td> isNormalized() </td>
+ * <td> getLexicalValue() </td>
+ * </tr>
+ * <tr>
+ * <td> gYear </td>
+ * <td>X</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * </tr>
+ * <tr>
+ * <td> gMonth </td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * </tr>
+ * <tr>
+ * <td> gDay </td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * </tr>
+ * <tr>
+ * <td> gYearMonth </td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * </tr>
+ * <tr>
+ * <td> gMonthDay </td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * </tr>
+ * <tr>
+ * <td> date </td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * </tr>
+ * <tr>
+ * <td> time </td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * </tr>
+ * <tr>
+ * <td> datetime </td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * <td>X</td>
+ * </tr>
+ * <tr>
+ * <td> duration </td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>X</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>-</td>
+ * <td>X</td>
+ * </tr>
+ * </table>
+ * </p>
+ * 
+ * @author Ankit Pasricha, IBM
+ * 
+ * @version $Id: XSDateTime.java 447250 2006-09-18 05:27:17Z mrglavas $
+ */
+public interface XSDateTime {
+	
+    /**
+     * @return years - can be negative for date-time related types;
+     *          
+     */
+    public int getYears();
+    
+    /**
+     * @return months - can be negative only for duration types;
+     *                  For duration types, it returns years*12 + months
+     */
+    public int getMonths();
+    
+    /**
+     * @return days - cannot be negative;
+     *          
+     */
+    public int getDays();
+    
+    /**
+     * @return hours - cannot be negative;
+     *          
+     */
+    public int getHours();
+    
+    /**
+     * @return minutes - cannot be negative;
+     *          
+     */
+    public int getMinutes();
+    
+    /**
+     * @return seconds - can be negative only for durations;
+     *                   For duration types, it returns days*24*3600 + hours*3600 
+     *                                                  + minutes*60 + seconds 
+     */
+    public double getSeconds();
+    
+    /**
+     * @return boolean (true when timezone is specified in the original lexical value)
+     *                  
+     */
+    public boolean hasTimeZone();
+    
+    /**
+     * @return timezone hours (for GMT-xx:xx this will be negative),
+     *                          
+     */
+    public int getTimeZoneHours();
+    
+    /**
+     * @return timezone minutes (for GMT-xx:xx this will be negative),
+     *                          
+     */
+    public int getTimeZoneMinutes();
+    
+    /**
+     * @return the original lexical value
+     */
+    public String getLexicalValue();
+    
+    /**
+     * @return a new date-time related object with normalized values
+     *         (has no effect on objects already
+     *          normalized)
+     */
+    public XSDateTime normalize();
+    
+    /**
+     * @return whether a date-time related object is normalized or not
+     *         (value is not useful for types where timezone is not specified)
+     */
+    public boolean isNormalized();
+       
+    /**
+     * @return an un-normalized XMLGregorianCalendar (if applicable otherwise null)
+     */
+    public XMLGregorianCalendar getXMLGregorianCalendar();
+        
+    /**
+     * @return a Duration (if applicable otherwise null)
+     */
+    public Duration getDuration();
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/XSDecimal.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/XSDecimal.java b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/XSDecimal.java
new file mode 100644
index 0000000..a3a7a1a
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/XSDecimal.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jena.ext.xerces.xs.datatypes;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+
+/**
+ * <p>Interface to expose the value of 'decimal' and related datatypes.</p>
+ * 
+ * @author Naela Nissar, IBM
+ * 
+ * @version $Id: XSDecimal.java 447250 2006-09-18 05:27:17Z mrglavas $
+ */
+public interface XSDecimal {
+     
+    /**
+     * @return the <code>BigDecimal</code> representation of this object
+     */
+    public BigDecimal getBigDecimal();
+    
+    /**
+     * @return the <code>BigInteger</code> representation of this object 
+     * @exception NumberFormatException if the value cannot be represented as a <code>BigInteger</code> 
+     */
+    public BigInteger getBigInteger() throws NumberFormatException;
+    
+    /**
+     * @return the long value representation of this object
+     * @exception NumberFormatException if the value cannot be represented as a <code>long</code>
+     */
+    public long getLong() throws NumberFormatException;
+    
+    /**
+     * @return the int value representation of this object
+     * @exception NumberFormatException if the value cannot be represented as a <code>int</code>
+     */
+    public int getInt() throws NumberFormatException;
+    
+    /**
+     * @return the short value representation of this object
+     * @exception NumberFormatException if the value cannot be represented as a <code>short</code>
+     */
+    public short getShort() throws NumberFormatException;
+    
+    /**
+     * @return the byte value representation of this object
+     * @exception NumberFormatException if the value cannot be represented as a <code>byte</code>
+     */
+    public byte getByte() throws NumberFormatException;
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/XSDouble.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/XSDouble.java b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/XSDouble.java
new file mode 100644
index 0000000..478db5a
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/XSDouble.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jena.ext.xerces.xs.datatypes;
+
+/**
+ * <p>Interface to expose the value of the 'double' datatype.</p>
+ * 
+ * @author Ankit Pasricha, IBM
+ * 
+ * @version $Id: XSDouble.java 447250 2006-09-18 05:27:17Z mrglavas $
+ */
+public interface XSDouble {
+    
+    /**
+     * @return a double value
+     */
+    public double getValue();
+    
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/XSFloat.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/XSFloat.java b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/XSFloat.java
new file mode 100644
index 0000000..3d16cea
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/XSFloat.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jena.ext.xerces.xs.datatypes;
+
+/**
+ * <p>Interface to expose value of the float datatype.</p>
+ * 
+ * @author Ankit Pasricha, IBM
+ * 
+ * @version $Id: XSFloat.java 447250 2006-09-18 05:27:17Z mrglavas $
+ */
+public interface XSFloat {
+    
+    /**
+     * @return a float value
+     */
+    public float getValue();
+    
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/package.html
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/package.html b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/package.html
new file mode 100644
index 0000000..a343690
--- /dev/null
+++ b/jena-core/src/main/java/org/apache/jena/ext/xerces/xs/datatypes/package.html
@@ -0,0 +1,306 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head >
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+</head>
+<body bgcolor="white">This package provides interfaces for accessing actual value information through PSVI for XML Schema 1.0 data types.
+<BR>
+<BR>
+The table below gives the data type to applicable interface mapping:
+<BR>
+<BR>
+<TABLE border="1">
+	<TBODY>
+		<TR>
+			<TD width="332" align="center">XML Schema Data Type</TD>
+			<TD align="center" width="202">Interface/Class</TD>
+		</TR>
+		<TR>
+			<TD width="332"></TD>
+			<TD width="202"></TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">string</TD>
+			<TD width="202" align="center">java.lang.String</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">boolean</TD>
+			<TD width="202" align="center">java.lang.Boolean</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">decimal</TD>
+			<TD width="202" align="center">XSDecimal</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">float</TD>
+			<TD width="202" align="center">XSFloat</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">double</TD>
+			<TD width="202" align="center">XSDouble</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">duration</TD>
+			<TD width="202" align="center">XSDateTime</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">dateTime</TD>
+			<TD width="202" align="center">XSDateTime</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">date</TD>
+			<TD width="202" align="center">XSDateTime</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">time</TD>
+			<TD width="202" align="center">XSDateTime</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">gYear</TD>
+			<TD width="202" align="center">XSDateTime</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">gMonth</TD>
+			<TD width="202" align="center">XSDateTime</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">gDay</TD>
+			<TD width="202" align="center">XSDateTime</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">gYearMonth</TD>
+			<TD width="202" align="center">XSDateTime</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">gMonthDay</TD>
+			<TD width="202" align="center">XSDateTime</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">hexBinary</TD>
+			<TD width="202" align="center">ByteList</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">base64Binary</TD>
+			<TD width="202" align="center">ByteList</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">anyURI</TD>
+			<TD width="202" align="center">java.lang.String</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">QName</TD>
+			<TD width="202" align="center">XSQName</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">NOTATION</TD>
+			<TD width="202" align="center">XSQName</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">normalizedString</TD>
+			<TD width="202" align="center">java.lang.String</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">token</TD>
+			<TD width="202" align="center">java.lang.String</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">language</TD>
+			<TD width="202" align="center">java.lang.String</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">NMTOKEN</TD>
+			<TD width="202" align="center">java.lang.String</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">NMTOKENS</TD>
+			<TD width="202" align="center">ObjectList</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">Name</TD>
+			<TD width="202" align="center">java.lang.String</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">NCName</TD>
+			<TD width="202" align="center">java.lang.String</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">ID</TD>
+			<TD width="202" align="center">java.lang.String</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">IDREF</TD>
+			<TD width="202" align="center">java.lang.String</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">IDREFS</TD>
+			<TD width="202" align="center">ObjectList</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">ENTITY</TD>
+			<TD width="202" align="center">java.lang.String</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">ENTITIES</TD>
+			<TD width="202" align="center">ObjectList</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">list</TD>
+			<TD width="202" align="center">ObjectList</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">integer</TD>
+			<TD width="202" align="center">XSDecimal</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">positiveInteger</TD>
+			<TD width="202" align="center">XSDecimal</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">negativeInteger</TD>
+			<TD width="202" align="center">XSDecimal</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">nonPositiveInteger</TD>
+			<TD width="202" align="center">XSDecimal</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">nonNegativeInteger</TD>
+			<TD width="202" align="center">XSDecimal</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">unsignedShort</TD>
+			<TD width="202" align="center">XSDecimal</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">unsignedLong</TD>
+			<TD width="202" align="center">XSDecimal</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">unsignedByte</TD>
+			<TD width="202" align="center">XSDecimal</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">unsignedInt</TD>
+			<TD width="202" align="center">XSDecimal</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">long</TD>
+			<TD width="202" align="center">XSDecimal</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">int</TD>
+			<TD width="202" align="center">XSDecimal</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">short</TD>
+			<TD width="202" align="center">XSDecimal</TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">byte</TD>
+			<TD width="202" align="center">XSDecimal</TD>
+		</TR>
+	</TBODY>
+</TABLE>
+<P><BR>As shown above, the XSDateTime interface provides mapping to a number of decimal/integer data types. The application needs to ensure that appropriate methods for each of these types is invoked. The mapping of  these types to defined methods is shown in the table below. Accessing methods that are undefined for a type will give unexpected results.
+</P>
+
+
+<P><BR>
+</P>
+<TABLE border="1">
+	<TBODY>
+		<TR>
+			<TD width="308" align="center">XML Schema Data Type</TD>
+			<TD width="228" align="center">Applicable method in XSDateTime*</TD>
+		</TR>
+		<TR>
+			<TD width="308"></TD>
+			<TD width="228"></TD>
+		</TR>
+		<TR>
+			<TD width="332" align="center">integer</TD><TD width="202" align="center">getBigInteger()</TD>
+			
+		</TR>
+		<TR>
+			<TD width="332" align="center">positiveInteger</TD><TD width="202" align="center">getBigInteger()</TD>
+			
+		</TR>
+		<TR>
+			<TD width="332" align="center">negativeInteger</TD><TD width="202" align="center">getBigInteger()</TD>
+			
+		</TR>
+		<TR>
+			<TD width="332" align="center">nonPositiveInteger</TD><TD width="202" align="center">getBigInteger()</TD>
+			
+		</TR>
+		<TR>
+			<TD width="332" align="center">nonNegativeInteger</TD><TD width="202" align="center">getBigInteger()</TD>
+			
+		</TR>
+		<TR>
+			<TD width="332" align="center">unsignedShort</TD><TD width="202" align="center">getInt()</TD>
+			
+		</TR>
+		<TR>
+			<TD width="332" align="center">unsignedLong</TD><TD width="202" align="center">getBigInteger()</TD>
+			
+		</TR>
+		<TR>
+			<TD width="332" align="center">unsignedByte</TD><TD width="202" align="center">getShort()</TD>
+			
+		</TR>
+		<TR>
+			<TD width="332" align="center">unsignedInt</TD><TD width="202" align="center">getLong()</TD>
+			
+		</TR>
+		<TR>
+			<TD width="332" align="center">long</TD><TD width="202" align="center">getLong()</TD>
+			
+		</TR>
+		<TR>
+			<TD width="332" align="center">int</TD><TD width="202" align="center">getInt()</TD>
+			
+		</TR>
+		<TR>
+			<TD width="332" align="center">short</TD><TD width="202" align="center">getShort()</TD>
+			
+		</TR>
+		<TR>
+			<TD width="332" align="center">byte</TD><TD width="202" align="center">getByte()</TD>
+			
+		</TR>
+		<TR>
+			<TD width="308"></TD>
+			<TD width="228"></TD>
+		</TR>
+	</TBODY>
+</TABLE>
+<P><BR>* <SPAN
+	style='font-size:12.0pt;font-family:"Times New Roman";
+mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;mso-fareast-language:
+EN-GB;mso-bidi-language:AR-SA'>This
+shows the base method that can be called. That is, users can call this
+method and all methods returning bigger types than the base method
+according to the order: byte &lt; short &lt; int &lt; long &lt;
+BigInteger &lt; BigDecimal. For example, in the case of unsignedShort,
+users can call getInt(), getLong(), getBigInteger() and getBigDecimal()
+but NOT getShort() or getByte().</SPAN>
+</P></body>
+</html>

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/rdf/model/impl/Util.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/rdf/model/impl/Util.java b/jena-core/src/main/java/org/apache/jena/rdf/model/impl/Util.java
index ba7c969..64dc047 100644
--- a/jena-core/src/main/java/org/apache/jena/rdf/model/impl/Util.java
+++ b/jena-core/src/main/java/org/apache/jena/rdf/model/impl/Util.java
@@ -24,11 +24,11 @@ import java.util.regex.Pattern ;
 import org.apache.jena.JenaRuntime ;
 import org.apache.jena.datatypes.RDFDatatype ;
 import org.apache.jena.datatypes.xsd.XSDDatatype ;
+import org.apache.jena.ext.xerces.util.XMLChar;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.rdf.model.Literal ;
 import org.apache.jena.shared.CannotEncodeCharacterException ;
 import org.apache.jena.util.SplitIRI ;
-import org.apache.xerces.util.XMLChar ;
 
 /** Some utility functions.
  */

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/ParserSupport.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/ParserSupport.java b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/ParserSupport.java
index 1dbdbed..5bcd9ef 100644
--- a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/ParserSupport.java
+++ b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/ParserSupport.java
@@ -27,10 +27,10 @@ package org.apache.jena.rdfxml.xmlinput.impl;
 import java.util.HashMap ;
 import java.util.Map ;
 
+import org.apache.jena.ext.xerces.util.XML11Char;
+import org.apache.jena.ext.xerces.util.XMLChar;
 import org.apache.jena.iri.IRI ;
 import org.apache.jena.rdfxml.xmlinput.ARPErrorNumbers ;
-import org.apache.xerces.util.XML11Char ;
-import org.apache.xerces.util.XMLChar ;
 import org.xml.sax.SAXParseException ;
 
 public class ParserSupport implements ARPErrorNumbers, Names {

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/RDFXMLParser.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/RDFXMLParser.java b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/RDFXMLParser.java
index c434930..f5e8dfd 100644
--- a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/RDFXMLParser.java
+++ b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/RDFXMLParser.java
@@ -23,15 +23,20 @@ import java.io.InputStreamReader;
 import java.io.Reader;
 import java.io.UTFDataFormatException;
 
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
 import org.apache.jena.rdfxml.xmlinput.FatalParsingErrorException ;
 import org.apache.jena.rdfxml.xmlinput.SAX2RDF ;
+import org.apache.jena.shared.JenaException;
 import org.apache.jena.util.CharEncoding ;
-import org.apache.xerces.parsers.SAXParser;
-import org.apache.xerces.parsers.StandardParserConfiguration;
-import org.apache.xerces.xni.Augmentations;
+//import org.apache.xerces.parsers.SAXParser; //XMLReader
+//import org.apache.xerces.parsers.StandardParserConfiguration;
+//import org.apache.xerces.xni.Augmentations;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXParseException;
+import org.xml.sax.XMLReader;
 
 /**
  * 
@@ -39,7 +44,7 @@ import org.xml.sax.SAXParseException;
  */
 public class RDFXMLParser extends XMLHandler {
 
-    private SAXParser saxParser;
+    private XMLReader saxParser;
 
     private String readerXMLEncoding = null;
 
@@ -56,7 +61,7 @@ public class RDFXMLParser extends XMLHandler {
      * Consider using {@link SAXParserWithEncodingCheck}
      * @param rdr
      */
-    protected RDFXMLParser(SAXParser rdr) {
+    protected RDFXMLParser(XMLReader rdr) {
         super();
         saxParser = rdr;
         try {
@@ -66,67 +71,82 @@ public class RDFXMLParser extends XMLHandler {
         }
     }
 
-    public SAXParser getSAXParser() {
+    public XMLReader getSAXParser() {
         return saxParser;
     }
 
-    /**
-     * This works with an {@link RDFXMLParser} and catches and reports several
-     * common errors to do with character encoding.
-     *
-     */
-    static protected class SAXParserWithEncodingCheck extends SAXParser {
-        protected SAXParserWithEncodingCheck(StandardParserConfiguration c) {
-            super(c);
+    // JENA-1537: JDK SaxParser does not expose  xmlDecl
+//    /**
+//     * This works with an {@link RDFXMLParser} and catches and reports several
+//     * common errors to do with character encoding.
+//     *
+//     */
+//    static protected class SAXParserWithEncodingCheck extends SAXParser {
+//        protected SAXParserWithEncodingCheck(StandardParserConfiguration c) {
+//            super(c);
+////            try {
+////                setFeature("http://xml.org/sax/features/string-interning",
+////                        false);
+////            } catch (SAXException e) {
+////                // Not supported - aggh
+////                // TO DO ask on xerces list why not?
+////                // e.printStackTrace();
+////            }
+//        }
+//
+//        private RDFXMLParser rdfXmlParser;
+//
+//        @Override
+//        public void xmlDecl(String version, String encoding, String standalone,
+//                Augmentations augs) {
 //            try {
-//                setFeature("http://xml.org/sax/features/string-interning",
-//                        false);
-//            } catch (SAXException e) {
-//                // Not supported - aggh
-//                // TO DO ask on xerces list why not?
-//                // e.printStackTrace();
+//                getRdfXmlParser().setEncoding(encoding == null ? "UTF" : encoding);
+//            } catch (SAXParseException e) {
+//                throw new WrappedException(e);
 //            }
-        }
-
-        private RDFXMLParser rdfXmlParser;
-
-        @Override
-        public void xmlDecl(String version, String encoding, String standalone,
-                Augmentations augs) {
-            try {
-                getRdfXmlParser().setEncoding(encoding == null ? "UTF" : encoding);
-            } catch (SAXParseException e) {
-                throw new WrappedException(e);
-            }
-            super.xmlDecl(version, encoding, standalone, augs);
-
-        }
-
-		/**
-		 * This must be called as part of the initialization process.
-		 * @param rdfXmlParser the rdfXmlParser to set
-		 */
-		public void setRdfXmlParser(RDFXMLParser rdfXmlParser) {
-			this.rdfXmlParser = rdfXmlParser;
-		}
-
-		/**
-		 * @return the rdfXmlParser
-		 */
-		public RDFXMLParser getRdfXmlParser() {
-			if (rdfXmlParser == null) {
-				throw new IllegalStateException("setRdfXmlParser must be called as part of the initialization process");
-			}
-			return rdfXmlParser;
-		}
-    }
+//            super.xmlDecl(version, encoding, standalone, augs);
+//
+//        }
+//
+//		/**
+//		 * This must be called as part of the initialization process.
+//		 * @param rdfXmlParser the rdfXmlParser to set
+//		 */
+//		public void setRdfXmlParser(RDFXMLParser rdfXmlParser) {
+//			this.rdfXmlParser = rdfXmlParser;
+//		}
+//
+//		/**
+//		 * @return the rdfXmlParser
+//		 */
+//		public RDFXMLParser getRdfXmlParser() {
+//			if (rdfXmlParser == null) {
+//				throw new IllegalStateException("setRdfXmlParser must be called as part of the initialization process");
+//			}
+//			return rdfXmlParser;
+//		}
+//    }
 
     public static RDFXMLParser create() {
-        StandardParserConfiguration c = new StandardParserConfiguration();
-        SAXParserWithEncodingCheck msp = new SAXParserWithEncodingCheck(c);
-        RDFXMLParser a = new RDFXMLParser(msp);
-        msp.setRdfXmlParser(a);
-        return a;
+//        StandardParserConfiguration c = new StandardParserConfiguration();
+//        SAXParserWithEncodingCheck msp = new SAXParserWithEncodingCheck(c);
+        // JENA-1537
+        try { 
+            SAXParserFactory spf = SAXParserFactory.newInstance();
+            // Create a JAXP SAXParser
+            SAXParser saxParser = spf.newSAXParser();
+            // Get the encapsulated SAX XMLReader
+            XMLReader xmlreader = saxParser.getXMLReader();
+
+            RDFXMLParser a = new RDFXMLParser(xmlreader);
+            // Default.
+            a.setEncoding("UTF");
+            // JENA-1537
+            //msp.setRdfXmlParser(a);
+            return a;
+        } catch (Exception ex) {
+            throw new JenaException("Failed to create an RDFXMLParser", ex);
+        }
     }
 
 
@@ -142,7 +162,8 @@ public class RDFXMLParser extends XMLHandler {
 
         initParse(base,"");
         SAX2RDF.installHandlers(saxParser, this);
-        saxParser.reset();
+        //[JENA]
+        //saxParser.reset();
 
         initEncodingChecks(input);
         try {

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/rdfxml/xmloutput/impl/BaseXMLWriter.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/rdfxml/xmloutput/impl/BaseXMLWriter.java b/jena-core/src/main/java/org/apache/jena/rdfxml/xmloutput/impl/BaseXMLWriter.java
index 0bd4367..14ccc64 100644
--- a/jena-core/src/main/java/org/apache/jena/rdfxml/xmloutput/impl/BaseXMLWriter.java
+++ b/jena-core/src/main/java/org/apache/jena/rdfxml/xmloutput/impl/BaseXMLWriter.java
@@ -27,6 +27,7 @@ import java.util.Map.Entry ;
 import java.util.regex.Pattern ;
 
 import org.apache.jena.JenaRuntime ;
+import org.apache.jena.ext.xerces.util.XMLChar;
 import org.apache.jena.iri.IRI ;
 import org.apache.jena.iri.IRIFactory ;
 import org.apache.jena.rdf.model.* ;
@@ -38,7 +39,6 @@ import org.apache.jena.shared.* ;
 import org.apache.jena.util.CharEncoding ;
 import org.apache.jena.util.FileUtils ;
 import org.apache.jena.vocabulary.* ;
-import org.apache.xerces.util.XMLChar ;
 import org.slf4j.Logger ;
 import org.slf4j.LoggerFactory ;
 

http://git-wip-us.apache.org/repos/asf/jena/blob/c9a7e646/jena-core/src/main/java/org/apache/jena/rdfxml/xmloutput/impl/Unparser.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/rdfxml/xmloutput/impl/Unparser.java b/jena-core/src/main/java/org/apache/jena/rdfxml/xmloutput/impl/Unparser.java
index 0210f9e..99e3f20 100644
--- a/jena-core/src/main/java/org/apache/jena/rdfxml/xmloutput/impl/Unparser.java
+++ b/jena-core/src/main/java/org/apache/jena/rdfxml/xmloutput/impl/Unparser.java
@@ -119,6 +119,7 @@ package org.apache.jena.rdfxml.xmloutput.impl;
 import java.io.PrintWriter ;
 import java.util.* ;
 
+import org.apache.jena.ext.xerces.util.XMLChar;
 import org.apache.jena.iri.IRI ;
 import org.apache.jena.rdf.model.* ;
 import org.apache.jena.rdf.model.impl.PropertyImpl ;
@@ -128,7 +129,6 @@ import org.apache.jena.shared.JenaException ;
 import org.apache.jena.shared.PropertyNotFoundException ;
 import org.apache.jena.util.iterator.* ;
 import org.apache.jena.vocabulary.RDF ;
-import org.apache.xerces.util.XMLChar ;
 import org.slf4j.Logger ;
 import org.slf4j.LoggerFactory ;
 


Mime
View raw message