release version 1.10.0
This commit is contained in:
289
platform/runtime/modules/atlasmap/xsom/SCD.jj
Normal file
289
platform/runtime/modules/atlasmap/xsom/SCD.jj
Normal file
@ -0,0 +1,289 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
*
|
||||
* Copyright (c) 2010-2013 Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* http://glassfish.java.net/public/CDDL+GPL_1_1.html
|
||||
* or packager/legal/LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at packager/legal/LICENSE.txt.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Grammar for schema component designator
|
||||
*/
|
||||
options {
|
||||
STATIC=false;
|
||||
ERROR_REPORTING=true;
|
||||
UNICODE_INPUT=true;
|
||||
// DEBUG_TOKEN_MANAGER=true;
|
||||
}
|
||||
|
||||
PARSER_BEGIN(SCDParser)
|
||||
package com.sun.xml.xsom.impl.scd;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import com.sun.xml.xsom.impl.UName;
|
||||
import javax.xml.namespace.*;
|
||||
|
||||
public class SCDParser {
|
||||
private NamespaceContext nsc;
|
||||
public SCDParser(String text,NamespaceContext nsc) {
|
||||
this(new StringReader(text));
|
||||
this.nsc = nsc;
|
||||
}
|
||||
private String trim(String s) {
|
||||
return s.substring(1,s.length()-1);
|
||||
}
|
||||
private String resolvePrefix(String prefix) throws ParseException {
|
||||
try {
|
||||
String r=nsc.getNamespaceURI(prefix);
|
||||
// grrr!!
|
||||
if(prefix.equals(""))
|
||||
return r;
|
||||
if(!r.equals(""))
|
||||
return r;
|
||||
} catch( IllegalArgumentException e ) {
|
||||
; // report an error
|
||||
}
|
||||
throw new ParseException("Unbound prefix: "+prefix);
|
||||
}
|
||||
}
|
||||
|
||||
PARSER_END(SCDParser)
|
||||
|
||||
|
||||
SKIP :
|
||||
{
|
||||
" "
|
||||
| "\t"
|
||||
| "\n"
|
||||
| "\r"
|
||||
| "\f"
|
||||
}
|
||||
|
||||
TOKEN :
|
||||
{
|
||||
<#Letter :
|
||||
<BaseChar> | <Ideographic>
|
||||
>
|
||||
|
|
||||
<#BaseChar :
|
||||
(
|
||||
["\u0041"-"\u005A"] | ["\u0061"-"\u007A"] | ["\u00C0"-"\u00D6"] | ["\u00D8"-"\u00F6"] |
|
||||
["\u00F8"-"\u00FF"] | ["\u0100"-"\u0131"] | ["\u0134"-"\u013E"] | ["\u0141"-"\u0148"] |
|
||||
["\u014A"-"\u017E"] | ["\u0180"-"\u01C3"] | ["\u01CD"-"\u01F0"] | ["\u01F4"-"\u01F5"] |
|
||||
["\u01FA"-"\u0217"] | ["\u0250"-"\u02A8"] | ["\u02BB"-"\u02C1"] | "\u0386" | ["\u0388"-"\u038A"] |
|
||||
"\u038C" | ["\u038E"-"\u03A1"] | ["\u03A3"-"\u03CE"] | ["\u03D0"-"\u03D6"] | "\u03DA" |
|
||||
"\u03DC" | "\u03DE" | "\u03E0" | ["\u03E2"-"\u03F3"] | ["\u0401"-"\u040C"] | ["\u040E"-"\u044F"] |
|
||||
["\u0451"-"\u045C"] | ["\u045E"-"\u0481"] | ["\u0490"-"\u04C4"] | ["\u04C7"-"\u04C8"] |
|
||||
["\u04CB"-"\u04CC"] | ["\u04D0"-"\u04EB"] | ["\u04EE"-"\u04F5"] | ["\u04F8"-"\u04F9"] |
|
||||
["\u0531"-"\u0556"] | "\u0559" | ["\u0561"-"\u0586"] | ["\u05D0"-"\u05EA"] | ["\u05F0"-"\u05F2"] |
|
||||
["\u0621"-"\u063A"] | ["\u0641"-"\u064A"] | ["\u0671"-"\u06B7"] | ["\u06BA"-"\u06BE"] |
|
||||
["\u06C0"-"\u06CE"] | ["\u06D0"-"\u06D3"] | "\u06D5" | ["\u06E5"-"\u06E6"] | ["\u0905"-"\u0939"] |
|
||||
"\u093D" | ["\u0958"-"\u0961"] | ["\u0985"-"\u098C"] | ["\u098F"-"\u0990"] | ["\u0993"-"\u09A8"] |
|
||||
["\u09AA"-"\u09B0"] | "\u09B2" | ["\u09B6"-"\u09B9"] | ["\u09DC"-"\u09DD"] | ["\u09DF"-"\u09E1"] |
|
||||
["\u09F0"-"\u09F1"] | ["\u0A05"-"\u0A0A"] | ["\u0A0F"-"\u0A10"] | ["\u0A13"-"\u0A28"] |
|
||||
["\u0A2A"-"\u0A30"] | ["\u0A32"-"\u0A33"] | ["\u0A35"-"\u0A36"] | ["\u0A38"-"\u0A39"] |
|
||||
["\u0A59"-"\u0A5C"] | "\u0A5E" | ["\u0A72"-"\u0A74"] | ["\u0A85"-"\u0A8B"] | "\u0A8D" |
|
||||
["\u0A8F"-"\u0A91"] | ["\u0A93"-"\u0AA8"] | ["\u0AAA"-"\u0AB0"] | ["\u0AB2"-"\u0AB3"] |
|
||||
["\u0AB5"-"\u0AB9"] | "\u0ABD" | "\u0AE0" | ["\u0B05"-"\u0B0C"] | ["\u0B0F"-"\u0B10"] |
|
||||
["\u0B13"-"\u0B28"] | ["\u0B2A"-"\u0B30"] | ["\u0B32"-"\u0B33"] | ["\u0B36"-"\u0B39"] |
|
||||
"\u0B3D" | ["\u0B5C"-"\u0B5D"] | ["\u0B5F"-"\u0B61"] | ["\u0B85"-"\u0B8A"] | ["\u0B8E"-"\u0B90"] |
|
||||
["\u0B92"-"\u0B95"] | ["\u0B99"-"\u0B9A"] | "\u0B9C" | ["\u0B9E"-"\u0B9F"] | ["\u0BA3"-"\u0BA4"] |
|
||||
["\u0BA8"-"\u0BAA"] | ["\u0BAE"-"\u0BB5"] | ["\u0BB7"-"\u0BB9"] | ["\u0C05"-"\u0C0C"] |
|
||||
["\u0C0E"-"\u0C10"] | ["\u0C12"-"\u0C28"] | ["\u0C2A"-"\u0C33"] | ["\u0C35"-"\u0C39"] |
|
||||
["\u0C60"-"\u0C61"] | ["\u0C85"-"\u0C8C"] | ["\u0C8E"-"\u0C90"] | ["\u0C92"-"\u0CA8"] |
|
||||
["\u0CAA"-"\u0CB3"] | ["\u0CB5"-"\u0CB9"] | "\u0CDE" | ["\u0CE0"-"\u0CE1"] | ["\u0D05"-"\u0D0C"] |
|
||||
["\u0D0E"-"\u0D10"] | ["\u0D12"-"\u0D28"] | ["\u0D2A"-"\u0D39"] | ["\u0D60"-"\u0D61"] |
|
||||
["\u0E01"-"\u0E2E"] | "\u0E30" | ["\u0E32"-"\u0E33"] | ["\u0E40"-"\u0E45"] | ["\u0E81"-"\u0E82"] |
|
||||
"\u0E84" | ["\u0E87"-"\u0E88"] | "\u0E8A" | "\u0E8D" | ["\u0E94"-"\u0E97"] | ["\u0E99"-"\u0E9F"] |
|
||||
["\u0EA1"-"\u0EA3"] | "\u0EA5" | "\u0EA7" | ["\u0EAA"-"\u0EAB"] | ["\u0EAD"-"\u0EAE"] | "\u0EB0" |
|
||||
["\u0EB2"-"\u0EB3"] | "\u0EBD" | ["\u0EC0"-"\u0EC4"] | ["\u0F40"-"\u0F47"] | ["\u0F49"-"\u0F69"] |
|
||||
["\u10A0"-"\u10C5"] | ["\u10D0"-"\u10F6"] | "\u1100" | ["\u1102"-"\u1103"] | ["\u1105"-"\u1107"] |
|
||||
"\u1109" | ["\u110B"-"\u110C"] | ["\u110E"-"\u1112"] | "\u113C" | "\u113E" | "\u1140" | "\u114C" |
|
||||
"\u114E" | "\u1150" | ["\u1154"-"\u1155"] | "\u1159" | ["\u115F"-"\u1161"] | "\u1163" | "\u1165" |
|
||||
"\u1167" | "\u1169" | ["\u116D"-"\u116E"] | ["\u1172"-"\u1173"] | "\u1175" | "\u119E" | "\u11A8" |
|
||||
"\u11AB" | ["\u11AE"-"\u11AF"] | ["\u11B7"-"\u11B8"] | "\u11BA" | ["\u11BC"-"\u11C2"] | "\u11EB" |
|
||||
"\u11F0" | "\u11F9" | ["\u1E00"-"\u1E9B"] | ["\u1EA0"-"\u1EF9"] | ["\u1F00"-"\u1F15"] |
|
||||
["\u1F18"-"\u1F1D"] |
|
||||
["\u1F20"-"\u1F45"] | ["\u1F48"-"\u1F4D"] | ["\u1F50"-"\u1F57"] | "\u1F59" | "\u1F5B" | "\u1F5D" |
|
||||
["\u1F5F"-"\u1F7D"] | ["\u1F80"-"\u1FB4"] | ["\u1FB6"-"\u1FBC"] | "\u1FBE" | ["\u1FC2"-"\u1FC4"] |
|
||||
["\u1FC6"-"\u1FCC"] | ["\u1FD0"-"\u1FD3"] | ["\u1FD6"-"\u1FDB"] | ["\u1FE0"-"\u1FEC"] |
|
||||
["\u1FF2"-"\u1FF4"] | ["\u1FF6"-"\u1FFC"] | "\u2126" | ["\u212A"-"\u212B"] | "\u212E" |
|
||||
["\u2180"-"\u2182"] | ["\u3041"-"\u3094"] | ["\u30A1"-"\u30FA"] | ["\u3105"-"\u312C"] |
|
||||
["\uAC00"-"\uD7A3"]
|
||||
)
|
||||
>
|
||||
|
|
||||
<#Ideographic :
|
||||
(["\u4E00"-"\u9FA5"] | "\u3007" | ["\u3021"-"\u3029"])
|
||||
>
|
||||
|
|
||||
<#CombiningChar :
|
||||
(
|
||||
["\u0300"-"\u0345"] | ["\u0360"-"\u0361"] | ["\u0483"-"\u0486"] | ["\u0591"-"\u05A1"] |
|
||||
["\u05A3"-"\u05B9"] | ["\u05BB"-"\u05BD"] | "\u05BF" | ["\u05C1"-"\u05C2"] |
|
||||
"\u05C4" | ["\u064B"-"\u0652"] | "\u0670" | ["\u06D6"-"\u06DC"] |
|
||||
["\u06DD"-"\u06DF"] | ["\u06E0"-"\u06E4"] | ["\u06E7"-"\u06E8"] | ["\u06EA"-"\u06ED"] |
|
||||
["\u0901"-"\u0903"] | "\u093C" |["\u093E"-"\u094C"] | "\u094D" | ["\u0951"-"\u0954"] |
|
||||
["\u0962"-"\u0963"] | ["\u0981"-"\u0983"] | "\u09BC" | "\u09BE" | "\u09BF" | ["\u09C0"-"\u09C4"] |
|
||||
["\u09C7"-"\u09C8"] | ["\u09CB"-"\u09CD"] | "\u09D7" | ["\u09E2"-"\u09E3"] | "\u0A02" | "\u0A3C" |
|
||||
"\u0A3E" | "\u0A3F" | ["\u0A40"-"\u0A42"] |
|
||||
["\u0A47"-"\u0A48"] | ["\u0A4B"-"\u0A4D"] | ["\u0A70"-"\u0A71"] | ["\u0A81"-"\u0A83"] | "\u0ABC" |
|
||||
["\u0ABE"-"\u0AC5"] | ["\u0AC7"-"\u0AC9"] | ["\u0ACB"-"\u0ACD"] | ["\u0B01"-"\u0B03"] | "\u0B3C" |
|
||||
["\u0B3E"-"\u0B43"] | ["\u0B47"-"\u0B48"] | ["\u0B4B"-"\u0B4D"] | ["\u0B56"-"\u0B57"] |
|
||||
["\u0B82"-"\u0B83"] | ["\u0BBE"-"\u0BC2"] | ["\u0BC6"-"\u0BC8"] | ["\u0BCA"-"\u0BCD"] | "\u0BD7" |
|
||||
["\u0C01"-"\u0C03"] | ["\u0C3E"-"\u0C44"] | ["\u0C46"-"\u0C48"] | ["\u0C4A"-"\u0C4D"] |
|
||||
["\u0C55"-"\u0C56"] | ["\u0C82"-"\u0C83"] | ["\u0CBE"-"\u0CC4"] | ["\u0CC6"-"\u0CC8"] |
|
||||
["\u0CCA"-"\u0CCD"] | ["\u0CD5"-"\u0CD6"] | ["\u0D02"-"\u0D03"] | ["\u0D3E"-"\u0D43"] |
|
||||
["\u0D46"-"\u0D48"] | ["\u0D4A"-"\u0D4D"] | "\u0D57" | "\u0E31" | ["\u0E34"-"\u0E3A"] |
|
||||
["\u0E47"-"\u0E4E"] | "\u0EB1" | ["\u0EB4"-"\u0EB9"] | ["\u0EBB"-"\u0EBC"] | ["\u0EC8"-"\u0ECD"] |
|
||||
["\u0F18"-"\u0F19"] | "\u0F35" | "\u0F37" | "\u0F39" | "\u0F3E" | "\u0F3F" | ["\u0F71"-"\u0F84"] |
|
||||
["\u0F86"-"\u0F8B"] | ["\u0F90"-"\u0F95"] | "\u0F97" | ["\u0F99"-"\u0FAD"] | ["\u0FB1"-"\u0FB7"] |
|
||||
"\u0FB9" | ["\u20D0"-"\u20DC"] | "\u20E1" | ["\u302A"-"\u302F"] | "\u3099" | "\u309A"
|
||||
)
|
||||
>
|
||||
|
|
||||
<#UnicodeDigit :
|
||||
["\u0030"-"\u0039"] | ["\u0660"-"\u0669"] | ["\u06F0"-"\u06F9"] | ["\u0966"-"\u096F"] |
|
||||
["\u09E6"-"\u09EF"] | ["\u0A66"-"\u0A6F"] | ["\u0AE6"-"\u0AEF"] | ["\u0B66"-"\u0B6F"] |
|
||||
["\u0BE7"-"\u0BEF"] | ["\u0C66"-"\u0C6F"] | ["\u0CE6"-"\u0CEF"] | ["\u0D66"-"\u0D6F"] |
|
||||
["\u0E50"-"\u0E59"] | ["\u0ED0"-"\u0ED9"] | ["\u0F20"-"\u0F29"]
|
||||
>
|
||||
|
|
||||
<#Extender :
|
||||
"\u00B7" | "\u02D0" | "\u02D1" | "\u0387" | "\u0640" | "\u0E46" | "\u0EC6" |
|
||||
"\u3005" | ["\u3031"-"\u3035"] | ["\u309D"-"\u309E"] | ["\u30FC"-"\u30FE"]
|
||||
>
|
||||
|
|
||||
<NCNAME :
|
||||
(<Letter> | ["_"]) (<Letter> | <UnicodeDigit> | [".","-","_"] | <CombiningChar> | <Extender>)*
|
||||
>
|
||||
|
|
||||
< NUMBER: "[" (["0"-"9"])+ "]"> |
|
||||
< FACETNAME: "ordered" | "bounded" | "numeric" | "cardinality" | "whiteSpace" | "minInclusive" | "maxInclusive" | "minExclusive" | "maxExclusive" | "totalDigits" | "fractionDigits" | "length" | "minLength" | "maxLength" | "pattern" | "enumeration" >
|
||||
} // "[^:]+"
|
||||
|
||||
UName QName() : { Token p,l=null; }
|
||||
{
|
||||
p=<NCNAME> ( ":" l=<NCNAME> ) ?
|
||||
{
|
||||
if(l==null)
|
||||
return new UName(resolvePrefix(""),p.image);
|
||||
else
|
||||
return new UName(resolvePrefix(p.image),l.image);
|
||||
}
|
||||
}
|
||||
|
||||
String Prefix() : { Token p;}
|
||||
{
|
||||
p=<NCNAME> {return resolvePrefix(p.image);}
|
||||
| {return resolvePrefix("");}
|
||||
}
|
||||
|
||||
|
||||
List RelativeSchemaComponentPath() :
|
||||
{
|
||||
List steps = new ArrayList();
|
||||
Step s;
|
||||
}
|
||||
{
|
||||
(// make it absolute
|
||||
"/" {steps.add(new Step.Any(Axis.ROOT));}
|
||||
| "//" {steps.add(new Step.Any(Axis.DESCENDANTS));}
|
||||
)?
|
||||
s=Step() {steps.add(s);}
|
||||
(
|
||||
(
|
||||
"/"
|
||||
| "//" {steps.add(new Step.Any(Axis.DESCENDANTS));}
|
||||
)
|
||||
s=Step() {steps.add(s);}
|
||||
)*
|
||||
{ return steps; }
|
||||
}
|
||||
|
||||
Step Step() :
|
||||
{
|
||||
Step s; String p; Token n;
|
||||
}
|
||||
{(
|
||||
("attribute::"|"@") s=NameOrWildcard(Axis.ATTRIBUTE)
|
||||
| ("element::")? s=NameOrWildcard(Axis.ELEMENT) (Predicate(s))?
|
||||
| "substitutionGroup::" s=NameOrWildcard(Axis.SUBSTITUTION_GROUP)
|
||||
| ("type::"|"~") s=NameOrWildcardOrAnonymous(Axis.TYPE_DEFINITION)
|
||||
| "baseType::" s=NameOrWildcard(Axis.BASETYPE)
|
||||
| "primitiveType::" s=NameOrWildcard(Axis.PRIMITIVE_TYPE)
|
||||
| "itemType::" s=NameOrWildcardOrAnonymous(Axis.ITEM_TYPE)
|
||||
| "memberType::" s=NameOrWildcardOrAnonymous(Axis.MEMBER_TYPE) (Predicate(s))?
|
||||
| "scope::" s=NameOrWildcardOrAnonymous(Axis.SCOPE)
|
||||
| "attributeGroup::" s=NameOrWildcard(Axis.ATTRIBUTE_GROUP)
|
||||
| "group::" s=NameOrWildcard(Axis.MODEL_GROUP_DECL)
|
||||
| "identityContraint::" s=NameOrWildcard(Axis.IDENTITY_CONSTRAINT)
|
||||
| "key::" s=NameOrWildcard(Axis.REFERENCED_KEY)
|
||||
| "notation::" s=NameOrWildcard(Axis.NOTATION)
|
||||
// TODO: support "annotation::*"
|
||||
| "model::sequence" {s=new Step.Any(Axis.MODELGROUP_SEQUENCE);} (Predicate(s))?
|
||||
| "model::choice" {s=new Step.Any(Axis.MODELGROUP_CHOICE);} (Predicate(s))?
|
||||
| "model::all" {s=new Step.Any(Axis.MODELGROUP_ALL);} (Predicate(s))?
|
||||
| "model::*" {s=new Step.Any(Axis.MODELGROUP_ANY);} (Predicate(s))?
|
||||
| "any::*" {s=new Step.Any(Axis.WILDCARD);} (Predicate(s))?
|
||||
| "anyAttribute::*" {s=new Step.Any(Axis.ATTRIBUTE_WILDCARD);}
|
||||
| "facet::*" {s=new Step.Any(Axis.FACET);}
|
||||
| "facet::" n=<FACETNAME> {s=new Step.Facet(Axis.FACET,n.image);}
|
||||
| "component::*" {s=new Step.Any(Axis.DESCENDANTS);} // this is not in BNF but in prose
|
||||
| "x-schema::" p=Prefix() {s=new Step.Schema(Axis.X_SCHEMA,p);} // this is non-standard
|
||||
| "x-schema::*" {s=new Step.Any(Axis.X_SCHEMA);} // this is non-standard
|
||||
) {return s;}}
|
||||
|
||||
Step NameOrWildcard(Axis a) : {UName un;}
|
||||
{
|
||||
un=QName() { return new Step.Named(a,un); }
|
||||
| "*" { return new Step.Any(a); }
|
||||
}
|
||||
|
||||
Step NameOrWildcardOrAnonymous(Axis a) : {UName un;}
|
||||
{
|
||||
un=QName() { return new Step.Named(a,un); }
|
||||
| "*" { return new Step.Any(a); }
|
||||
| "0" { return new Step.AnonymousType(a); }
|
||||
}
|
||||
|
||||
int Predicate(Step s) :
|
||||
{
|
||||
Token t;
|
||||
}
|
||||
{
|
||||
t=<NUMBER> { return s.predicate=Integer.parseInt(trim(t.image)); }
|
||||
}
|
450
platform/runtime/modules/atlasmap/xsom/XSOM.ipr
Normal file
450
platform/runtime/modules/atlasmap/xsom/XSOM.ipr
Normal file
@ -0,0 +1,450 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 2 only ("GPL") or the Common Development
|
||||
and Distribution License("CDDL") (collectively, the "License"). You
|
||||
may not use this file except in compliance with the License. You can
|
||||
obtain a copy of the License at
|
||||
https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
|
||||
or packager/legal/LICENSE.txt. See the License for the specific
|
||||
language governing permissions and limitations under the License.
|
||||
|
||||
When distributing the software, include this License Header Notice in each
|
||||
file and include the License file at packager/legal/LICENSE.txt.
|
||||
|
||||
GPL Classpath Exception:
|
||||
Oracle designates this particular file as subject to the "Classpath"
|
||||
exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
file that accompanied this code.
|
||||
|
||||
Modifications:
|
||||
If applicable, add the following below the License Header, with the fields
|
||||
enclosed by brackets [] replaced by your own identifying information:
|
||||
"Portions Copyright [year] [name of copyright owner]"
|
||||
|
||||
Contributor(s):
|
||||
If you wish your version of this file to be governed by only the CDDL or
|
||||
only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
elects to include this software in this distribution under the [CDDL or GPL
|
||||
Version 2] license." If you don't indicate a single choice of license, a
|
||||
recipient has the option to distribute your version of this file under
|
||||
either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
its licensees as provided above. However, if you add GPL Version 2 code
|
||||
and therefore, elected the GPL Version 2 license, then the option applies
|
||||
only if the new code is made subject to such option by the copyright
|
||||
holder.
|
||||
|
||||
-->
|
||||
|
||||
<project relativePaths="false" version="4">
|
||||
<component name="AntConfiguration">
|
||||
<defaultAnt bundledAnt="true" />
|
||||
<buildFile url="file://$PROJECT_DIR$/build.xml">
|
||||
<additionalClassPath />
|
||||
<antReference projectDefault="true" />
|
||||
<customJdkName value="" />
|
||||
<maximumHeapSize value="128" />
|
||||
<properties />
|
||||
</buildFile>
|
||||
</component>
|
||||
<component name="BSFConsole">
|
||||
<sendcommandbycontrolenter>false</sendcommandbycontrolenter>
|
||||
<restoresystemstreams>false</restoresystemstreams>
|
||||
<outwaitsforerr>false</outwaitsforerr>
|
||||
<errwaitsforout>false</errwaitsforout>
|
||||
<storedupsinrecentcommands>false</storedupsinrecentcommands>
|
||||
<moduleforclasspath />
|
||||
<includeoutputpath>false</includeoutputpath>
|
||||
<includetestsoutputpath>false</includetestsoutputpath>
|
||||
<languages>
|
||||
<language name="ant" engine="org.kos.bsfconsoleplugin.languages.AntConsoleBSFEngine" />
|
||||
<language name="beanshell" engine="bsh.util.BeanShellBSFEngine" />
|
||||
<language name="netrexx" engine="org.apache.bsf.engines.netrexx.NetRexxEngine" />
|
||||
<language name="xslt" engine="org.apache.bsf.engines.xslt.XSLTEngine" />
|
||||
<language name="beanbasic" engine="org.apache.bsf.engines.beanbasic.BeanBasicEngine" />
|
||||
<language name="bml" engine="org.apache.bml.ext.BMLEngine" />
|
||||
<language name="groovy" engine="org.codehaus.groovy.bsf.GroovyEngine" />
|
||||
<language name="jacl" engine="org.apache.bsf.engines.jacl.JaclEngine" />
|
||||
<language name="java" engine="org.apache.bsf.engines.java.JavaEngine" />
|
||||
<language name="javaclass" engine="org.apache.bsf.engines.javaclass.JavaClassEngine" />
|
||||
<language name="javascript" engine="org.apache.bsf.engines.javascript.JavaScriptEngine" />
|
||||
<language name="jpython" engine="org.apache.bsf.engines.jpython.JPythonEngine" />
|
||||
<language name="jruby" engine="org.jruby.javasupport.bsf.JRubyEngine" />
|
||||
<language name="jscript" engine="org.apache.bsf.engines.activescript.ActiveScriptEngine" />
|
||||
<language name="judoscript" engine="com.judoscript.BSFJudoEngine" />
|
||||
<language name="jython" engine="org.apache.bsf.engines.jython.JythonEngine" />
|
||||
<language name="lotusscript" engine="org.apache.bsf.engines.lotusscript.LsEngine" />
|
||||
<language name="perl" engine="org.apache.bsf.engines.perl.PerlEngine" />
|
||||
<language name="perlscript" engine="org.apache.bsf.engines.activescript.ActiveScriptEngine" />
|
||||
<language name="pnuts" engine="pnuts.ext.PnutsBSFEngine" />
|
||||
<language name="vbscript" engine="org.apache.bsf.engines.activescript.ActiveScriptEngine" />
|
||||
</languages>
|
||||
<startupscripts />
|
||||
<preferredrecentcommandsdividerlocations />
|
||||
<BSFConsoleSearchOptions searchfromcursor="false">
|
||||
<recentsearches />
|
||||
</BSFConsoleSearchOptions>
|
||||
</component>
|
||||
<component name="BuildJarProjectSettings">
|
||||
<option name="BUILD_JARS_ON_MAKE" value="false" />
|
||||
</component>
|
||||
<component name="CodeStyleProjectProfileManger">
|
||||
<option name="PROJECT_PROFILE" />
|
||||
<option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
|
||||
</component>
|
||||
<component name="CodeStyleSettingsManager">
|
||||
<option name="PER_PROJECT_SETTINGS" />
|
||||
<option name="USE_PER_PROJECT_SETTINGS" value="false" />
|
||||
</component>
|
||||
<component name="CompilerConfiguration">
|
||||
<option name="DEFAULT_COMPILER" value="Javac" />
|
||||
<option name="DEPLOY_AFTER_MAKE" value="0" />
|
||||
<resourceExtensions>
|
||||
<entry name=".+\.(properties|xml|html|dtd|tld)" />
|
||||
<entry name=".+\.(gif|png|jpeg|jpg)" />
|
||||
</resourceExtensions>
|
||||
<wildcardResourcePatterns>
|
||||
<entry name="?*.properties" />
|
||||
<entry name="?*.xml" />
|
||||
<entry name="?*.gif" />
|
||||
<entry name="?*.png" />
|
||||
<entry name="?*.jpeg" />
|
||||
<entry name="?*.jpg" />
|
||||
<entry name="?*.html" />
|
||||
<entry name="?*.dtd" />
|
||||
<entry name="?*.tld" />
|
||||
</wildcardResourcePatterns>
|
||||
</component>
|
||||
<component name="DependenciesAnalyzeManager">
|
||||
<option name="myForwardDirection" value="false" />
|
||||
</component>
|
||||
<component name="DependencyValidationManager">
|
||||
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
|
||||
</component>
|
||||
<component name="EclipseCompilerSettings">
|
||||
<option name="DEBUGGING_INFO" value="true" />
|
||||
<option name="GENERATE_NO_WARNINGS" value="true" />
|
||||
<option name="DEPRECATION" value="false" />
|
||||
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
|
||||
<option name="MAXIMUM_HEAP_SIZE" value="128" />
|
||||
</component>
|
||||
<component name="EclipseEmbeddedCompilerSettings">
|
||||
<option name="DEBUGGING_INFO" value="true" />
|
||||
<option name="GENERATE_NO_WARNINGS" value="true" />
|
||||
<option name="DEPRECATION" value="false" />
|
||||
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
|
||||
<option name="MAXIMUM_HEAP_SIZE" value="128" />
|
||||
</component>
|
||||
<component name="EntryPointsManager">
|
||||
<entry_points version="2.0" />
|
||||
</component>
|
||||
<component name="ExportToHTMLSettings">
|
||||
<option name="PRINT_LINE_NUMBERS" value="false" />
|
||||
<option name="OPEN_IN_BROWSER" value="false" />
|
||||
<option name="OUTPUT_DIRECTORY" />
|
||||
</component>
|
||||
<component name="IdProvider" IDEtalkID="2BC6E578798CB038511CE9FD5696905F" />
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<option name="PROJECT_PROFILE" value="Project Default" />
|
||||
<option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
|
||||
<scopes />
|
||||
<profiles>
|
||||
<profile version="1.0" is_locked="false">
|
||||
<option name="myName" value="Project Default" />
|
||||
<option name="myLocal" value="false" />
|
||||
<inspection_tool class="InstanceofChain" level="WARNING" enabled="true" />
|
||||
<inspection_tool class="InfiniteLoopStatement" level="WARNING" enabled="false" />
|
||||
<inspection_tool class="EmptyCatchBlock" level="WARNING" enabled="false">
|
||||
<option name="m_includeComments" value="true" />
|
||||
<option name="m_ignoreTestCases" value="true" />
|
||||
<option name="m_ignoreIgnoreParameter" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="JavaDoc" level="WARNING" enabled="false">
|
||||
<option name="TOP_LEVEL_CLASS_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="INNER_CLASS_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="METHOD_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="FIELD_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="IGNORE_DEPRECATED" value="false" />
|
||||
<option name="IGNORE_JAVADOC_PERIOD" value="true" />
|
||||
<option name="myAdditionalJavadocTags" value="" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</profiles>
|
||||
<list size="0" />
|
||||
</component>
|
||||
<component name="JavacSettings">
|
||||
<option name="DEBUGGING_INFO" value="true" />
|
||||
<option name="GENERATE_NO_WARNINGS" value="false" />
|
||||
<option name="DEPRECATION" value="true" />
|
||||
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
|
||||
<option name="MAXIMUM_HEAP_SIZE" value="128" />
|
||||
</component>
|
||||
<component name="JavadocGenerationManager">
|
||||
<option name="OUTPUT_DIRECTORY" />
|
||||
<option name="OPTION_SCOPE" value="protected" />
|
||||
<option name="OPTION_HIERARCHY" value="true" />
|
||||
<option name="OPTION_NAVIGATOR" value="true" />
|
||||
<option name="OPTION_INDEX" value="true" />
|
||||
<option name="OPTION_SEPARATE_INDEX" value="true" />
|
||||
<option name="OPTION_DOCUMENT_TAG_USE" value="false" />
|
||||
<option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
|
||||
<option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
|
||||
<option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
|
||||
<option name="OPTION_DEPRECATED_LIST" value="true" />
|
||||
<option name="OTHER_OPTIONS" value="" />
|
||||
<option name="HEAP_SIZE" />
|
||||
<option name="LOCALE" />
|
||||
<option name="OPEN_IN_BROWSER" value="true" />
|
||||
</component>
|
||||
<component name="JikesSettings">
|
||||
<option name="JIKES_PATH" value="" />
|
||||
<option name="DEBUGGING_INFO" value="true" />
|
||||
<option name="DEPRECATION" value="true" />
|
||||
<option name="GENERATE_NO_WARNINGS" value="false" />
|
||||
<option name="IS_EMACS_ERRORS_MODE" value="true" />
|
||||
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
|
||||
</component>
|
||||
<component name="LogConsolePreferences">
|
||||
<option name="FILTER_ERRORS" value="false" />
|
||||
<option name="FILTER_WARNINGS" value="false" />
|
||||
<option name="FILTER_INFO" value="true" />
|
||||
<option name="CUSTOM_FILTER" />
|
||||
</component>
|
||||
<component name="Maven Reloaded">
|
||||
<option name="config">
|
||||
<value>
|
||||
<option name="pluginEnabled" value="false" />
|
||||
<option name="updateClasspathsEnabled" value="true" />
|
||||
<option name="sortDependenciesEnabled" value="false" />
|
||||
<option name="removeDuplicateDependenciesEnabled" value="false" />
|
||||
<option name="manageSourceRootsEnabled" value="true" />
|
||||
<option name="manageModuleInterdependenciesEnabled" value="true" />
|
||||
<option name="downloadSourcesEnabled" value="false" />
|
||||
<option name="downloadJavadocEnabled" value="false" />
|
||||
<option name="generateSourcesEnabled" value="false" />
|
||||
<option name="settingsPath" value="C:\Documents and Settings\kohsuke/.m2/settings.xml" />
|
||||
<option name="disabledPoms">
|
||||
<value>
|
||||
<collection type="java.util.TreeSet" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="moduleInterDependencies">
|
||||
<value>
|
||||
<map type="java.util.TreeMap" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="logLevel" value="1" />
|
||||
</value>
|
||||
</option>
|
||||
</component>
|
||||
<component name="MavenBuildProjectComponent">
|
||||
<option name="mavenExecutable" value="" />
|
||||
<option name="Settings File" value="C:\Documents and Settings\kohsuke\.m2\settings.xml" />
|
||||
<option name="mavenCommandLineParams" value="" />
|
||||
<option name="vmOptions" value="" />
|
||||
<option name="useMavenEmbedder" value="false" />
|
||||
<option name="useFilter" value="false" />
|
||||
<option name="Batch Mode" value="false" />
|
||||
<option name="Check Plugin Updates" value="false" />
|
||||
<option name="Debug" value="false" />
|
||||
<option name="Errors" value="false" />
|
||||
<option name="Fail At End" value="false" />
|
||||
<option name="Fail Fast" value="false" />
|
||||
<option name="Fail Never" value="false" />
|
||||
<option name="Lax Checksums" value="false" />
|
||||
<option name="No Plugin Registry" value="false" />
|
||||
<option name="No Plugin Updates" value="false" />
|
||||
<option name="Non Recursive" value="false" />
|
||||
<option name="Offline" value="false" />
|
||||
<option name="Reactor" value="false" />
|
||||
<option name="Strict Checksums" value="false" />
|
||||
<option name="Update Plugins" value="false" />
|
||||
<option name="Update Snapshots" value="false" />
|
||||
<option name="Skip Tests" value="false" />
|
||||
<pom-list />
|
||||
</component>
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
<component name="ProjectFileVersion" converted="true" />
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/XSOM.iml" filepath="$PROJECT_DIR$/XSOM.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="JDK1.5" />
|
||||
<component name="ResourceManagerContainer">
|
||||
<option name="myResourceBundles">
|
||||
<value>
|
||||
<list size="0" />
|
||||
</value>
|
||||
</option>
|
||||
</component>
|
||||
<component name="RmicSettings">
|
||||
<option name="IS_EANABLED" value="false" />
|
||||
<option name="DEBUGGING_INFO" value="true" />
|
||||
<option name="GENERATE_NO_WARNINGS" value="false" />
|
||||
<option name="GENERATE_IIOP_STUBS" value="false" />
|
||||
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
|
||||
</component>
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="CVS" />
|
||||
</component>
|
||||
<component name="WebServicesPlugin" addRequiredLibraries="true" />
|
||||
<component name="com.intellij.jsf.UserDefinedFacesConfigs">
|
||||
<option name="USER_DEFINED_CONFIGS">
|
||||
<value>
|
||||
<list size="0" />
|
||||
</value>
|
||||
</option>
|
||||
</component>
|
||||
<component name="uidesigner-configuration">
|
||||
<option name="INSTRUMENT_CLASSES" value="true" />
|
||||
<option name="COPY_FORMS_RUNTIME_TO_OUTPUT" value="true" />
|
||||
<option name="DEFAULT_LAYOUT_MANAGER" value="GridLayoutManager" />
|
||||
</component>
|
||||
</project>
|
||||
|
42
platform/runtime/modules/atlasmap/xsom/copyright-exclude
Normal file
42
platform/runtime/modules/atlasmap/xsom/copyright-exclude
Normal file
@ -0,0 +1,42 @@
|
||||
/MANIFEST.MF
|
||||
/META-INF/services/
|
||||
/README
|
||||
.gif
|
||||
.jpg
|
||||
.jpeg
|
||||
.jpeg1
|
||||
.jpeg2
|
||||
.png
|
||||
.svg
|
||||
.tif
|
||||
.exe
|
||||
.ico
|
||||
.jar
|
||||
.zip
|
||||
.war
|
||||
.sql
|
||||
.jks
|
||||
.json
|
||||
.class
|
||||
.bin
|
||||
.iml
|
||||
.ipr
|
||||
.envelope
|
||||
.txt
|
||||
.bat
|
||||
.sh
|
||||
.settings
|
||||
/CDDL+GPLv2.xml
|
||||
/copyright-exclude
|
||||
/LICENSE
|
||||
/CDDL+GPLv2.txt
|
||||
CDDL+GPLv2.html
|
||||
/copyright.txt
|
||||
.commented
|
||||
/.auth
|
||||
.svnignore
|
||||
.svn
|
||||
www
|
||||
site
|
||||
/src/com/sun/xml/xsom/impl/util/Uri.java
|
||||
/doc/retroweaver-license.html
|
55
platform/runtime/modules/atlasmap/xsom/copyright.txt
Normal file
55
platform/runtime/modules/atlasmap/xsom/copyright.txt
Normal file
@ -0,0 +1,55 @@
|
||||
====
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
====
|
||||
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
*
|
||||
* Copyright (c) YYYY Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* http://glassfish.java.net/public/CDDL+GPL_1_1.html
|
||||
* or packager/legal/LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at packager/legal/LICENSE.txt.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
*/
|
68
platform/runtime/modules/atlasmap/xsom/doc/CHANGELOG.txt
Normal file
68
platform/runtime/modules/atlasmap/xsom/doc/CHANGELOG.txt
Normal file
@ -0,0 +1,68 @@
|
||||
====
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
====
|
||||
|
||||
#
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
#
|
||||
# Copyright (c) 2010-2013 Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# The contents of this file are subject to the terms of either the GNU
|
||||
# General Public License Version 2 only ("GPL") or the Common Development
|
||||
# and Distribution License("CDDL") (collectively, the "License"). You
|
||||
# may not use this file except in compliance with the License. You can
|
||||
# obtain a copy of the License at
|
||||
# http://glassfish.java.net/public/CDDL+GPL_1_1.html
|
||||
# or packager/legal/LICENSE.txt. See the License for the specific
|
||||
# language governing permissions and limitations under the License.
|
||||
#
|
||||
# When distributing the software, include this License Header Notice in each
|
||||
# file and include the License file at packager/legal/LICENSE.txt.
|
||||
#
|
||||
# GPL Classpath Exception:
|
||||
# Oracle designates this particular file as subject to the "Classpath"
|
||||
# exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
# file that accompanied this code.
|
||||
#
|
||||
# Modifications:
|
||||
# If applicable, add the following below the License Header, with the fields
|
||||
# enclosed by brackets [] replaced by your own identifying information:
|
||||
# "Portions Copyright [year] [name of copyright owner]"
|
||||
#
|
||||
# Contributor(s):
|
||||
# If you wish your version of this file to be governed by only the CDDL or
|
||||
# only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
# elects to include this software in this distribution under the [CDDL or GPL
|
||||
# Version 2] license." If you don't indicate a single choice of license, a
|
||||
# recipient has the option to distribute your version of this file under
|
||||
# either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
# its licensees as provided above. However, if you add GPL Version 2 code
|
||||
# and therefore, elected the GPL Version 2 license, then the option applies
|
||||
# only if the new code is made subject to such option by the copyright
|
||||
# holder.
|
||||
#
|
||||
|
||||
From 1.0 (2003/04/03)
|
||||
=====================
|
||||
|
||||
- Fixed a bug in the parsing of:
|
||||
|
||||
<xs:element name="foo" substitutionGroup="bar" />
|
||||
|
||||
(2003/04/04)
|
||||
|
||||
- AnnotationParser was changed from an interface to an abstract class.
|
||||
This allows future versions to add new methods without breaking
|
||||
existing clients.
|
BIN
platform/runtime/modules/atlasmap/xsom/doc/architecture.png
Normal file
BIN
platform/runtime/modules/atlasmap/xsom/doc/architecture.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
BIN
platform/runtime/modules/atlasmap/xsom/doc/collaboration.png
Normal file
BIN
platform/runtime/modules/atlasmap/xsom/doc/collaboration.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
186
platform/runtime/modules/atlasmap/xsom/doc/implementation.html
Normal file
186
platform/runtime/modules/atlasmap/xsom/doc/implementation.html
Normal file
@ -0,0 +1,186 @@
|
||||
<html>
|
||||
<head>
|
||||
<!--
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright (c) 2010-2013 Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 2 only ("GPL") or the Common Development
|
||||
and Distribution License("CDDL") (collectively, the "License"). You
|
||||
may not use this file except in compliance with the License. You can
|
||||
obtain a copy of the License at
|
||||
http://glassfish.java.net/public/CDDL+GPL_1_1.html
|
||||
or packager/legal/LICENSE.txt. See the License for the specific
|
||||
language governing permissions and limitations under the License.
|
||||
|
||||
When distributing the software, include this License Header Notice in each
|
||||
file and include the License file at packager/legal/LICENSE.txt.
|
||||
|
||||
GPL Classpath Exception:
|
||||
Oracle designates this particular file as subject to the "Classpath"
|
||||
exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
file that accompanied this code.
|
||||
|
||||
Modifications:
|
||||
If applicable, add the following below the License Header, with the fields
|
||||
enclosed by brackets [] replaced by your own identifying information:
|
||||
"Portions Copyright [year] [name of copyright owner]"
|
||||
|
||||
Contributor(s):
|
||||
If you wish your version of this file to be governed by only the CDDL or
|
||||
only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
elects to include this software in this distribution under the [CDDL or GPL
|
||||
Version 2] license." If you don't indicate a single choice of license, a
|
||||
recipient has the option to distribute your version of this file under
|
||||
either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
its licensees as provided above. However, if you add GPL Version 2 code
|
||||
and therefore, elected the GPL Version 2 license, then the option applies
|
||||
only if the new code is made subject to such option by the copyright
|
||||
holder.
|
||||
|
||||
-->
|
||||
|
||||
<title>Design of XSOM</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
|
||||
<style>
|
||||
pre {
|
||||
background-color: rgb(240,240,240);
|
||||
margin-left: 2em;
|
||||
margin-right: 2em;
|
||||
padding: 1em;
|
||||
}
|
||||
p {
|
||||
margin-left: 2em;
|
||||
}
|
||||
dt {
|
||||
margin-top: 0.5em;
|
||||
margin-left: 2em;
|
||||
font-weight: bold;
|
||||
}
|
||||
dd {
|
||||
margin-left: 3em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 style="text-align:center">Design of XSOM</h1>
|
||||
<div align=right style="font-size:smaller">
|
||||
By <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke Kawaguchi</a><br>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
This document describes the details you need to know to extend/maintain XSOM.
|
||||
</p>
|
||||
|
||||
<h1>Design Goals</h1>
|
||||
<p>
|
||||
The primary design goals of XSOM are:
|
||||
</p>
|
||||
<ol>
|
||||
<li>Expose all the information defined in the schema spec
|
||||
<li>Provide additional methods that helps simplifying client applications.
|
||||
</ol>
|
||||
<p>
|
||||
Providing mutation methods was a non-goal for this project, primarily because of the added complexity.
|
||||
</p>
|
||||
|
||||
|
||||
<h1>Building workspace</h1>
|
||||
<p>
|
||||
The workspace uses Ant as the build tool. The followings are the major targets:
|
||||
</p>
|
||||
<dl>
|
||||
<dt>clean</dt>
|
||||
<dd>remove the intermediate and output files.</dd>
|
||||
|
||||
<dt>compile</dt>
|
||||
<dd>generate a parser by RelaxNGCC and compile all the source files into the bin directory.</dd>
|
||||
|
||||
<dt>jar</dt>
|
||||
<dd>make a jar file</dd>
|
||||
|
||||
<dt>release</dt>
|
||||
<dd>build a distribution zip file that contains everything from the source code to a binary file</dd>
|
||||
|
||||
<dt>src-zip</dt>
|
||||
<dd>Build a zip file that contains the source code.</dd>
|
||||
</dl>
|
||||
|
||||
<h1>Architecture</h1>
|
||||
<p>
|
||||
XSOM consists of roughly three parts.
|
||||
|
||||
The first part is the public interface, which is defined in the <code>com.sun.xml.xsom</code> package. The entire functionality of XSOM is exposed via this interface. This interface is derived from a draft document submitted to W3C by some WG members.
|
||||
</p><p>
|
||||
The second part is the implementation of these interfaces, the <code>com.sun.xml.xsom.impl</code> package. These code are all hand-written.
|
||||
</p><p>
|
||||
The third part is a parser that reads XML representation of XML Schema and builds XSOM nodes accordingly. The package is <code>com.sun.xml.xsom.parser</code>. This part of the code is mostly generated by <a href="http://relaxngcc.sourceforge.net/">RelaxNGCC</a>.
|
||||
</p>
|
||||
<center>
|
||||
<img src="architecture.png"/>
|
||||
</center>
|
||||
|
||||
|
||||
|
||||
|
||||
<h1>Implementation Details</h1>
|
||||
<p>
|
||||
Most of the implementation classes are fairly simple. Probably the only one interesting piece of code is the <code>Ref</code> class, which is a reference to other schema components.
|
||||
</p><p>
|
||||
The <code>Ref</code> class itself is just a place hodler and this class defined a series of inner interfaces that are specialized to hold a reference to different kinds of schema components.
|
||||
|
||||
The sole purpose of this indirection layer is to support forward references during a parsing of the XML representation.
|
||||
</p><p>
|
||||
A typical reference interface would look like this:
|
||||
</p>
|
||||
<pre>
|
||||
public static interface Term {
|
||||
/** Obtains a reference as a term. */
|
||||
XSTerm getTerm();
|
||||
}
|
||||
</pre>
|
||||
<p>
|
||||
In case this indirection is unnecessary, all implementation classes of <code>XSTerm</code> implements this <code>Ref.Term</code> interface. This applies to all the other types of the <code>Ref</code> interface. Therefore, whereever a reference is necessary, you can stimply pass a real object. In other words, a direct reference (<code>XS***Impl</code>) can be always treated as an indirect reference (<code>Ref.***</code>).
|
||||
</p><p>
|
||||
Implementations for forward references are placed in the <code>com.sun.xml.xsom.impl.parser.DelayedRef</code> class. The detail will be discussed later.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<h1>Parser</h1>
|
||||
<p>
|
||||
The following collaboration diagram shows various objects that participate in a parsing process.
|
||||
</p>
|
||||
<center>
|
||||
<img src="collaboration.png"/>
|
||||
</center>
|
||||
<p>
|
||||
<code>XSOMParser</code> is the only publicly visible component in this picture. This class also keeps references to vairous other objects that are necessary to parse schemas. This includes an error handler, the root <code>SchemaSet</code> object, an entity resolver, etc.
|
||||
</p><p>
|
||||
Whenever the parse method is called, it will create a new NGCCRuntimeEx and configure XMLReader so that a schema file is parsed into this NGCCRuntimeEx instance.
|
||||
|
||||
<code>NGCCRuntimeEx</code> derives from <code>NGCCRuntime</code>, which is a class generated by RelaxNGCC. This object will use other RelaxNGCC-generated classes and parse a document and constructs a XSOM object graph appropriately.
|
||||
</p><p>
|
||||
When a new XML document is referenced by an import or include statement, a new set of <code>NGCCRuntimeEx</code> is set up to parse that document. One NGCCRuntimeEx can only parse one XML document.
|
||||
</p>
|
||||
<h2>Forward references and back-patching</h2>
|
||||
<p>
|
||||
Since we use SAX to parse schemas, the referenced schema component is often unavailable when we hit a reference. Because of this, when we see a reference, we create a "delayed" reference that keeps the name of the referenced component.
|
||||
</p><p>
|
||||
Note that because of the way XML Schema <redefine> works, all the references by name must be lazily bound even if the component is already defined.
|
||||
</p><p>
|
||||
All these "delayed" references are remembered and tracked by XSOMParser. When the client calls the <code>XSOMParser.getResult</code> method, XSOMParser will make sure that they resolve to a schema component correctly.
|
||||
"Delayed" references are available in the <code>DelayedRef</code> class.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>RelaxNGCC</h2>
|
||||
<p>
|
||||
The actual parser is generated by RelaxNGCC from <code>xsom/src/*.rng</code> files. <code>xmlschema.rng</code> is the entry point and all the other files are referenced from this file. For more information about RelaxNGCC, goto <a href="http://relaxngcc.sourceforge.net/">here</a>. Or just contact me (as I'm one of the developers of RelaxNGCC.)
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
58
platform/runtime/modules/atlasmap/xsom/doc/limitations.txt
Normal file
58
platform/runtime/modules/atlasmap/xsom/doc/limitations.txt
Normal file
@ -0,0 +1,58 @@
|
||||
====
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
====
|
||||
|
||||
#
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
#
|
||||
# Copyright (c) 2010-2013 Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# The contents of this file are subject to the terms of either the GNU
|
||||
# General Public License Version 2 only ("GPL") or the Common Development
|
||||
# and Distribution License("CDDL") (collectively, the "License"). You
|
||||
# may not use this file except in compliance with the License. You can
|
||||
# obtain a copy of the License at
|
||||
# http://glassfish.java.net/public/CDDL+GPL_1_1.html
|
||||
# or packager/legal/LICENSE.txt. See the License for the specific
|
||||
# language governing permissions and limitations under the License.
|
||||
#
|
||||
# When distributing the software, include this License Header Notice in each
|
||||
# file and include the License file at packager/legal/LICENSE.txt.
|
||||
#
|
||||
# GPL Classpath Exception:
|
||||
# Oracle designates this particular file as subject to the "Classpath"
|
||||
# exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
# file that accompanied this code.
|
||||
#
|
||||
# Modifications:
|
||||
# If applicable, add the following below the License Header, with the fields
|
||||
# enclosed by brackets [] replaced by your own identifying information:
|
||||
# "Portions Copyright [year] [name of copyright owner]"
|
||||
#
|
||||
# Contributor(s):
|
||||
# If you wish your version of this file to be governed by only the CDDL or
|
||||
# only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
# elects to include this software in this distribution under the [CDDL or GPL
|
||||
# Version 2] license." If you don't indicate a single choice of license, a
|
||||
# recipient has the option to distribute your version of this file under
|
||||
# either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
# its licensees as provided above. However, if you add GPL Version 2 code
|
||||
# and therefore, elected the GPL Version 2 license, then the option applies
|
||||
# only if the new code is made subject to such option by the copyright
|
||||
# holder.
|
||||
#
|
||||
|
||||
|
||||
- Features that are not used by JAXB are not well tested or not tested at all.
|
108
platform/runtime/modules/atlasmap/xsom/doc/readme.html
Normal file
108
platform/runtime/modules/atlasmap/xsom/doc/readme.html
Normal file
@ -0,0 +1,108 @@
|
||||
<html>
|
||||
<head>
|
||||
<!--
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright (c) 2010-2013 Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 2 only ("GPL") or the Common Development
|
||||
and Distribution License("CDDL") (collectively, the "License"). You
|
||||
may not use this file except in compliance with the License. You can
|
||||
obtain a copy of the License at
|
||||
http://glassfish.java.net/public/CDDL+GPL_1_1.html
|
||||
or packager/legal/LICENSE.txt. See the License for the specific
|
||||
language governing permissions and limitations under the License.
|
||||
|
||||
When distributing the software, include this License Header Notice in each
|
||||
file and include the License file at packager/legal/LICENSE.txt.
|
||||
|
||||
GPL Classpath Exception:
|
||||
Oracle designates this particular file as subject to the "Classpath"
|
||||
exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
file that accompanied this code.
|
||||
|
||||
Modifications:
|
||||
If applicable, add the following below the License Header, with the fields
|
||||
enclosed by brackets [] replaced by your own identifying information:
|
||||
"Portions Copyright [year] [name of copyright owner]"
|
||||
|
||||
Contributor(s):
|
||||
If you wish your version of this file to be governed by only the CDDL or
|
||||
only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
elects to include this software in this distribution under the [CDDL or GPL
|
||||
Version 2] license." If you don't indicate a single choice of license, a
|
||||
recipient has the option to distribute your version of this file under
|
||||
either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
its licensees as provided above. However, if you add GPL Version 2 code
|
||||
and therefore, elected the GPL Version 2 license, then the option applies
|
||||
only if the new code is made subject to such option by the copyright
|
||||
holder.
|
||||
|
||||
-->
|
||||
|
||||
<title>Xml Schema Object Model</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
|
||||
<style>
|
||||
pre {
|
||||
background-color: rgb(240,240,240);
|
||||
margin-left: 2em;
|
||||
margin-right: 2em;
|
||||
padding: 1em;
|
||||
}
|
||||
p {
|
||||
margin-left: 2em;
|
||||
}
|
||||
dl {
|
||||
margin-left: 2em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 style="text-align:center">XML Schema Object Model</h1>
|
||||
<div align=right style="font-size:smaller">
|
||||
By <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke Kawaguchi</a><br>
|
||||
</div>
|
||||
|
||||
<h2>Overview</h2>
|
||||
<p>
|
||||
XML Schema Object Model (XSOM) is a Java library that allows applications to easily parse XML Schema documents and inspect information in them. It is expected to be useful for applications that need to take XML Schema as an input.
|
||||
</p><p>
|
||||
The library is a straight-forward implement of "schema components" as defined in <a href="http://www.w3.org/TR/xmlschema-1">the XML Schema spec part 1</a>. Refer to this specification of how this object model works. In particular, <a href="http://www.w3.org/TR/xmlschema-1/components.gif">this diagram</a> might be helpful.
|
||||
</p>
|
||||
|
||||
<h2>Documents</h2>
|
||||
<dl>
|
||||
<dt><a href="userguide.html">User's Guide</a>
|
||||
<dd>Learn how to use XSOM
|
||||
|
||||
<dt><a href="implementation.html">Implementor's Guide</a>
|
||||
<dd>Learn the limitations and internals of XSOM
|
||||
|
||||
<dt><a href="javadoc/index.html">API Javadoc</a>
|
||||
<dd>Javadoc of the interfaces
|
||||
</dl>
|
||||
|
||||
|
||||
<h2>Dependencies</h2>
|
||||
<p>
|
||||
XSOM comes in two versions. <code>xsom.jar</code> is built for JDK 5.0, but offers generified version. <code>xsom14.jar</code> is the version that works for earlier versions of JDK.
|
||||
<p>
|
||||
Both flavors of <code>xsom.jar</code> depends on <code>relaxngDatatype.jar</code> and JAXP 1.1. Make sure you have at least <code>xsom.jar</code> and <code>relaxngDatatype.jar</code> when you distribute your application that uses XSOM.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>License</h2>
|
||||
<p>
|
||||
XSOM is covered by <a href="license.txt">CDDL</a>, which basically allows you free use and redistribution with your application (but please do check the license for details.) <code>relaxngDatatype.jar</code> is covered by <a href="lib/copying-relaxngDatatype.txt">a BSD-like license</a>. XSOM internally uses an URI class, which is copyrighted by Thai Open Source Center. Its license is <a href="lib/copying-thaiOpensource.txt">here</a>
|
||||
</p>
|
||||
|
||||
|
||||
<h2>Support</h2>
|
||||
<p>
|
||||
Sun does not officially support this product, but Kohsuke Kawaguchi, the developer of this library, will provide support in a best-effort basis at <a href="http://xsom.dev.java.net/">java.net</a>.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,127 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Retroweaver Overview</title>
|
||||
<style type="text/css">
|
||||
<!--body { margin: 0; padding: 0 } -->
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" topmargin="0" leftmargin="0">
|
||||
|
||||
<div align="center">
|
||||
<center>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
|
||||
<td width="100%" background="images/sliver.jpg"><font face="Arial">
|
||||
<map name="FPMap0">
|
||||
<area href="index.html" coords="300, 75, 357, 94" shape="rect">
|
||||
<area href="news.html" coords="352, 75, 425, 94" shape="rect">
|
||||
<area href="overview.html" coords="425, 75, 520, 94" shape="rect">
|
||||
<area href="documentation.html" coords="520, 75, 630, 93" shape="rect">
|
||||
</map>
|
||||
<img border="0" src="images/seascape.gif" usemap="#FPMap0" width="756" height="133"></font>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<center>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
|
||||
<td width="175" valign="top" background="images/menubg.gif">
|
||||
<font size="2" face="Arial"><img border="0" src="images/headerbitty.gif" width="175" height="64"></font>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<font size="2" face="Arial"><br><b>Overview</b></font>
|
||||
<ul>
|
||||
<font size="2" face="Arial">
|
||||
<li>
|
||||
What is Retroweaver?
|
||||
<p> Retroweaver is a tool that enables you to take advantage of the new Java 1.5 language features in your source code, while still retaining compatability with 1.4 (and older) virtual machines. Retroweaver operates by transforming Java class files compiled by a 1.5 compiler into class files which can be run on an older virtual machine.</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
What platforms does the Retroweaver run on?
|
||||
<p>Any platform Java runs on.</p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
Where can I get Retroweaver?
|
||||
<p>Retroweaver can be downloaded at <a href="http://sf.net/projects/retroweaver">http://sf.net/projects/retroweaver</a></p>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
How much does Retroweaver cost?
|
||||
<p>Retroweaver is a free, open-source product. The license for use is BSD-derived. The small print follows:</p>
|
||||
<pre>
|
||||
Copyright (c) February 2004, Toby Reyelts
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
Neither the name of Toby Reyelts nor the names of his contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
Who can I ask questions of or give comments or feedback to?
|
||||
<p>Tools for the Retroweaver user community are hosted at <a href="http://sf.net/projects/retroweaver">SourceForge</a>. If you go there you can browse through or post to the forums, join the mailing list, or even submit bugs or feature requests. On the other hand, you can just chat with the architect and primary author of Retroweaver, <a href="mailto:toby@reyelts.com">Toby Reyelts</a>, directly.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</font>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p> </p>
|
||||
<p align="right"><A href="http://sourceforge.net"> <IMG src="http://sourceforge.net/sflogo.php?group_id=104240&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo"/></A> </p>
|
||||
<p> </p>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<center>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
|
||||
<td width="100%" bgcolor="#3999E7">
|
||||
<p align="center"><font face="Arial"><font size="2"> </font><font size="1">Site design by <a href="http://www.pegaweb.com"><b><font color="#000000">Pegasus Web Design Resources</font></b></a></font></font></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
194
platform/runtime/modules/atlasmap/xsom/doc/userguide.html
Normal file
194
platform/runtime/modules/atlasmap/xsom/doc/userguide.html
Normal file
@ -0,0 +1,194 @@
|
||||
<html>
|
||||
<head>
|
||||
<!--
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright (c) 2010-2013 Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 2 only ("GPL") or the Common Development
|
||||
and Distribution License("CDDL") (collectively, the "License"). You
|
||||
may not use this file except in compliance with the License. You can
|
||||
obtain a copy of the License at
|
||||
http://glassfish.java.net/public/CDDL+GPL_1_1.html
|
||||
or packager/legal/LICENSE.txt. See the License for the specific
|
||||
language governing permissions and limitations under the License.
|
||||
|
||||
When distributing the software, include this License Header Notice in each
|
||||
file and include the License file at packager/legal/LICENSE.txt.
|
||||
|
||||
GPL Classpath Exception:
|
||||
Oracle designates this particular file as subject to the "Classpath"
|
||||
exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
file that accompanied this code.
|
||||
|
||||
Modifications:
|
||||
If applicable, add the following below the License Header, with the fields
|
||||
enclosed by brackets [] replaced by your own identifying information:
|
||||
"Portions Copyright [year] [name of copyright owner]"
|
||||
|
||||
Contributor(s):
|
||||
If you wish your version of this file to be governed by only the CDDL or
|
||||
only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
elects to include this software in this distribution under the [CDDL or GPL
|
||||
Version 2] license." If you don't indicate a single choice of license, a
|
||||
recipient has the option to distribute your version of this file under
|
||||
either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
its licensees as provided above. However, if you add GPL Version 2 code
|
||||
and therefore, elected the GPL Version 2 license, then the option applies
|
||||
only if the new code is made subject to such option by the copyright
|
||||
holder.
|
||||
|
||||
-->
|
||||
|
||||
<title>XSOM User's Guide</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
|
||||
<style>
|
||||
pre {
|
||||
background-color: rgb(240,240,240);
|
||||
margin-left: 2em;
|
||||
margin-right: 2em;
|
||||
padding: 1em;
|
||||
}
|
||||
p {
|
||||
margin-left: 2em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 style="text-align:center">XSOM User's Guide</h1>
|
||||
<div align=right style="font-size:smaller">
|
||||
By <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke Kawaguchi</a><br>
|
||||
</div>
|
||||
|
||||
<h1>Parsing a schema</h1>
|
||||
|
||||
<p>
|
||||
Use the <code>com.sun.xml.xsom.parser.XSOMParser</code> class to parse schemas. There are a couple of overloaded versions of the <code>parse</code> method.
|
||||
</p><p>
|
||||
<code>XSOMParser</code> works like this; You create a new instance of XSOMParser, set it up, then call the parse method to parse a schema file. When a schema is parsed, all the schemas that are refered from it (<include>and <import>) will also be parsed.
|
||||
|
||||
If you have multiple separate schema files that need to be compiled together, just call the parse method multiple times.
|
||||
</p><p>
|
||||
Once you parse all the schemas you want, call the getResult method to obtain the <code>XSSchemaSet</code> object, then use that object to obtain information about the schema.
|
||||
</p>
|
||||
<pre>
|
||||
import com.sun.xml.xsom.parser.XSOMParser;
|
||||
import com.sun.xml.xsom.XSSchemaSet;
|
||||
|
||||
XSOMParser parser = new XSOMParser();
|
||||
parser.setErrorHandler(...);
|
||||
parser.setEntityResolver(...);
|
||||
|
||||
parser.parseSchema( new File("myschema.xsd"));
|
||||
parser.parseSchema( new File("XHTML.xsd"));
|
||||
|
||||
XSSchemaSet sset = parser.getResult();
|
||||
</pre>
|
||||
<p>
|
||||
Now you can access schema information by using this SchemaSet.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>Parsing from SAX events</h2>
|
||||
<p>
|
||||
For more sophisticated uses, you can feed SAX2 events to XSOM. This will be useful when the schema is not present as a stand-alone XML. For example, this can be used to:
|
||||
</p>
|
||||
<ul>
|
||||
<li>parse XML Schema inside another XML, such as WSDL
|
||||
<li>generate XML on-the-fly and parse it
|
||||
</ul>
|
||||
<p>
|
||||
The following example shows how one can apply a XSLT transformation to produce XML Schema and parse it into XSOM:
|
||||
</p>
|
||||
<pre><xmp>
|
||||
import com.sun.xml.xsom.parser.XSOMParser;
|
||||
import com.sun.xml.xsom.XSSchemaSet;
|
||||
|
||||
XSOMParser parser = new XSOMParser();
|
||||
parser.setErrorHandler(...);
|
||||
parser.setEntityResolver(...);
|
||||
|
||||
// set up XSLT
|
||||
TransformerFactory tf = TransformerFactory.newInstance();
|
||||
Transformer t = tf.newTransformer(new StreamSource(new File("wsdl2xsd.xsl"));
|
||||
|
||||
ContentHandler xsomHandler = parser.getParserHandler();
|
||||
|
||||
// run the transformation and feed the result to XSOM
|
||||
t.transform(
|
||||
new StreamSource(new File("test.wsdl")),
|
||||
new SAXResult(xsomhandler));
|
||||
|
||||
XSSchemaSet sset = parser.getResult();
|
||||
</xmp></pre>
|
||||
|
||||
|
||||
|
||||
<h2>Error Handling</h2>
|
||||
<p>
|
||||
All the error messages will be sent to SAX <code>ErrorHandler</code>, which can be specified through the setErrorHandler method on XSOMParser.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<h2>Entity Resolution</h2>
|
||||
<p>
|
||||
By setting <code>EntityResolver</code> to XSOMParser, you can redirect <xs:include>s and <xs:import>s to different resources. For imports, the namespace URI of the target schema is passed as the public ID, and the absolutized value of the <code>schemaLocation</code> attribute will be passed as the system ID.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>Parsing Annotations</h2>
|
||||
<p>
|
||||
There is a hook in XSOM that allows client applications to parse annotations in schema into an application specific data structure by using <code>AnnotationParser</code>. With this mechanism, the application-specified code can receive SAX events for every annotations found in the document.
|
||||
</p><p>
|
||||
<code>AnnotationParser</code> will be responsible for parsing these SAX events into an object, and that object will be attached to the appropriate "owner" schema component by XSOM automatically. The information can be later retrieved through the <code>getAnnotation</code> method.
|
||||
</p><p>
|
||||
By default, all the annotations are ignored, but you can easily parse them into a DOM tree or an application-specific data structure.
|
||||
</p><p>
|
||||
For details, see <code>com.sun.xml.xsom.impl.parser.AnnotationParser</code> and <code>AnnotationParserFactory</code>. An annotation parser can be attached to XSOMParser through the setAnnotationParser method. There's also a convenient utility class called <tt>DomAnnotationParserFactory</tt> that parses annotations into DOM.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<h1>Accessing Schema Information</h1>
|
||||
<p>
|
||||
The <code>com.sun.xml.xsom</code> package contains all the public interfaces available for client applications. It shouldn't be too hard to understand if you know well about schema components, which are defined in the XML Schema spec.
|
||||
</p><p>
|
||||
The interface is modeled after <a href="XML Schema CM API.htm">this document</a> so this might help you understand XSOM.
|
||||
</p>
|
||||
<p>
|
||||
For example, the following code lists all the global element declarations and whether they are abstract or not.
|
||||
</p>
|
||||
<pre><xmp>
|
||||
XSSchemaSet result = /* parse XML Schema */;
|
||||
|
||||
// iterate each XSSchema object. XSSchema is a per-namespace schema.
|
||||
Iterator itr = result.iterateSchema();
|
||||
while( itr.hasNext() ) {
|
||||
XSSchema s = (XSSchema)itr.next();
|
||||
|
||||
System.out.println("Target namespace: "+s.getTargetNamespace());
|
||||
|
||||
Iterator jtr = s.iterateElementDecls();
|
||||
while( jtr.hasNext() ) {
|
||||
XSElementDecl e = (XSElementDecl)jtr.next();
|
||||
|
||||
System.out.print( e.getName() );
|
||||
if( e.isAbstract() )
|
||||
System.out.print(" (abstract)");
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
</xmp></pre>
|
||||
|
||||
<h2>Visitor pattern support</h2>
|
||||
<p>
|
||||
XSOM comes with a visitor pattern support, which simplifies the development of the client application. XSOM implements two different visitors. One is a visitor that returns void, and the other is a "functor" that returns <code>Object</code>. All the interfaces are available in <code>com.sun.xml.xsom.visitor</code>.
|
||||
</p><p>
|
||||
For more about the visitor pattern, see <a href="http://ootips.org/visitor-pattern.html">this summary</a> or read <a href="http://www.amazon.com/exec/obidos/ASIN/0201633612/ootips">this book.</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
import com.sun.xml.xsom.XSSchemaSet;
|
||||
import com.sun.xml.xsom.impl.util.SchemaWriter;
|
||||
import com.sun.xml.xsom.parser.SchemaDocument;
|
||||
import com.sun.xml.xsom.parser.XSOMParser;
|
||||
import com.sun.xml.xsom.util.DomAnnotationParserFactory;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Parses all the schemas specified as the command line arguments,
|
||||
* then dumps it (to see if the parsing was done correctly.)
|
||||
*/
|
||||
public class Dumper {
|
||||
public static void main(String[] args) throws Exception {
|
||||
XSOMParser reader = new XSOMParser();
|
||||
// set an error handler so that you can receive error messages
|
||||
reader.setErrorHandler(new ErrorReporter(System.out));
|
||||
// DomAnnotationParserFactory is a convenient default to use
|
||||
reader.setAnnotationParser(new DomAnnotationParserFactory());
|
||||
|
||||
try {
|
||||
// the parse method can by called many times
|
||||
for( int i=0; i<args.length; i++ )
|
||||
reader.parse(new File(args[i]));
|
||||
|
||||
XSSchemaSet xss = reader.getResult();
|
||||
if(xss==null)
|
||||
System.out.println("error");
|
||||
else
|
||||
new SchemaWriter(new OutputStreamWriter(System.out)).visit(xss);
|
||||
|
||||
dump(reader.getDocuments());
|
||||
} catch( SAXException e ) {
|
||||
if(e.getException()!=null)
|
||||
e.getException().printStackTrace();
|
||||
else
|
||||
e.printStackTrace();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
private static void dump(Set<SchemaDocument> documents) {
|
||||
for (SchemaDocument doc : documents) {
|
||||
System.out.println("Schema document: "+doc.getSystemId());
|
||||
System.out.println(" target namespace: "+doc.getTargetNamespace());
|
||||
for (SchemaDocument ref : doc.getReferencedDocuments()) {
|
||||
System.out.print(" -> "+ref.getSystemId());
|
||||
if(doc.includes(ref))
|
||||
System.out.print(" (include)");
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintStream;
|
||||
import java.text.MessageFormat;
|
||||
|
||||
import org.xml.sax.ErrorHandler;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.SAXParseException;
|
||||
|
||||
/**
|
||||
* ErrorHandler that reports error to the specified output stream.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke,kawaguchi@sun.com)
|
||||
*/
|
||||
public class ErrorReporter implements ErrorHandler {
|
||||
|
||||
private final PrintStream out;
|
||||
|
||||
public ErrorReporter( PrintStream o ) { this.out = o; }
|
||||
public ErrorReporter( OutputStream o ) { this(new PrintStream(o)); }
|
||||
|
||||
public void warning(SAXParseException e) throws SAXException {
|
||||
print("[Warning]",e);
|
||||
}
|
||||
|
||||
public void error(SAXParseException e) throws SAXException {
|
||||
print("[Error ]",e);
|
||||
}
|
||||
|
||||
public void fatalError(SAXParseException e) throws SAXException {
|
||||
print("[Fatal ]",e);
|
||||
}
|
||||
|
||||
private void print( String header, SAXParseException e ) {
|
||||
out.println(header+' '+e.getMessage());
|
||||
out.println(MessageFormat.format(" line {0} at {1}",
|
||||
new Object[]{
|
||||
Integer.toString(e.getLineNumber()),
|
||||
e.getSystemId()}));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
import com.sun.xml.xsom.XSSchemaSet;
|
||||
import com.sun.xml.xsom.impl.util.SchemaTreeTraverser;
|
||||
import com.sun.xml.xsom.impl.util.SchemaWriter;
|
||||
import com.sun.xml.xsom.parser.XSOMParser;
|
||||
import com.sun.xml.xsom.util.DomAnnotationParserFactory;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.tree.TreeModel;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ComponentAdapter;
|
||||
import java.awt.event.ComponentEvent;
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* Parses all the schemas specified as the command line arguments, then shows
|
||||
* it as JTree (to see if the parsing was done correctly.)
|
||||
*
|
||||
* @author Kirill Grouchnikov (kirillcool@yahoo.com)
|
||||
*/
|
||||
public class TreeDumper extends JFrame {
|
||||
public TreeDumper(String mainSchemName, JTree tree) {
|
||||
super("Tree for schema '" + mainSchemName + "'");
|
||||
this.getRootPane().setLayout(new BorderLayout());
|
||||
JScrollPane scrollPane = new JScrollPane(tree);
|
||||
this.getRootPane().add(scrollPane, BorderLayout.CENTER);
|
||||
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
if (args.length != 1) {
|
||||
System.out.println(
|
||||
"Please provide a single (root) schema location");
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
XSOMParser reader = new XSOMParser();
|
||||
// set an error handler so that you can receive error messages
|
||||
reader.setErrorHandler(new ErrorReporter(System.out));
|
||||
// DomAnnotationParserFactory is a convenient default to use
|
||||
reader.setAnnotationParser(new DomAnnotationParserFactory());
|
||||
|
||||
try {
|
||||
reader.parse(new File(args[0]));
|
||||
|
||||
XSSchemaSet xss = reader.getResult();
|
||||
if (xss == null) {
|
||||
System.out.println("error");
|
||||
}
|
||||
else {
|
||||
SchemaTreeTraverser stt = new SchemaTreeTraverser();
|
||||
stt.visit(xss);
|
||||
TreeModel model = stt.getModel();
|
||||
JTree tree = new JTree(model);
|
||||
tree.setCellRenderer(new SchemaTreeTraverser.SchemaTreeCellRenderer());
|
||||
TreeDumper dumper = new TreeDumper(args[0], tree);
|
||||
Dimension screenDim = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
// dumper.setPreferredSize(screenDim);
|
||||
dumper.setSize(screenDim);
|
||||
dumper.setVisible(true);
|
||||
}
|
||||
}
|
||||
catch (SAXException e) {
|
||||
if (e.getException() != null) {
|
||||
e.getException().printStackTrace();
|
||||
}
|
||||
else {
|
||||
e.printStackTrace();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
====
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
====
|
||||
|
||||
#
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
#
|
||||
# Copyright (c) 2010-2013 Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# The contents of this file are subject to the terms of either the GNU
|
||||
# General Public License Version 2 only ("GPL") or the Common Development
|
||||
# and Distribution License("CDDL") (collectively, the "License"). You
|
||||
# may not use this file except in compliance with the License. You can
|
||||
# obtain a copy of the License at
|
||||
# http://glassfish.java.net/public/CDDL+GPL_1_1.html
|
||||
# or packager/legal/LICENSE.txt. See the License for the specific
|
||||
# language governing permissions and limitations under the License.
|
||||
#
|
||||
# When distributing the software, include this License Header Notice in each
|
||||
# file and include the License file at packager/legal/LICENSE.txt.
|
||||
#
|
||||
# GPL Classpath Exception:
|
||||
# Oracle designates this particular file as subject to the "Classpath"
|
||||
# exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
# file that accompanied this code.
|
||||
#
|
||||
# Modifications:
|
||||
# If applicable, add the following below the License Header, with the fields
|
||||
# enclosed by brackets [] replaced by your own identifying information:
|
||||
# "Portions Copyright [year] [name of copyright owner]"
|
||||
#
|
||||
# Contributor(s):
|
||||
# If you wish your version of this file to be governed by only the CDDL or
|
||||
# only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
# elects to include this software in this distribution under the [CDDL or GPL
|
||||
# Version 2] license." If you don't indicate a single choice of license, a
|
||||
# recipient has the option to distribute your version of this file under
|
||||
# either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
# its licensees as provided above. However, if you add GPL Version 2 code
|
||||
# and therefore, elected the GPL Version 2 license, then the option applies
|
||||
# only if the new code is made subject to such option by the copyright
|
||||
# holder.
|
||||
#
|
||||
|
||||
This example basically dumpts the contents of parsed schemas.
|
||||
The SchemaWriter class is already in xsom.jar, so you don't need
|
||||
to compile that file. Its source code is here just for your reference.
|
||||
|
||||
To run the example:
|
||||
|
||||
$ javac *.java
|
||||
$ java Dumper <some schema>
|
@ -0,0 +1,46 @@
|
||||
====
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
====
|
||||
|
||||
Copyright (c) 2001, Thai Open Source Software Center Ltd, Sun Microsystems.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
Neither the names of the copyright holders nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@ -0,0 +1,47 @@
|
||||
====
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
====
|
||||
|
||||
Copyright (c) 2001, 2002 Thai Open Source Software Center Ltd
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
Neither the name of the Thai Open Source Software Center Ltd nor
|
||||
the names of its contributors may be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
55
platform/runtime/modules/atlasmap/xsom/licenceheader.txt
Normal file
55
platform/runtime/modules/atlasmap/xsom/licenceheader.txt
Normal file
@ -0,0 +1,55 @@
|
||||
====
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
====
|
||||
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* http://glassfish.java.net/public/CDDL+GPL_1_1.html
|
||||
* or packager/legal/LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at packager/legal/LICENSE.txt.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
*/
|
290
platform/runtime/modules/atlasmap/xsom/license.txt
Normal file
290
platform/runtime/modules/atlasmap/xsom/license.txt
Normal file
@ -0,0 +1,290 @@
|
||||
====
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
====
|
||||
|
||||
COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)Version 1.1
|
||||
|
||||
1. Definitions.
|
||||
|
||||
1.1. "Contributor" means each individual or entity that creates or contributes to the creation of Modifications.
|
||||
|
||||
1.2. "Contributor Version" means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor.
|
||||
|
||||
1.3. "Covered Software" means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof.
|
||||
|
||||
1.4. "Executable" means the Covered Software in any form other than Source Code.
|
||||
|
||||
1.5. "Initial Developer" means the individual or entity that first makes Original Software available under this License.
|
||||
|
||||
1.6. "Larger Work" means a work which combines Covered Software or portions thereof with code not governed by the terms of this License.
|
||||
|
||||
1.7. "License" means this document.
|
||||
|
||||
1.8. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
|
||||
|
||||
1.9. "Modifications" means the Source Code and Executable form of any of the following:
|
||||
|
||||
A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications;
|
||||
|
||||
B. Any new file that contains any part of the Original Software or previous Modification; or
|
||||
|
||||
C. Any new file that is contributed or otherwise made available under the terms of this License.
|
||||
|
||||
1.10. "Original Software" means the Source Code and Executable form of computer software code that is originally released under this License.
|
||||
|
||||
1.11. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.
|
||||
|
||||
1.12. "Source Code" means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code.
|
||||
|
||||
1.13. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
|
||||
|
||||
2. License Grants.
|
||||
|
||||
2.1. The Initial Developer Grant.
|
||||
|
||||
Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof).
|
||||
|
||||
(c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License.
|
||||
|
||||
(d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices.
|
||||
|
||||
2.2. Contributor Grant.
|
||||
|
||||
Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).
|
||||
|
||||
(c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party.
|
||||
|
||||
(d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor.
|
||||
|
||||
3. Distribution Obligations.
|
||||
|
||||
3.1. Availability of Source Code.
|
||||
|
||||
Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange.
|
||||
|
||||
3.2. Modifications.
|
||||
|
||||
The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License.
|
||||
|
||||
3.3. Required Notices.
|
||||
|
||||
You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer.
|
||||
|
||||
3.4. Application of Additional Terms.
|
||||
|
||||
You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients' rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
|
||||
|
||||
3.5. Distribution of Executable Versions.
|
||||
|
||||
You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipient's rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.
|
||||
|
||||
3.6. Larger Works.
|
||||
|
||||
You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software.
|
||||
|
||||
4. Versions of the License.
|
||||
|
||||
4.1. New Versions.
|
||||
|
||||
Oracle is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License.
|
||||
|
||||
4.2. Effect of New Versions.
|
||||
|
||||
You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward.
|
||||
|
||||
4.3. Modified Versions.
|
||||
|
||||
When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License.
|
||||
|
||||
5. DISCLAIMER OF WARRANTY.
|
||||
|
||||
COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
|
||||
|
||||
6. TERMINATION.
|
||||
|
||||
6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
|
||||
|
||||
6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as "Participant") alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant.
|
||||
|
||||
6.3. If You assert a patent infringement claim against Participant alleging that the Participant Software directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license.
|
||||
|
||||
6.4. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination.
|
||||
|
||||
7. LIMITATION OF LIABILITY.
|
||||
|
||||
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
8. U.S. GOVERNMENT END USERS.
|
||||
|
||||
The Covered Software is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" (as that term is defined at 48 C.F.R. ? 252.227-7014(a)(1)) and "commercial computer software documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License.
|
||||
|
||||
9. MISCELLANEOUS.
|
||||
|
||||
This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdiction's conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software.
|
||||
|
||||
10. RESPONSIBILITY FOR CLAIMS.
|
||||
|
||||
As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
|
||||
|
||||
----------
|
||||
NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)
|
||||
The code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California.
|
||||
|
||||
|
||||
|
||||
|
||||
The GNU General Public License (GPL) Version 2, June 1991
|
||||
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification follow.
|
||||
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
One line to give the program's name and a brief idea of what it does.
|
||||
|
||||
Copyright (C)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed 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. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
signature of Ty Coon, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.
|
||||
|
||||
|
||||
"CLASSPATH" EXCEPTION TO THE GPL VERSION 2
|
||||
|
||||
Certain source files distributed by Oracle are subject to the following clarification and special exception to the GPL Version 2, but only where Oracle has expressly included in the particular source file's header the words "Oracle designates this particular file as subject to the "Classpath" exception as provided by Oracle in the License file that accompanied this code."
|
||||
|
||||
Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License Version 2 cover the whole combination.
|
||||
|
||||
As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.
|
265
platform/runtime/modules/atlasmap/xsom/pom.xml
Normal file
265
platform/runtime/modules/atlasmap/xsom/pom.xml
Normal file
@ -0,0 +1,265 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<parent>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.modules</groupId>
|
||||
<artifactId>atlasmap</artifactId>
|
||||
<version>1.10.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>ru.entaxy.com.sun.xsom</groupId>
|
||||
<artifactId>xsom</artifactId>
|
||||
<packaging>bundle</packaging>
|
||||
|
||||
<name>ENTAXY :: ATLASMAP :: XSOM</name>
|
||||
<description>XML Schema Object Model (XSOM) is a Java library that allows applications to easily parse XML Schema
|
||||
documents and inspect information in them. It is expected to be useful for applications that need to take XML
|
||||
Schema as an input.
|
||||
</description>
|
||||
<url>http://xsom.java.net/</url>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>CDDL v1.1 / GPL v2 dual license</name>
|
||||
<url>http://glassfish.java.net/public/CDDL+GPL_1_1.html</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
<issueManagement>
|
||||
<system>JIRA</system>
|
||||
<url>http://java.net/jira/browse/XSOM</url>
|
||||
</issueManagement>
|
||||
<scm>
|
||||
<url>http://java.net/projects/xsom/sources/sources/show/trunk</url>
|
||||
<connection>scm:svn:https://svn.java.net/svn/xsom~sources/trunk</connection>
|
||||
<developerConnection>scm:svn:https://svn.java.net/svn/xsom~sources/trunk</developerConnection>
|
||||
<tag>atlasmap-2.5.2</tag>
|
||||
</scm>
|
||||
<organization>
|
||||
<name>Oracle</name>
|
||||
<url>http://www.oracle.com/</url>
|
||||
</organization>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>snajper</id>
|
||||
<name>Martin Grebac</name>
|
||||
<email>martin.grebac@oracle.com</email>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>lexi</id>
|
||||
<name>Aleksei Valikov</name>
|
||||
<email>valikov@gmx.net</email>
|
||||
</developer>
|
||||
</developers>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>relaxngDatatype</groupId>
|
||||
<artifactId>relaxngDatatype</artifactId>
|
||||
<version>20020414</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.13.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<testSourceDirectory>test</testSourceDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src</directory>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
</resources>
|
||||
<testResources>
|
||||
<testResource>
|
||||
<directory>test</directory>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
</excludes>
|
||||
</testResource>
|
||||
</testResources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<version>2.7</version>
|
||||
<configuration>
|
||||
<formats>
|
||||
<format>xml</format>
|
||||
</formats>
|
||||
<check>
|
||||
<totalLineRate>45</totalLineRate>
|
||||
<packageLineRate>45</packageLineRate>
|
||||
<haltOnFailure>true</haltOnFailure>
|
||||
</check>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>add-source</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>add-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>build/src</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.14</version>
|
||||
<configuration>
|
||||
<argLine>${proxyArgLine}</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>findbugs-maven-plugin</artifactId>
|
||||
<version>3.0.5</version>
|
||||
<configuration>
|
||||
<skip>${findbugs.skip}</skip>
|
||||
<threshold>${findbugs.threshold}</threshold>
|
||||
<findbugsXmlWithMessages>true</findbugsXmlWithMessages>
|
||||
<excludeFilterFile>
|
||||
${findbugs.exclude}
|
||||
</excludeFilterFile>
|
||||
<fork>true</fork>
|
||||
<jvmArgs>-Xms64m -Xmx256m</jvmArgs>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.findbugs</groupId>
|
||||
<artifactId>findbugs</artifactId>
|
||||
<version>1.7</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.glassfish.copyright</groupId>
|
||||
<artifactId>glassfish-copyright-maven-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
<configuration>
|
||||
<templateFile>copyright.txt</templateFile>
|
||||
<excludeFile>copyright-exclude</excludeFile>
|
||||
<!-- skip files not under SCM-->
|
||||
<scmOnly>true</scmOnly>
|
||||
<!-- turn off warnings -->
|
||||
<warn>true</warn>
|
||||
<!-- for use with repair -->
|
||||
<update>false</update>
|
||||
<!-- check that year is correct -->
|
||||
<ignoreYear>false</ignoreYear>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<configuration>
|
||||
<additionalJOptions>
|
||||
<additionalJOption>-Xdoclint:none</additionalJOption>
|
||||
</additionalJOptions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<inherited>true</inherited>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.5</source>
|
||||
<target>1.5</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>regenerate-sources</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>generate-sources</phase>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<taskdef name="licence" classname="com.sun.tools.LicenceTask">
|
||||
<classpath>
|
||||
<pathelement path="lib/lic.jar"/>
|
||||
</classpath>
|
||||
</taskdef>
|
||||
|
||||
<!--<mkdir dir="build/automata" />-->
|
||||
|
||||
<!-- delete old files to avoid corruption -->
|
||||
<delete dir="src/com/sun/xml/xsom/impl/parser/state"/>
|
||||
<mkdir dir="src/com/sun/xml/xsom/impl/parser/state"/>
|
||||
|
||||
<property name="relaxngcc-jar" value="lib/relaxngcc.jar"/>
|
||||
<java jar="${relaxngcc-jar}" fork="true">
|
||||
<arg value="--target"/>
|
||||
<arg path="src/com/sun/xml/xsom/impl/parser/state"/>
|
||||
<arg path="src/xmlschema.rng"/>
|
||||
</java>
|
||||
<licence licence="licenceheader.txt">
|
||||
<fileset dir="src/" includes="com/sun/xml/xsom/impl/parser/state/*.java"/>
|
||||
</licence>
|
||||
</tasks>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
<properties>
|
||||
<findbugs.skip>false</findbugs.skip>
|
||||
<findbugs.threshold>Low</findbugs.threshold>
|
||||
<findbugs.exclude/>
|
||||
<bundle.osgi.export.pkg>
|
||||
com.sun.xml.xsom.*
|
||||
</bundle.osgi.export.pkg>
|
||||
<bundle.osgi.import.pkg>
|
||||
!org.slf4j.impl,*
|
||||
</bundle.osgi.import.pkg>
|
||||
<bundle.osgi.private.pkg>com.sun.xml.xsom,com.sun.xml.xsom.*</bundle.osgi.private.pkg>
|
||||
</properties>
|
||||
|
||||
</project>
|
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/core" xmlns="http://www.uc-council.org/smp/schemas/core" xmlns:core="http://www.uc-council.org/smp/schemas/core" elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType name="AllowanceChargeType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="priceBracketList" type="PriceBracketListType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="monetaryAmountOrPercentage" type="MonetaryAmountOrPercentageType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
<xsd:element name="baseAmount" type="MonetaryAmountOrPercentageType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="description" type="TextDescriptionType" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="type" type="AllowanceChargeListType" use="required"/>
|
||||
<xsd:attribute name="sequenceNumber" type="Integer1to2Type" use="optional"/>
|
||||
<xsd:attribute name="allowanceOrChargeType" type="AllowanceOrChargeListType" use="required"/>
|
||||
<xsd:attribute name="settlementType" type="SettlementListType" use="required"/>
|
||||
<xsd:attribute name="effectiveDateType" type="EffectiveDateListType" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="MonetaryAmountOrPercentageType">
|
||||
<xsd:choice>
|
||||
<xsd:element name="amountPerUnit" type="AmountType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="percentagePerUnit" type="PercentageType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="measurementPerUnit" type="MeasurementValueType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:group ref="RatePerUnitGroupType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
<xsd:group name="RatePerUnitGroupType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="allowanceOrChargeRatePerUnit" type="Integer1to35Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="amountPerUnit" type="AmountType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="percentagePerUnit" type="PercentageType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="measurementPerUnit" type="MeasurementValueType" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:group>
|
||||
<xsd:complexType name="PriceBracketListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="bracketIdentifier" type="BracketIdentifierType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="BracketIdentifierType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="entityID" type="String1to80Type" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="AllowanceChargeListType">
|
||||
<xsd:restriction base="String1to80Type">
|
||||
<xsd:enumeration value="ALLOWANCE_GLOBAL"/>
|
||||
<xsd:enumeration value="CHARGE_GLOBAL"/>
|
||||
<xsd:enumeration value="CONSOLIDATED"/>
|
||||
<xsd:enumeration value="FLAT_RATE"/>
|
||||
<xsd:enumeration value="FREIGHT_COSTS"/>
|
||||
<xsd:enumeration value="FREE_GOODS"/>
|
||||
<xsd:enumeration value="INSURANCE_CHARGE"/>
|
||||
<xsd:enumeration value="LUMP_SUM"/>
|
||||
<xsd:enumeration value="MARKUP_FOR_SMALL_VOLUME_PURCHASES"/>
|
||||
<xsd:enumeration value="PACKING_CHARGES"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="AllowanceOrChargeListType">
|
||||
<xsd:restriction base="String1to80Type">
|
||||
<xsd:enumeration value="ALLOWANCE"/>
|
||||
<xsd:enumeration value="CHARGE"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="SettlementListType">
|
||||
<xsd:restriction base="String1to80Type">
|
||||
<xsd:enumeration value="BILL_BACK"/>
|
||||
<xsd:enumeration value="CHARGE_TO_BE_PAID_BY_CUSTOMER"/>
|
||||
<xsd:enumeration value="CHARGE_TO_BE_PAID_BY_VENDOR"/>
|
||||
<xsd:enumeration value="CREDIT_CUSTOMER_ACCOUNT"/>
|
||||
<xsd:enumeration value="ITEM_ACCRUALS"/>
|
||||
<xsd:enumeration value="OFF_INVOICE"/>
|
||||
<xsd:enumeration value="VENDOR_ACCRUALS"/>
|
||||
<xsd:enumeration value="VENDOR_CHECK"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="EffectiveDateListType">
|
||||
<xsd:restriction base="String1to80Type">
|
||||
<xsd:enumeration value="EFFECTIVE_DATE"/>
|
||||
<xsd:enumeration value="EXPIRATION_DATE"/>
|
||||
<xsd:enumeration value="FIRST_ARRIVAL_DATE"/>
|
||||
<xsd:enumeration value="FIRST_ORDER_DATE"/>
|
||||
<xsd:enumeration value="FIRST_SHIP_DATE"/>
|
||||
<xsd:enumeration value="LAST_ARRIVAL_DATE"/>
|
||||
<xsd:enumeration value="LAST_ORDER_DATE"/>
|
||||
<xsd:enumeration value="LAST_SHIP_DATE"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/msg" xmlns="http://www.uc-council.org/smp/schemas/msg" xmlns:fmcg="http://www.uc-council.org/smp/schemas/fmcg" xmlns:simpl-eb="http://www.uc-council.org/smp/schemas/simpl-eb" xmlns:core="http://www.uc-council.org/smp/schemas/core" elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
<xsd:include schemaLocation="DocumentCommand.xsd"/>
|
||||
<xsd:include schemaLocation="DocumentIdentificationCommand.xsd"/>
|
||||
<xsd:include schemaLocation="LinkCommand.xsd"/>
|
||||
<xsd:complexType name="CommandHeaderType" abstract="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="entityIdentification" type="core:EntityIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:group name="CommandTypeGroupType">
|
||||
<xsd:sequence>
|
||||
<xsd:choice>
|
||||
<xsd:element name="documentCommand" type="DocumentCommandType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="documentIdentificationCommand" type="DocumentIdentificationCommandType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="linkCommand" type="LinkCommandType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
</xsd:group>
|
||||
</xsd:schema>
|
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/core" xmlns="http://www.uc-council.org/smp/schemas/core" elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:include schemaLocation="Types.xsd"/>
|
||||
<xsd:include schemaLocation="Components.xsd"/>
|
||||
<xsd:include schemaLocation="Identifiers.xsd"/>
|
||||
</xsd:schema>
|
@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" attributeFormDefault="unqualified" targetNamespace="http://www.uc-council.org/smp/schemas/core" xmlns="http://www.uc-council.org/smp/schemas/core">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType name="MonetaryAmountType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="amount" type="AmountType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="AmountType">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="Float1to18Type">
|
||||
<xsd:attribute name="currencyISOcode" type="CurrencyISOCodeType" use="required"/>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ReferenceType">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="DateChoiceGroupType"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="number" type="String1to35Type" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="QuantityType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="quantity" type="Integer1to15Type" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="DateChoiceType">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="DateChoiceGroupType"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:group name="DateChoiceGroupType">
|
||||
<xsd:choice>
|
||||
<xsd:element name="date" type="xsd:date" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="dateTime" type="xsd:dateTime" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:choice>
|
||||
</xsd:group>
|
||||
<xsd:group name="DateAndTimeGroupType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="dateTime" type="xsd:dateTime" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:group>
|
||||
<xsd:simpleType name="PercentageType">
|
||||
<xsd:restriction base="SimpleFloat1to10Type"/>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="MeasurementType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="measurementValue" type="MeasurementValueType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="MeasurementValueType">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="Float1to15Type">
|
||||
<xsd:attribute name="unitOfMeasure" type="String0to3Type" use="required"/>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="DescriptionType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="text" type="String1to70Type" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="language" type="xsd:language" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TextDescriptionType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="description" type="DescriptionType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="DaysOfTheWeekListType">
|
||||
<xsd:restriction base="String1to80Type">
|
||||
<xsd:enumeration value="FRIDAY"/>
|
||||
<xsd:enumeration value="MONDAY"/>
|
||||
<xsd:enumeration value="SUNDAY"/>
|
||||
<xsd:enumeration value="SATURDAY"/>
|
||||
<xsd:enumeration value="THURSDAY"/>
|
||||
<xsd:enumeration value="TUESDAY"/>
|
||||
<xsd:enumeration value="WEDNESDAY"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="CurrencyISOCodeType">
|
||||
<xsd:restriction base="String3Type"/>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="CountryISOCodeType">
|
||||
<xsd:restriction base="String1to2Type"/>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="DateType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="date" type="xsd:date" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="DateAndTimeType">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="DateAndTimeGroupType"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:attributeGroup name="CreationAttributeGroupType">
|
||||
<xsd:attribute name="creationDate" type="xsd:dateTime" use="required"/>
|
||||
</xsd:attributeGroup>
|
||||
<xsd:simpleType name="TimeZoneType">
|
||||
<xsd:restriction base="String1to3Type"/>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="VersionType">
|
||||
<xsd:restriction base="String1to35Type"/>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/core" xmlns="http://www.uc-council.org/smp/schemas/core" elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:include schemaLocation="Common.xsd"/>
|
||||
<xsd:include schemaLocation="AllowanceOrCharge.xsd"/>
|
||||
<xsd:include schemaLocation="PaymentTerms.xsd"/>
|
||||
<xsd:include schemaLocation="Order.xsd"/>
|
||||
<xsd:include schemaLocation="SimpleInvoice.xsd"/>
|
||||
<xsd:include schemaLocation="DespatchAdvice.xsd"/>
|
||||
<xsd:include schemaLocation="Item.xsd"/>
|
||||
<xsd:include schemaLocation="Party.xsd"/>
|
||||
<xsd:include schemaLocation="RequestForPayment.xsd"/>
|
||||
|
||||
<xsd:complexType name="DocumentType" abstract="true">
|
||||
<xsd:attribute name="contentVersion" type="VersionType" fixed="1.0" use="optional"/>
|
||||
<xsd:attribute name="documentStructureVersion" type="VersionType" fixed="1.0" use="optional"/>
|
||||
<xsd:attribute name="lastUpdateDate" type="xsd:date" use="optional"/>
|
||||
<xsd:attributeGroup ref="CreationAttributeGroupType"/>
|
||||
<xsd:attribute name="documentStatus" type="DocumentStatusListType" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="LineItemType">
|
||||
<xsd:attribute name="number" type="Integer1to6Type" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:group name="TermsGroupType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="paymentTerms" type="PaymentTermsType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="allowanceCharge" type="AllowanceChargeType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:group>
|
||||
<xsd:simpleType name="DocumentStatusListType">
|
||||
<xsd:restriction base="String1to80Type">
|
||||
<xsd:enumeration value="COPY"/>
|
||||
<xsd:enumeration value="ORIGINAL"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema targetNamespace="http://www.uc-council.org/smp/schemas/core" xmlns="http://www.uc-council.org/smp/schemas/core" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType name="DespatchAdviceType" abstract="true">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="DocumentType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="estimatedDeliveryDate" type="DateChoiceType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="typedEntityIdentification" type="TypedEntityIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="buyer" type="PartyIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="seller" type="PartyIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="shipTo" type="PartyIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="carrier" type="PartyIdentificationType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="deliveryNote" type="ReferenceType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="orderNumber" type="ReferenceType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="consignmentNumber" type="ReferenceType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="actualShipDate" type="DateChoiceType" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="DespatchLineItemType" abstract="true">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="LineItemType"/>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="LogisticUnitsType" abstract="true">
|
||||
<xsd:attribute name="id" type="SSCCType" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TradeItemUnitType" abstract="true"/>
|
||||
<xsd:complexType name="ItemContainmentType" abstract="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="contained" type="QuantityType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="SSCCType">
|
||||
<xsd:restriction base="Integer18Type"/>
|
||||
</xsd:simpleType>
|
||||
<xsd:group name="DespatchItemIdentificationGroupType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="listForEachItem" type="SpecificItemDataType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="extendedAttributes" type="TransactionalItemDataType" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:group>
|
||||
<xsd:complexType name="SpecificItemDataType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="serial" type="String1to20Type" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TransactionalItemDataType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="itemExpirationDate" type="DateType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="lotNumber" type="String1to20Type" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="sellByDate" type="DateType" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
@ -0,0 +1,41 @@
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/msg" xmlns:fmcg="http://www.uc-council.org/smp/schemas/fmcg" xmlns:simpl-eb="http://www.uc-council.org/smp/schemas/simpl-eb" xmlns="http://www.uc-council.org/smp/schemas/msg" elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
<09> Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:import namespace="http://www.uc-council.org/smp/schemas/fmcg" schemaLocation="Fmcg.xsd"/>
|
||||
<xsd:import namespace="http://www.uc-council.org/smp/schemas/simpl-eb" schemaLocation="Simpl-eb.xsd"/>
|
||||
</xsd:schema>
|
@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/msg" xmlns="http://www.uc-council.org/smp/schemas/msg" xmlns:fmcg="http://www.uc-council.org/smp/schemas/fmcg" xmlns:simpl-eb="http://www.uc-council.org/smp/schemas/simpl-eb" xmlns:core="http://www.uc-council.org/smp/schemas/core" elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:group name="DocumentCommandContentTypeGroupType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="fmcg:item" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="simpl-eb:party" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="fmcg:order" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="fmcg:despatchAdvice" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="fmcg:simpleInvoice" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:group>
|
||||
<xsd:complexType name="DocumentCommandType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="documentCommandHeader" type="DocumentCommandHeaderType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="documentCommandOperand" type="DocumentCommandOperandType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="DocumentCommandHeaderType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="CommandHeaderType">
|
||||
<xsd:attribute name="type" type="DocumentCommandListType" use="required"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="DocumentCommandOperandType">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="DocumentCommandContentTypeGroupType"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="DocumentCommandListType">
|
||||
<xsd:restriction base="core:String1to80Type">
|
||||
<xsd:enumeration value="ADD"/>
|
||||
<xsd:enumeration value="CHANGE_BY_REFRESH"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/msg" xmlns="http://www.uc-council.org/smp/schemas/msg" xmlns:core="http://www.uc-council.org/smp/schemas/core" elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType name="DocumentIdentificationCommandType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="documentIdentifierList" type="DocumentIdentifierListType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="type" type="DocumentIdentificationCommandListType" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="DocumentIdentificationCommandListType">
|
||||
<xsd:restriction base="core:String1to80Type">
|
||||
<xsd:enumeration value="DELETE"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
@ -0,0 +1,867 @@
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<as2:envelope xmlns:as2="http://www.uc-council.org/smp/schemas/as2" xmlns:fmcg="http://www.uc-council.org/smp/schemas/fmcg" xmlns:simpl-eb="http://www.uc-council.org/smp/schemas/simpl-eb" xmlns:msg="http://www.uc-council.org/smp/schemas/msg" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.uc-council.org/smp/schemas/as2 Envelope.xsd" communicationVersion="1.0">
|
||||
<!-- The data in this sample instance document is not real data and is only there for illustration and/or data typing validation. -->
|
||||
<messageHeader creationDate="2001-12-12">
|
||||
<userId>stringdata</userId>
|
||||
<password>stringdata</password>
|
||||
<messageIdentifier>stringdata</messageIdentifier>
|
||||
<to>
|
||||
<gln>1234567890123</gln>
|
||||
</to>
|
||||
<from>
|
||||
<gln>1234567890123</gln>
|
||||
</from>
|
||||
<representingParty>
|
||||
<gln>1234567890123</gln>
|
||||
</representingParty>
|
||||
</messageHeader>
|
||||
<msg:body>
|
||||
<transaction>
|
||||
<entityIdentification>
|
||||
<uniqueCreatorIdentification>entity_identificationstringdata</uniqueCreatorIdentification>
|
||||
<contentOwner>
|
||||
<gln>4134456747002</gln>
|
||||
</contentOwner>
|
||||
</entityIdentification>
|
||||
<command>
|
||||
<documentCommand>
|
||||
<documentCommandHeader type="ADD">
|
||||
<entityIdentification>
|
||||
<uniqueCreatorIdentification>entity_identificationstringdata</uniqueCreatorIdentification>
|
||||
<contentOwner>
|
||||
<gln>4134456747002</gln>
|
||||
</contentOwner>
|
||||
</entityIdentification>
|
||||
</documentCommandHeader>
|
||||
<documentCommandOperand>
|
||||
<fmcg:item creationDate="2001-06-28T12:13:14" documentStatus="ORIGINAL" contentVersion="1.0" documentStructureVersion="1.0" lastUpdateDate="2001-06-28">
|
||||
<fmcg:links>
|
||||
<fmcg:childItem quantity="20">
|
||||
<fmcg:itemIdentification>
|
||||
<fmcg:alternateItemIdentification type="COUPON_FAMILY_CODE">String 1..35</fmcg:alternateItemIdentification>
|
||||
<fmcg:additionalItemIdentification type="test">String 1..35</fmcg:additionalItemIdentification>
|
||||
</fmcg:itemIdentification>
|
||||
</fmcg:childItem>
|
||||
</fmcg:links>
|
||||
<fmcg:itemInformation>
|
||||
<paymentTerms type="BASIC_(NET)" eventType="ANTICIPATED_DELIVERY_DATE">
|
||||
<proximoCutOffDay>23</proximoCutOffDay>
|
||||
<discountPayment discountType="stringdata">
|
||||
<discountDescription>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</discountDescription>
|
||||
<date>2001-06-28</date>
|
||||
</discountPayment>
|
||||
<installmentDue>
|
||||
<percentageOfPaymentDue>12</percentageOfPaymentDue>
|
||||
<timePeriodDue type="DAYS">8</timePeriodDue>
|
||||
</installmentDue>
|
||||
<netPayment>
|
||||
<dayOfMonthDue>23</dayOfMonthDue>
|
||||
</netPayment>
|
||||
</paymentTerms>
|
||||
<allowanceCharge type="ALLOWANCE_GLOBAL" allowanceOrChargeType="ALLOWANCE" effectiveDateType="EFFECTIVE_DATE" sequenceNumber="1" settlementType="BILL_BACK">
|
||||
<priceBracketList>
|
||||
<bracketIdentifier>
|
||||
<entityID>Here string upto 80 characteres can apper</entityID>
|
||||
</bracketIdentifier>
|
||||
</priceBracketList>
|
||||
<monetaryAmountOrPercentage>
|
||||
<allowanceOrChargeRatePerUnit>1234</allowanceOrChargeRatePerUnit>
|
||||
<amountPerUnit currencyISOcode="USD">123.12</amountPerUnit>
|
||||
<percentagePerUnit>24</percentagePerUnit>
|
||||
<measurementPerUnit unitOfMeasure="string">4</measurementPerUnit>
|
||||
</monetaryAmountOrPercentage>
|
||||
<baseAmount>
|
||||
<allowanceOrChargeRatePerUnit>98</allowanceOrChargeRatePerUnit>
|
||||
<amountPerUnit currencyISOcode="UK">18.12</amountPerUnit>
|
||||
<percentagePerUnit>54</percentagePerUnit>
|
||||
<measurementPerUnit unitOfMeasure="stringdata">7</measurementPerUnit>
|
||||
</baseAmount>
|
||||
<description>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</description>
|
||||
</allowanceCharge>
|
||||
<manufacturer>
|
||||
<gln>1313131313131</gln>
|
||||
</manufacturer>
|
||||
<itemDescription>
|
||||
<descriptionShort>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</descriptionShort>
|
||||
<itemName>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</itemName>
|
||||
<itemClassification>
|
||||
<agency>stringdata</agency>
|
||||
<attribute>
|
||||
<classificationItemCode>stringdata</classificationItemCode>
|
||||
<classificationItemName>
|
||||
<description language="EN">
|
||||
<text>This is an item</text>
|
||||
</description>
|
||||
</classificationItemName>
|
||||
</attribute>
|
||||
<category>
|
||||
<code>stringdata</code>
|
||||
<classificationName>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</classificationName>
|
||||
</category>
|
||||
</itemClassification>
|
||||
</itemDescription>
|
||||
<unitOfMeasure>
|
||||
<netContent>
|
||||
<measurementValue unitOfMeasure="lbs">120</measurementValue>
|
||||
</netContent>
|
||||
<grossWeight>
|
||||
<measurementValue unitOfMeasure="lbs">120</measurementValue>
|
||||
</grossWeight>
|
||||
<packagingWeight>
|
||||
<measurementValue unitOfMeasure="lbs">120</measurementValue>
|
||||
</packagingWeight>
|
||||
<depth>
|
||||
<measurementValue unitOfMeasure="lbs">120</measurementValue>
|
||||
</depth>
|
||||
<diameter>
|
||||
<measurementValue unitOfMeasure="lbs">120</measurementValue>
|
||||
</diameter>
|
||||
<height>
|
||||
<measurementValue unitOfMeasure="lbs">120</measurementValue>
|
||||
</height>
|
||||
<pegHorizontal>
|
||||
<measurementValue unitOfMeasure="lbs">120</measurementValue>
|
||||
</pegHorizontal>
|
||||
<pegVertical>
|
||||
<measurementValue unitOfMeasure="lbs">120</measurementValue>
|
||||
</pegVertical>
|
||||
<width>
|
||||
<measurementValue unitOfMeasure="lbs">120</measurementValue>
|
||||
</width>
|
||||
</unitOfMeasure>
|
||||
<colorCharacteristics>
|
||||
<color>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</color>
|
||||
<colorCodeListAgency>4</colorCodeListAgency>
|
||||
<colorCodeValue>4</colorCodeValue>
|
||||
</colorCharacteristics>
|
||||
<tradeItemHandlingInformation>
|
||||
<handlingInstructions>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</handlingInstructions>
|
||||
<palletDataPalletHandlingOnewayReusable>A</palletDataPalletHandlingOnewayReusable>
|
||||
<palletDataPalletTypeCode>A</palletDataPalletTypeCode>
|
||||
<stackingFactor>4</stackingFactor>
|
||||
<stackingWeightMaximum>
|
||||
<measurementValue unitOfMeasure="lbs">120</measurementValue>
|
||||
</stackingWeightMaximum>
|
||||
<storageHandlingTemperatureMaximum>
|
||||
<measurementValue unitOfMeasure="lbs">120</measurementValue>
|
||||
</storageHandlingTemperatureMaximum>
|
||||
<storageHandlingTemperatureMinimum>
|
||||
<measurementValue unitOfMeasure="lbs">120</measurementValue>
|
||||
</storageHandlingTemperatureMinimum>
|
||||
</tradeItemHandlingInformation>
|
||||
<tradeItemHazardousInformation>
|
||||
<dangerousGoodsItemNumberLetter>string</dangerousGoodsItemNumberLetter>
|
||||
<dangerousGoodsSubstanceIdentificationNumber>st</dangerousGoodsSubstanceIdentificationNumber>
|
||||
<dangerousGoodsTechnicalName>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</dangerousGoodsTechnicalName>
|
||||
<flashPointTemperature>
|
||||
<measurementValue unitOfMeasure="lbs">120</measurementValue>
|
||||
</flashPointTemperature>
|
||||
<hazardCode>s</hazardCode>
|
||||
</tradeItemHazardousInformation>
|
||||
<tradeItemDate>
|
||||
<effectiveChangeDate>
|
||||
<date>2001-05-05</date>
|
||||
</effectiveChangeDate>
|
||||
<endAvailabilityDate>
|
||||
<dateTime>2001-06-28T12:13:14</dateTime>
|
||||
</endAvailabilityDate>
|
||||
<firstSaleDate>
|
||||
<date>2001-05-05</date>
|
||||
</firstSaleDate>
|
||||
<orderingLeadTimeDays>12</orderingLeadTimeDays>
|
||||
<startAvailabilityDate>
|
||||
<dateTime>1999-05-31T13:20:00.000</dateTime>
|
||||
</startAvailabilityDate>
|
||||
</tradeItemDate>
|
||||
<materialSafetyData>
|
||||
<materialSafetyDataSheet>true</materialSafetyDataSheet>
|
||||
</materialSafetyData>
|
||||
<packagingCharacteristics>
|
||||
<numberOfCompleteLayersContainedInATradeItem>stringdata</numberOfCompleteLayersContainedInATradeItem>
|
||||
<numberOfTradeItemsContainedInACompleteLayer>stringdata</numberOfTradeItemsContainedInACompleteLayer>
|
||||
<numberOfTradeItemsPerPallet>stringdata</numberOfTradeItemsPerPallet>
|
||||
<numberOfTradeItemsPerPalletLayer>stringdata</numberOfTradeItemsPerPalletLayer>
|
||||
<numberOfLayersPerPallet>stringdata</numberOfLayersPerPallet>
|
||||
</packagingCharacteristics>
|
||||
<packagingMaterial>
|
||||
<code>stringdata</code>
|
||||
<codeListMaintenanceAgency>stringdata</codeListMaintenanceAgency>
|
||||
<composition>4</composition>
|
||||
<description>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</description>
|
||||
<type>abc</type>
|
||||
<packagingType>stringdata</packagingType>
|
||||
</packagingMaterial>
|
||||
<sizeCharacteristics>
|
||||
<size>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</size>
|
||||
<sizeCodeListAgency>stringdata</sizeCodeListAgency>
|
||||
<sizeCodeValue>stringdata</sizeCodeValue>
|
||||
</sizeCharacteristics>
|
||||
<tradeItemQuantities>
|
||||
<orderQuantityMaximum>
|
||||
<quantity>12</quantity>
|
||||
</orderQuantityMaximum>
|
||||
<orderQuantityMinimum>
|
||||
<quantity>12</quantity>
|
||||
</orderQuantityMinimum>
|
||||
<orderQuantityMultiple>
|
||||
<quantity>12</quantity>
|
||||
</orderQuantityMultiple>
|
||||
<orderSizingFactor>1</orderSizingFactor>
|
||||
</tradeItemQuantities>
|
||||
<unitIndicator>
|
||||
<baseUnitIndicator>true</baseUnitIndicator>
|
||||
<despatchUnitIndicator>true</despatchUnitIndicator>
|
||||
<invoiceUnitIndicator>true</invoiceUnitIndicator>
|
||||
<orderingUnitIndicator>true</orderingUnitIndicator>
|
||||
</unitIndicator>
|
||||
<fmcg:tradeItemCharacteristics>
|
||||
<countryOfOrigin>USA</countryOfOrigin>
|
||||
<nonPublicIndicator>true</nonPublicIndicator>
|
||||
<prePricedAmount>
|
||||
<amount currencyISOcode="USD">20.00</amount>
|
||||
</prePricedAmount>
|
||||
<pricingOnTheProduct>true</pricingOnTheProduct>
|
||||
<rightOfReturnForNonSoldTradeItems>true</rightOfReturnForNonSoldTradeItems>
|
||||
<tradeItemBarcoded>true</tradeItemBarcoded>
|
||||
<variableWeightTradeItem>true</variableWeightTradeItem>
|
||||
<targetMarketCode>
|
||||
<description>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</description>
|
||||
<type>string</type>
|
||||
</targetMarketCode>
|
||||
<fmcg:freshnessDateProduct>true</fmcg:freshnessDateProduct>
|
||||
<fmcg:geneticModificationIndicator>true</fmcg:geneticModificationIndicator>
|
||||
<fmcg:organicItemCode>true</fmcg:organicItemCode>
|
||||
<fmcg:form>AAAA</fmcg:form>
|
||||
<fmcg:minimumProductLifespanFromTimeOfProduction>23</fmcg:minimumProductLifespanFromTimeOfProduction>
|
||||
</fmcg:tradeItemCharacteristics>
|
||||
<fmcg:tradeItemMeasures>
|
||||
<measureCode>
|
||||
<measurementValue unitOfMeasure="lbs">120</measurementValue>
|
||||
</measureCode>
|
||||
<measureValue>100006</measureValue>
|
||||
<fmcg:degreeOfOriginalWort>stringdata</fmcg:degreeOfOriginalWort>
|
||||
<fmcg:drainedWeight>
|
||||
<measurementValue unitOfMeasure="lbs">120</measurementValue>
|
||||
</fmcg:drainedWeight>
|
||||
<fmcg:fatContent>
|
||||
<measurementValue unitOfMeasure="lbs">120</measurementValue>
|
||||
</fmcg:fatContent>
|
||||
<fmcg:percentageOfAlcoholByVolume>0</fmcg:percentageOfAlcoholByVolume>
|
||||
</fmcg:tradeItemMeasures>
|
||||
<fmcg:itemIdentification>
|
||||
<fmcg:gtin>12312312312312</fmcg:gtin>
|
||||
</fmcg:itemIdentification>
|
||||
<fmcg:replacedItem>
|
||||
<fmcg:gtin>12312312312312</fmcg:gtin>
|
||||
</fmcg:replacedItem>
|
||||
<fmcg:packagingMarking>
|
||||
<fmcg:markedWithIngredients>true</fmcg:markedWithIngredients>
|
||||
<fmcg:packagingMarkedAsRecyclable>true</fmcg:packagingMarkedAsRecyclable>
|
||||
<fmcg:packagingMarkedReturnable>true</fmcg:packagingMarkedReturnable>
|
||||
<fmcg:productMarkedAsRecyclable>true</fmcg:productMarkedAsRecyclable>
|
||||
</fmcg:packagingMarking>
|
||||
<fmcg:strengthIndicator>
|
||||
<fmcg:strength>
|
||||
<measurementValue unitOfMeasure="lbs">120</measurementValue>
|
||||
</fmcg:strength>
|
||||
<fmcg:strengthBasis>
|
||||
<measurementValue unitOfMeasure="lbs">120</measurementValue>
|
||||
</fmcg:strengthBasis>
|
||||
</fmcg:strengthIndicator>
|
||||
</fmcg:itemInformation>
|
||||
</fmcg:item>
|
||||
<simpl-eb:party creationDate="2001-06-28T12:13:14" documentStatus="ORIGINAL" contentVersion="1.0" documentStructureVersion="1.0" lastUpdateDate="2001-06-28">
|
||||
<simpl-eb:linkDetails>
|
||||
<simpl-eb:party creationDate="2001-06-28T12:13:14" documentStatus="ORIGINAL" contentVersion="1.0" documentStructureVersion="1.0" lastUpdateDate="2001-06-28">
|
||||
<simpl-eb:links>
|
||||
<partyIdentification>
|
||||
<gln>1313131313131</gln>
|
||||
<additionalPartyIdentification type="BUYER_ASSIGNED">String 1..35</additionalPartyIdentification>
|
||||
</partyIdentification>
|
||||
</simpl-eb:links>
|
||||
<simpl-eb:partyInformation partyRole="BILL_TO">
|
||||
<paymentTerms type="BASIC_(NET)" eventType="ANTICIPATED_DELIVERY_DATE">
|
||||
<proximoCutOffDay>23</proximoCutOffDay>
|
||||
<discountPayment discountType="stringdata">
|
||||
<discountDescription>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</discountDescription>
|
||||
<date>1999-05-31</date>
|
||||
</discountPayment>
|
||||
<installmentDue>
|
||||
<percentageOfPaymentDue>12</percentageOfPaymentDue>
|
||||
<timePeriodDue type="DAYS">8</timePeriodDue>
|
||||
</installmentDue>
|
||||
<netPayment>
|
||||
<dayOfMonthDue>23</dayOfMonthDue>
|
||||
</netPayment>
|
||||
</paymentTerms>
|
||||
<allowanceCharge type="ALLOWANCE_GLOBAL" allowanceOrChargeType="ALLOWANCE" effectiveDateType="EFFECTIVE_DATE" sequenceNumber="1" settlementType="BILL_BACK">
|
||||
<priceBracketList>
|
||||
<bracketIdentifier>
|
||||
<entityID>Here string upto 80 characters can apper</entityID>
|
||||
</bracketIdentifier>
|
||||
</priceBracketList>
|
||||
<monetaryAmountOrPercentage>
|
||||
<allowanceOrChargeRatePerUnit>1234</allowanceOrChargeRatePerUnit>
|
||||
<amountPerUnit currencyISOcode="USD">123.12</amountPerUnit>
|
||||
<percentagePerUnit>24</percentagePerUnit>
|
||||
<measurementPerUnit unitOfMeasure="string">4</measurementPerUnit>
|
||||
</monetaryAmountOrPercentage>
|
||||
<baseAmount>
|
||||
<allowanceOrChargeRatePerUnit>98</allowanceOrChargeRatePerUnit>
|
||||
<amountPerUnit currencyISOcode="UK">18.12</amountPerUnit>
|
||||
<percentagePerUnit>54</percentagePerUnit>
|
||||
<measurementPerUnit unitOfMeasure="string">7</measurementPerUnit>
|
||||
</baseAmount>
|
||||
<description>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</description>
|
||||
</allowanceCharge>
|
||||
<contact>
|
||||
<communicationChannel type="EMAIL" communicationNumber="1"/>
|
||||
<personOrDepartmentName>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</personOrDepartmentName>
|
||||
</contact>
|
||||
<facilitySpecification>
|
||||
<appointmentRequired>true</appointmentRequired>
|
||||
<operatingDayFrom>FRIDAY</operatingDayFrom>
|
||||
<operatingDayTo>FRIDAY</operatingDayTo>
|
||||
<operatingTimeFrom>T:10:10:10</operatingTimeFrom>
|
||||
<operatingTimeTo>T:10:10:10</operatingTimeTo>
|
||||
</facilitySpecification>
|
||||
<nameAndAddress>
|
||||
<city>string</city>
|
||||
<countryISOcode>st</countryISOcode>
|
||||
<languageOfTheParty>EN</languageOfTheParty>
|
||||
<name>string</name>
|
||||
</nameAndAddress>
|
||||
<partyDates>
|
||||
<effectiveChangeDate>
|
||||
<date>2001-01-01</date>
|
||||
</effectiveChangeDate>
|
||||
<partyEndDate>
|
||||
<date>2001-01-01</date>
|
||||
</partyEndDate>
|
||||
<partyStartDate>
|
||||
<date>2001-01-01</date>
|
||||
</partyStartDate>
|
||||
</partyDates>
|
||||
<financialInformation>
|
||||
<standardTermsOfPayment>stringdata</standardTermsOfPayment>
|
||||
<taxAuthority>stringdata</taxAuthority>
|
||||
<taxRegistrationNumber>stringdata</taxRegistrationNumber>
|
||||
<transactionCurrency>USD</transactionCurrency>
|
||||
<typeOfTaxRegistration>str</typeOfTaxRegistration>
|
||||
</financialInformation>
|
||||
<partyIdentification>
|
||||
<gln>1313131313131</gln>
|
||||
<additionalPartyIdentification type="BUYER_ASSIGNED">String 1..35</additionalPartyIdentification>
|
||||
</partyIdentification>
|
||||
<simpl-eb:financialInstitutionalInformation>
|
||||
<accountHolderName>stringdata</accountHolderName>
|
||||
<financialInstitutionAccountNumber>stringdata</financialInstitutionAccountNumber>
|
||||
<financialInstitutionCode>stringdata</financialInstitutionCode>
|
||||
<financialInstitutionName>stringdata</financialInstitutionName>
|
||||
<transactionCurrency>DLR</transactionCurrency>
|
||||
</simpl-eb:financialInstitutionalInformation>
|
||||
<simpl-eb:palletSystem>
|
||||
<acceptPallets>true</acceptPallets>
|
||||
<shipPallets>true</shipPallets>
|
||||
</simpl-eb:palletSystem>
|
||||
</simpl-eb:partyInformation>
|
||||
</simpl-eb:party>
|
||||
</simpl-eb:linkDetails>
|
||||
<simpl-eb:partyInformation partyRole="BILL_TO">
|
||||
<paymentTerms type="BASIC_(NET)" eventType="ANTICIPATED_DELIVERY_DATE">
|
||||
<proximoCutOffDay>23</proximoCutOffDay>
|
||||
<discountPayment discountType="stringdata">
|
||||
<discountDescription>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</discountDescription>
|
||||
<date>1999-05-31</date>
|
||||
</discountPayment>
|
||||
<installmentDue>
|
||||
<percentageOfPaymentDue>12</percentageOfPaymentDue>
|
||||
<timePeriodDue type="DAYS">8</timePeriodDue>
|
||||
</installmentDue>
|
||||
<netPayment>
|
||||
<dayOfMonthDue>23</dayOfMonthDue>
|
||||
</netPayment>
|
||||
</paymentTerms>
|
||||
<allowanceCharge type="ALLOWANCE_GLOBAL" allowanceOrChargeType="ALLOWANCE" effectiveDateType="EFFECTIVE_DATE" sequenceNumber="1" settlementType="BILL_BACK">
|
||||
<priceBracketList>
|
||||
<bracketIdentifier>
|
||||
<entityID>Here string upto 80 characters can apper</entityID>
|
||||
</bracketIdentifier>
|
||||
</priceBracketList>
|
||||
<monetaryAmountOrPercentage>
|
||||
<allowanceOrChargeRatePerUnit>1234</allowanceOrChargeRatePerUnit>
|
||||
<amountPerUnit currencyISOcode="USD">123.12</amountPerUnit>
|
||||
<percentagePerUnit>24</percentagePerUnit>
|
||||
<measurementPerUnit unitOfMeasure="string">4</measurementPerUnit>
|
||||
</monetaryAmountOrPercentage>
|
||||
<baseAmount>
|
||||
<allowanceOrChargeRatePerUnit>98</allowanceOrChargeRatePerUnit>
|
||||
<amountPerUnit currencyISOcode="UK">18.12</amountPerUnit>
|
||||
<percentagePerUnit>54</percentagePerUnit>
|
||||
<measurementPerUnit unitOfMeasure="string">7</measurementPerUnit>
|
||||
</baseAmount>
|
||||
<description>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</description>
|
||||
</allowanceCharge>
|
||||
<contact>
|
||||
<communicationChannel type="EMAIL" communicationNumber="1"/>
|
||||
<personOrDepartmentName>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</personOrDepartmentName>
|
||||
</contact>
|
||||
<facilitySpecification>
|
||||
<appointmentRequired>true</appointmentRequired>
|
||||
<operatingDayFrom>FRIDAY</operatingDayFrom>
|
||||
<operatingDayTo>FRIDAY</operatingDayTo>
|
||||
<operatingTimeFrom>T:10:10:10</operatingTimeFrom>
|
||||
<operatingTimeTo>T:10:10:10</operatingTimeTo>
|
||||
</facilitySpecification>
|
||||
<nameAndAddress>
|
||||
<city>string</city>
|
||||
<countryISOcode>st</countryISOcode>
|
||||
<languageOfTheParty>EN</languageOfTheParty>
|
||||
<name>string</name>
|
||||
</nameAndAddress>
|
||||
<partyDates>
|
||||
<effectiveChangeDate>
|
||||
<date>2001-01-01</date>
|
||||
</effectiveChangeDate>
|
||||
<partyEndDate>
|
||||
<date>2001-01-01</date>
|
||||
</partyEndDate>
|
||||
<partyStartDate>
|
||||
<date>2001-01-01</date>
|
||||
</partyStartDate>
|
||||
</partyDates>
|
||||
<financialInformation>
|
||||
<standardTermsOfPayment>stringdata</standardTermsOfPayment>
|
||||
<taxAuthority>stringdata</taxAuthority>
|
||||
<taxRegistrationNumber>stringdata</taxRegistrationNumber>
|
||||
<transactionCurrency>USD</transactionCurrency>
|
||||
<typeOfTaxRegistration>str</typeOfTaxRegistration>
|
||||
</financialInformation>
|
||||
<partyIdentification>
|
||||
<gln>1313131313131</gln>
|
||||
<additionalPartyIdentification type="BUYER_ASSIGNED">String 1..35</additionalPartyIdentification>
|
||||
</partyIdentification>
|
||||
<simpl-eb:financialInstitutionalInformation>
|
||||
<accountHolderName>stringdata</accountHolderName>
|
||||
<financialInstitutionAccountNumber>stringdata</financialInstitutionAccountNumber>
|
||||
<financialInstitutionCode>stringdata</financialInstitutionCode>
|
||||
<financialInstitutionName>stringdata</financialInstitutionName>
|
||||
<transactionCurrency>DLR</transactionCurrency>
|
||||
</simpl-eb:financialInstitutionalInformation>
|
||||
<simpl-eb:palletSystem>
|
||||
<acceptPallets>true</acceptPallets>
|
||||
<shipPallets>true</shipPallets>
|
||||
</simpl-eb:palletSystem>
|
||||
</simpl-eb:partyInformation>
|
||||
</simpl-eb:party>
|
||||
<fmcg:order documentStatus="COPY" creationDate="2001-12-12T12:12:12">
|
||||
<paymentTerms type="BASIC_(NET)" eventType="ANTICIPATED_DELIVERY_DATE">
|
||||
<proximoCutOffDay>23</proximoCutOffDay>
|
||||
<discountPayment discountType="abc">
|
||||
<discountDescription>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</discountDescription>
|
||||
<date>2001-06-28</date>
|
||||
</discountPayment>
|
||||
<installmentDue>
|
||||
<percentageOfPaymentDue>12</percentageOfPaymentDue>
|
||||
<timePeriodDue type="DAYS">8</timePeriodDue>
|
||||
</installmentDue>
|
||||
<netPayment>
|
||||
<dayOfMonthDue>23</dayOfMonthDue>
|
||||
</netPayment>
|
||||
</paymentTerms>
|
||||
<allowanceCharge type="ALLOWANCE_GLOBAL" allowanceOrChargeType="ALLOWANCE" effectiveDateType="EFFECTIVE_DATE" sequenceNumber="1" settlementType="BILL_BACK">
|
||||
<priceBracketList>
|
||||
<bracketIdentifier>
|
||||
<entityID>Here string upto 80 characters can apper</entityID>
|
||||
</bracketIdentifier>
|
||||
</priceBracketList>
|
||||
<monetaryAmountOrPercentage>
|
||||
<allowanceOrChargeRatePerUnit>1234</allowanceOrChargeRatePerUnit>
|
||||
<amountPerUnit currencyISOcode="USD">123.12</amountPerUnit>
|
||||
<percentagePerUnit>24</percentagePerUnit>
|
||||
<measurementPerUnit unitOfMeasure="string">4</measurementPerUnit>
|
||||
</monetaryAmountOrPercentage>
|
||||
<baseAmount>
|
||||
<allowanceOrChargeRatePerUnit>98</allowanceOrChargeRatePerUnit>
|
||||
<amountPerUnit currencyISOcode="UK">18.12</amountPerUnit>
|
||||
<percentagePerUnit>54</percentagePerUnit>
|
||||
<measurementPerUnit unitOfMeasure="string">7</measurementPerUnit>
|
||||
</baseAmount>
|
||||
<description>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</description>
|
||||
</allowanceCharge>
|
||||
<movementDate>
|
||||
<date>2001-06-28</date>
|
||||
</movementDate>
|
||||
<movementDateType>REQUESTED_PICKUP</movementDateType>
|
||||
<typedEntityIdentification entityType="ORDER">
|
||||
<entityIdentification>
|
||||
<uniqueCreatorIdentification>stringdata</uniqueCreatorIdentification>
|
||||
<contentOwner>
|
||||
<gln>1234567890123</gln>
|
||||
</contentOwner>
|
||||
</entityIdentification>
|
||||
</typedEntityIdentification>
|
||||
<buyer>
|
||||
<gln>1234567890123</gln>
|
||||
</buyer>
|
||||
<seller>
|
||||
<gln>1234567890123</gln>
|
||||
</seller>
|
||||
<shipParty identificationType="SHIP_FROM">
|
||||
<gln>1234567890123</gln>
|
||||
</shipParty>
|
||||
<fmcg:lineItem number="1">
|
||||
<netPrice>
|
||||
<amount currencyISOcode="USD">123.12</amount>
|
||||
</netPrice>
|
||||
<requested>
|
||||
<quantity>120</quantity>
|
||||
</requested>
|
||||
<allowanceCharge type="ALLOWANCE_GLOBAL" allowanceOrChargeType="ALLOWANCE" effectiveDateType="EFFECTIVE_DATE" sequenceNumber="1" settlementType="BILL_BACK">
|
||||
<priceBracketList>
|
||||
<bracketIdentifier>
|
||||
<entityID>Here string upto 80 characters can apper</entityID>
|
||||
</bracketIdentifier>
|
||||
</priceBracketList>
|
||||
<monetaryAmountOrPercentage>
|
||||
<measurementPerUnit unitOfMeasure="strin">9</measurementPerUnit>
|
||||
</monetaryAmountOrPercentage>
|
||||
<description>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</description>
|
||||
</allowanceCharge>
|
||||
<fmcg:itemID>
|
||||
<fmcg:gtin>12312312312312</fmcg:gtin>
|
||||
</fmcg:itemID>
|
||||
</fmcg:lineItem>
|
||||
</fmcg:order>
|
||||
<fmcg:despatchAdvice creationDate="2001-06-28T12:13:14" documentStatus="ORIGINAL" contentVersion="1.0" documentStructureVersion="1.0" lastUpdateDate="2001-06-28">
|
||||
<estimatedDeliveryDate>
|
||||
<date>2001-06-28</date>
|
||||
</estimatedDeliveryDate>
|
||||
<typedEntityIdentification entityType="DESPATCH_ADVICE">
|
||||
<entityIdentification>
|
||||
<uniqueCreatorIdentification>FA12</uniqueCreatorIdentification>
|
||||
<contentOwner>
|
||||
<alternatePartyIdentification type="DUNS"/>
|
||||
<additionalPartyIdentification type="DUNS_PLUS_FOUR"/>
|
||||
</contentOwner>
|
||||
</entityIdentification>
|
||||
</typedEntityIdentification>
|
||||
<buyer>
|
||||
<gln>1234567890123</gln>
|
||||
<additionalPartyIdentification type="SCAC"/>
|
||||
</buyer>
|
||||
<seller>
|
||||
<alternatePartyIdentification type="SELLER_ASSIGNED"/>
|
||||
<additionalPartyIdentification type="UN_LOCATION_CODE"/>
|
||||
</seller>
|
||||
<shipTo>
|
||||
<gln>1234567890123</gln>
|
||||
<additionalPartyIdentification type="SCAC"/>
|
||||
</shipTo>
|
||||
<carrier>
|
||||
<gln>1234567890123</gln>
|
||||
<additionalPartyIdentification type="SCAC"/>
|
||||
</carrier>
|
||||
<deliveryNote number="12">
|
||||
<date>2001-06-28</date>
|
||||
</deliveryNote>
|
||||
<orderNumber number="34">
|
||||
<dateTime>2001-06-28T12:13:14</dateTime>
|
||||
</orderNumber>
|
||||
<consignmentNumber number="23">
|
||||
<date>2001-06-28</date>
|
||||
</consignmentNumber>
|
||||
<actualShipDate>
|
||||
<date>2001-06-28</date>
|
||||
</actualShipDate>
|
||||
<fmcg:despatchItem number="123456">
|
||||
<fmcg:tradeItemUnit>
|
||||
<fmcg:itemContained>
|
||||
<contained>
|
||||
<quantity>123</quantity>
|
||||
</contained>
|
||||
<fmcg:itemID>
|
||||
<fmcg:gtin>123456567667</fmcg:gtin>
|
||||
<fmcg:additionalItemIdentification type="SUPPLIER_NUMBER"/>
|
||||
<listForEachItem>
|
||||
<serial>12a</serial>
|
||||
</listForEachItem>
|
||||
</fmcg:itemID>
|
||||
</fmcg:itemContained>
|
||||
</fmcg:tradeItemUnit>
|
||||
</fmcg:despatchItem>
|
||||
</fmcg:despatchAdvice>
|
||||
<fmcg:simpleInvoice creationDate="2001-06-28T12:13:14" documentStatus="ORIGINAL" contentVersion="1.0" documentStructureVersion="1.0" lastUpdateDate="2001-06-28">
|
||||
<paymentTerms type="BASIC_(NET)" eventType="ANTICIPATED_DELIVERY_DATE">
|
||||
<proximoCutOffDay>23</proximoCutOffDay>
|
||||
<discountPayment discountType="abc">
|
||||
<discountDescription>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</discountDescription>
|
||||
<date>2001-06-28</date>
|
||||
</discountPayment>
|
||||
<installmentDue>
|
||||
<percentageOfPaymentDue>12</percentageOfPaymentDue>
|
||||
<timePeriodDue type="DAYS">8</timePeriodDue>
|
||||
</installmentDue>
|
||||
<netPayment>
|
||||
<dayOfMonthDue>23</dayOfMonthDue>
|
||||
</netPayment>
|
||||
</paymentTerms>
|
||||
<allowanceCharge type="ALLOWANCE_GLOBAL" allowanceOrChargeType="ALLOWANCE" effectiveDateType="EFFECTIVE_DATE" sequenceNumber="1" settlementType="BILL_BACK">
|
||||
<priceBracketList>
|
||||
<bracketIdentifier>
|
||||
<entityID>Here string upto 80 characters can apper</entityID>
|
||||
</bracketIdentifier>
|
||||
</priceBracketList>
|
||||
<monetaryAmountOrPercentage>
|
||||
<allowanceOrChargeRatePerUnit>1234</allowanceOrChargeRatePerUnit>
|
||||
<amountPerUnit currencyISOcode="USD">123.12</amountPerUnit>
|
||||
<percentagePerUnit>24</percentagePerUnit>
|
||||
<measurementPerUnit unitOfMeasure="string">4</measurementPerUnit>
|
||||
</monetaryAmountOrPercentage>
|
||||
<baseAmount>
|
||||
<allowanceOrChargeRatePerUnit>98</allowanceOrChargeRatePerUnit>
|
||||
<amountPerUnit currencyISOcode="UK">18.12</amountPerUnit>
|
||||
<percentagePerUnit>54</percentagePerUnit>
|
||||
<measurementPerUnit unitOfMeasure="string">7</measurementPerUnit>
|
||||
</baseAmount>
|
||||
<description>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</description>
|
||||
</allowanceCharge>
|
||||
<typedEntityIdentification entityType="ORDER">
|
||||
<entityIdentification>
|
||||
<uniqueCreatorIdentification>stringdata</uniqueCreatorIdentification>
|
||||
<contentOwner>
|
||||
<gln>1234567890123</gln>
|
||||
</contentOwner>
|
||||
</entityIdentification>
|
||||
</typedEntityIdentification>
|
||||
<buyer>
|
||||
<gln>1234567890123</gln>
|
||||
</buyer>
|
||||
<seller>
|
||||
<gln>1234567890123</gln>
|
||||
</seller>
|
||||
<totalAmount>
|
||||
<amount currencyISOcode="USD">121</amount>
|
||||
</totalAmount>
|
||||
<orderNumber number="3">
|
||||
<date>2001-06-28</date>
|
||||
</orderNumber>
|
||||
<deliveryNote number="12">
|
||||
<dateTime>2001-06-28T12:13:14</dateTime>
|
||||
</deliveryNote>
|
||||
<fmcg:lineItem number="123">
|
||||
<invoiced>
|
||||
<quantity>123</quantity>
|
||||
</invoiced>
|
||||
<allowanceCharge type="ALLOWANCE_GLOBAL" allowanceOrChargeType="ALLOWANCE" effectiveDateType="EFFECTIVE_DATE" sequenceNumber="1" settlementType="BILL_BACK">
|
||||
<priceBracketList>
|
||||
<bracketIdentifier>
|
||||
<entityID>Here string upto 80 characters can apper</entityID>
|
||||
</bracketIdentifier>
|
||||
</priceBracketList>
|
||||
<monetaryAmountOrPercentage>
|
||||
<allowanceOrChargeRatePerUnit>1234</allowanceOrChargeRatePerUnit>
|
||||
<amountPerUnit currencyISOcode="USD">123.12</amountPerUnit>
|
||||
<percentagePerUnit>24</percentagePerUnit>
|
||||
<measurementPerUnit unitOfMeasure="integer">2</measurementPerUnit>
|
||||
</monetaryAmountOrPercentage>
|
||||
<baseAmount>
|
||||
<allowanceOrChargeRatePerUnit>98</allowanceOrChargeRatePerUnit>
|
||||
<amountPerUnit currencyISOcode="UK">18.12</amountPerUnit>
|
||||
<percentagePerUnit>54</percentagePerUnit>
|
||||
<measurementPerUnit unitOfMeasure="string">7</measurementPerUnit>
|
||||
</baseAmount>
|
||||
<description>
|
||||
<description language="EN">
|
||||
<text>stringdata</text>
|
||||
</description>
|
||||
</description>
|
||||
</allowanceCharge>
|
||||
<totalLineAmount>
|
||||
<amount currencyISOcode="USD">121</amount>
|
||||
</totalLineAmount>
|
||||
<netPrice>
|
||||
<amount currencyISOcode="USD">121</amount>
|
||||
</netPrice>
|
||||
<fmcg:itemID>
|
||||
<fmcg:gtin>123456567667</fmcg:gtin>
|
||||
<fmcg:additionalItemIdentification type="SUPPLIER_NUMBER"/>
|
||||
</fmcg:itemID>
|
||||
</fmcg:lineItem>
|
||||
</fmcg:simpleInvoice>
|
||||
</documentCommandOperand>
|
||||
</documentCommand>
|
||||
</command>
|
||||
<command>
|
||||
<documentIdentificationCommand type="DELETE">
|
||||
<documentIdentifierList>
|
||||
<documentIdentifier contentVersion="1.0">
|
||||
<partyIdentification>
|
||||
<gln>1234567890123</gln>
|
||||
</partyIdentification>
|
||||
</documentIdentifier>
|
||||
<documentIdentifier contentVersion="1.0">
|
||||
<fmcg:itemIdentification>
|
||||
<fmcg:alternateItemIdentification type="COUPON_FAMILY_CODE">Identification</fmcg:alternateItemIdentification>
|
||||
</fmcg:itemIdentification>
|
||||
</documentIdentifier>
|
||||
<documentIdentifier contentVersion="1.0">
|
||||
<typedEntityIdentification entityType="ORDER">
|
||||
<entityIdentification>
|
||||
<uniqueCreatorIdentification>stringdata</uniqueCreatorIdentification>
|
||||
<contentOwner>
|
||||
<gln>1234567890123</gln>
|
||||
</contentOwner>
|
||||
</entityIdentification>
|
||||
</typedEntityIdentification>
|
||||
</documentIdentifier>
|
||||
</documentIdentifierList>
|
||||
</documentIdentificationCommand>
|
||||
</command>
|
||||
<command>
|
||||
<linkCommand>
|
||||
<linkCommandHeader type="LINK">
|
||||
<entityIdentification>
|
||||
<uniqueCreatorIdentification>stringdata</uniqueCreatorIdentification>
|
||||
<contentOwner>
|
||||
<gln>1234567890123</gln>
|
||||
</contentOwner>
|
||||
</entityIdentification>
|
||||
</linkCommandHeader>
|
||||
<linkCommandOperand>
|
||||
<documentIdentifier contentVersion="1.0">
|
||||
<fmcg:itemIdentification>
|
||||
<fmcg:gtin>12345678901234</fmcg:gtin>
|
||||
</fmcg:itemIdentification>
|
||||
</documentIdentifier>
|
||||
<hierarchyList>
|
||||
<child quantity="25">
|
||||
<documentIdentifier contentVersion="1.0">
|
||||
<typedEntityIdentification entityType="ORDER">
|
||||
<entityIdentification>
|
||||
<uniqueCreatorIdentification>stringdata</uniqueCreatorIdentification>
|
||||
<contentOwner>
|
||||
<gln>1234567890123</gln>
|
||||
</contentOwner>
|
||||
</entityIdentification>
|
||||
</typedEntityIdentification>
|
||||
</documentIdentifier>
|
||||
</child>
|
||||
<child quantity="2">
|
||||
<documentIdentifier contentVersion="1.0">
|
||||
<partyIdentification>
|
||||
<gln>1234567890123</gln>
|
||||
</partyIdentification>
|
||||
</documentIdentifier>
|
||||
</child>
|
||||
</hierarchyList>
|
||||
</linkCommandOperand>
|
||||
</linkCommand>
|
||||
</command>
|
||||
</transaction>
|
||||
</msg:body>
|
||||
</as2:envelope>
|
@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/as2" xmlns="http://www.uc-council.org/smp/schemas/as2" xmlns:core="http://www.uc-council.org/smp/schemas/core" xmlns:msg="http://www.uc-council.org/smp/schemas/msg" elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:import namespace="http://www.uc-council.org/smp/schemas/core" schemaLocation="Core.xsd"/>
|
||||
<xsd:import namespace="http://www.uc-council.org/smp/schemas/msg" schemaLocation="Message.xsd"/>
|
||||
<xsd:element name="envelope" type="EnvelopeType"/>
|
||||
<xsd:complexType name="EnvelopeType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="messageHeader" type="MessageHeaderType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element ref="msg:body" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="communicationVersion" type="core:VersionType" default="1.0"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="MessageHeaderType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="userId" type="core:String1to20Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="password" type="core:String1to20Type" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="messageIdentifier" type="core:String1to20Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="to" type="core:PartyIdentificationType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="from" type="core:PartyIdentificationType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="representingParty" type="core:PartyIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attributeGroup ref="core:CreationAttributeGroupType"/>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/fmcg" xmlns:fmcg="http://www.uc-council.org/smp/schemas/fmcg" xmlns="http://www.uc-council.org/smp/schemas/fmcg" xmlns:core="http://www.uc-council.org/smp/schemas/core" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:import namespace="http://www.uc-council.org/smp/schemas/core" schemaLocation="Core.xsd"/>
|
||||
<xsd:include schemaLocation="FmcgIdentifiers.xsd"/>
|
||||
<xsd:include schemaLocation="FmcgOrder.xsd"/>
|
||||
<xsd:include schemaLocation="FmcgItem.xsd"/>
|
||||
<xsd:include schemaLocation="FmcgSimpleInvoice.xsd"/>
|
||||
<xsd:include schemaLocation="FmcgDespatchAdvice.xsd"/>
|
||||
<xsd:element name="order" type="OrderType"/>
|
||||
<xsd:element name="despatchAdvice" type="DespatchAdviceType"/>
|
||||
<xsd:element name="item" type="ItemType"/>
|
||||
<xsd:element name="simpleInvoice" type="SimpleInvoiceType"/>
|
||||
<xsd:element name="itemIdentification" type="ItemIdentificationType"/>
|
||||
</xsd:schema>
|
@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema targetNamespace="http://www.uc-council.org/smp/schemas/fmcg" xmlns="http://www.uc-council.org/smp/schemas/fmcg" xmlns:core="http://www.uc-council.org/smp/schemas/core" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType name="DespatchAdviceType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:DespatchAdviceType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="despatchItem" type="DespatchLineItemType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="DespatchLineItemType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:DespatchLineItemType">
|
||||
<xsd:sequence>
|
||||
<xsd:choice>
|
||||
<xsd:element name="logisticUnits" type="LogisticUnitsType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="tradeItemUnit" type="TradeItemUnitType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="LogisticUnitsType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:LogisticUnitsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="itemsContained" type="ItemContainmentType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TradeItemUnitType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:TradeItemUnitType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="itemContained" type="ItemContainmentType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ItemContainmentType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:ItemContainmentType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="itemID" type="DespatchItemIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="DespatchItemIdentificationType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="ItemIdentificationType">
|
||||
<xsd:group ref="core:DespatchItemIdentificationGroupType"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/fmcg" xmlns="http://www.uc-council.org/smp/schemas/fmcg" xmlns:core="http://www.uc-council.org/smp/schemas/core" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType name="ItemIdentificationType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:ItemIdentificationType">
|
||||
<xsd:sequence>
|
||||
<xsd:choice>
|
||||
<xsd:element name="gtin" type="core:GlobalTradeItemNumberType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="alternateItemIdentification" type="AlternateItemIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:choice>
|
||||
<xsd:element name="additionalItemIdentification" type="AlternateItemIdentificationType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="AlternateItemIdentificationType">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="core:AlternateItemIdentificationType">
|
||||
<xsd:attribute name="type" type="AlternateItemIdentificationListType" use="required"/>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="AlternateItemIdentificationListType">
|
||||
<xsd:union memberTypes="AlternateItemIdentificationListTypeValuesType core:AlternateItemIdentificationListType"/>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="AlternateItemIdentificationListTypeValuesType">
|
||||
<xsd:restriction base="core:String1to80Type">
|
||||
<xsd:enumeration value="COUPON_FAMILY_CODE"/>
|
||||
<xsd:enumeration value="LOTTERY_GAME_NUMBER"/>
|
||||
<xsd:enumeration value="LOTTERY_PACK_BOOK_NUMBER"/>
|
||||
<xsd:enumeration value="NBCA_PRODUCT_CODE"/>
|
||||
<xsd:enumeration value="SUPPLIER_NUMBER"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
@ -0,0 +1,153 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/fmcg" xmlns="http://www.uc-council.org/smp/schemas/fmcg" xmlns:core="http://www.uc-council.org/smp/schemas/core" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType name="ItemType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:ItemType">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="ItemLinksOrDetailsGroupType"/>
|
||||
<xsd:element name="itemInformation" type="ItemInformationType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:group name="ItemLinksOrDetailsGroupType">
|
||||
<xsd:choice>
|
||||
<xsd:element name="linkDetailsRecursive" type="ItemLinkDetailsRecursiveType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="links" type="ItemLinksType" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:choice>
|
||||
</xsd:group>
|
||||
<xsd:complexType name="ItemLinksType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:ItemLinksType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="childItem" type="ChildItemType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ChildItemType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:ChildItemType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="itemIdentification" type="ItemIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ItemLinkDetailsRecursiveType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:ItemLinkDetailsRecursiveType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="childItemDetails" type="ChildItemDetailsType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ChildItemDetailsType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:ChildItemDetailsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="item" type="ItemType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ItemInformationType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="RelationshipDependentDataType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="itemIdentification" type="ItemIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="replacedItem" type="ItemIdentificationType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="packagingMarking" type="PackagingMarkingType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="strengthIndicator" type="StrengthIndicatorType" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TradeItemCharacteristicsType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:TradeItemCharacteristicsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="freshnessDateProduct" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="geneticModificationIndicator" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="organicItemCode" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="form" type="core:String1to35Type" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="minimumProductLifespanFromTimeOfProduction" type="core:Integer1to4Type" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="PackagingMarkingType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="markedWithIngredients" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="packagingMarkedAsRecyclable" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="packagingMarkedReturnable" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="productMarkedAsRecyclable" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TradeItemMeasuresType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:TradeItemMeasuresType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="degreeOfOriginalWort" type="core:String1to3Type" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="drainedWeight" type="core:MeasurementType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="fatContent" type="core:MeasurementType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="percentageOfAlcoholByVolume" type="core:SimpleFloat1to2Type" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="StrengthIndicatorType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="strength" type="core:MeasurementType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="strengthBasis" type="core:MeasurementType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="RelationshipDependentDataType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:RelationshipDependentDataType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="tradeItemCharacteristics" type="TradeItemCharacteristicsType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="tradeItemMeasures" type="TradeItemMeasuresType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/fmcg" xmlns="http://www.uc-council.org/smp/schemas/fmcg" xmlns:fmcg="http://www.uc-council.org/smp/schemas/fmcg" xmlns:core="http://www.uc-council.org/smp/schemas/core" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType name="OrderType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:OrderType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="lineItem" type="OrderLineItemType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="OrderLineItemType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:OrderLineItemType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="itemID" type="ItemIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/fmcg" xmlns="http://www.uc-council.org/smp/schemas/fmcg" xmlns:fmcg="http://www.uc-council.org/smp/schemas/fmcg" xmlns:core="http://www.uc-council.org/smp/schemas/core" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType name="SimpleInvoiceType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:SimpleInvoiceType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="lineItem" type="SimpleInvoiceLineItemType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="SimpleInvoiceLineItemType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:SimpleInvoiceLineItemType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="itemID" type="ItemIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/core" xmlns="http://www.uc-council.org/smp/schemas/core" elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<!--Entity Identification -->
|
||||
<xsd:complexType name="EntityIdentificationType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="uniqueCreatorIdentification" type="String1to80Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="contentOwner" type="PartyIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!--Typed Entity Identification -->
|
||||
<xsd:simpleType name="EntityTypeListType">
|
||||
<xsd:restriction base="String1to80Type">
|
||||
<xsd:enumeration value="DESPATCH_ADVICE"/>
|
||||
<xsd:enumeration value="ORDER"/>
|
||||
<xsd:enumeration value="REQUEST_FOR_PAYMENT"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="TypedEntityIdentificationType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="entityIdentification" type="EntityIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="entityType" type="EntityTypeListType" use="required"/>
|
||||
</xsd:complexType>
|
||||
<!--Party Identification -->
|
||||
<xsd:simpleType name="AlternatePartyIdentificationListType">
|
||||
<xsd:restriction base="String1to80Type">
|
||||
<xsd:enumeration value="BUYER_ASSIGNED"/>
|
||||
<xsd:enumeration value="DUNS"/>
|
||||
<xsd:enumeration value="DUNS_PLUS_FOUR"/>
|
||||
<xsd:enumeration value="SCAC"/>
|
||||
<xsd:enumeration value="SELLER_ASSIGNED"/>
|
||||
<xsd:enumeration value="UN_LOCATION_CODE"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="AlternatePartyIdentificationType">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="IdentificationType">
|
||||
<xsd:attribute name="type" type="AlternatePartyIdentificationListType" use="required"/>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="PartyIdentificationType">
|
||||
<xsd:sequence>
|
||||
<xsd:choice>
|
||||
<xsd:element name="gln" type="GlobalLocationNumberType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="alternatePartyIdentification" type="AlternatePartyIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:choice>
|
||||
<xsd:element name="additionalPartyIdentification" type="AlternatePartyIdentificationType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!--Item Identification -->
|
||||
<xsd:simpleType name="AlternateItemIdentificationListType">
|
||||
<xsd:restriction base="String1to80Type"/>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="AlternateItemIdentificationType">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="IdentificationType"/>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="IdentificationType" abstract="true">
|
||||
<xsd:simpleContent>
|
||||
<xsd:restriction base="String1to35Type"/>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ItemIdentificationType" abstract="true"/>
|
||||
<xsd:simpleType name="GlobalTradeItemNumberType">
|
||||
<xsd:restriction base="Integer14Type"/>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="GlobalLocationNumberType">
|
||||
<xsd:restriction base="Integer13Type"/>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
231
platform/runtime/modules/atlasmap/xsom/schemas/EAN-UCC/Item.xsd
Normal file
231
platform/runtime/modules/atlasmap/xsom/schemas/EAN-UCC/Item.xsd
Normal file
@ -0,0 +1,231 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/core" xmlns="http://www.uc-council.org/smp/schemas/core" elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType name="ItemType" abstract="true">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="DocumentType"/>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ItemInformationType" abstract="true">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="TermsGroupType"/>
|
||||
<xsd:element name="manufacturer" type="PartyIdentificationType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="itemDescription" type="ItemDescriptionType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="unitOfMeasure" type="UnitOfMeasureType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ItemDescriptionType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="additionalAttributeDescription" type="TextDescriptionType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="brandName" type="TextDescriptionType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="descriptionShort" type="TextDescriptionType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="itemDescription" type="TextDescriptionType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="itemName" type="TextDescriptionType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="itemClassification" type="ClassificationType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ClassificationType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="agency" type="String1to35Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="attribute" type="ClassificationAttributeType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="category" type="ClassificationCategoryType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ClassificationCategoryType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="code" type="String1to35Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="classificationName" type="TextDescriptionType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ClassificationAttributeType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="classificationItemCode" type="String1to35Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="classificationItemName" type="TextDescriptionType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="RelationshipDependentDataType" abstract="true">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="ItemInformationType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="colorCharacteristics" type="ColorCharacteristicsType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="tradeItemHandlingInformation" type="TradeItemHandlingInformationType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="tradeItemHazardousInformation" type="TradeItemHazardousInformationType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="tradeItemDate" type="TradeItemDateType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="materialSafetyData" type="MaterialSafetyDataType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="packagingCharacteristics" type="PackagingCharacteristicsType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="packagingMaterial" type="PackagingMaterialType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="sizeCharacteristics" type="SizeCharacteristicsType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="tradeItemQuantities" type="TradeItemQuantitiesType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="unitIndicator" type="TradeItemUnitIndicatorType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ColorCharacteristicsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="color" type="TextDescriptionType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="colorCodeListAgency" type="Integer1to3Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="colorCodeValue" type="String1to17Type" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TradeItemHandlingInformationType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="handlingInstructions" type="TextDescriptionType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="palletDataPalletHandlingOnewayReusable" type="String1to35Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="palletDataPalletTypeCode" type="String1to3Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="stackingFactor" type="Integer1to6Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="stackingWeightMaximum" type="MeasurementType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="storageHandlingTemperatureMaximum" type="MeasurementType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="storageHandlingTemperatureMinimum" type="MeasurementType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TradeItemHazardousInformationType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="dangerousGoodsItemNumberLetter" type="String1to6Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="dangerousGoodsSubstanceIdentificationNumber" type="String1to4Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="dangerousGoodsTechnicalName" type="TextDescriptionType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="flashPointTemperature" type="MeasurementType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="hazardCode" type="String1Type" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TradeItemDateType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="effectiveChangeDate" type="DateType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="endAvailabilityDate" type="DateAndTimeType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="firstSaleDate" type="DateType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="orderingLeadTimeDays" type="Integer1to12Type" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="startAvailabilityDate" type="DateAndTimeType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="MaterialSafetyDataType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="materialSafetyDataSheet" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="PackagingCharacteristicsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="numberOfCompleteLayersContainedInATradeItem" type="String1to6Type" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="numberOfTradeItemsContainedInACompleteLayer" type="String1to6Type" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="numberOfTradeItemsPerPallet" type="String1to6Type" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="numberOfTradeItemsPerPalletLayer" type="String1to6Type" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="numberOfLayersPerPallet" type="String1to6Type" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="PackagingMaterialType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="code" type="String1to3Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="codeListMaintenanceAgency" type="String1to3Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="composition" type="PercentageType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="description" type="TextDescriptionType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="type" type="String1to3Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="packagingType" type="String1to3Type" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="SizeCharacteristicsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="size" type="TextDescriptionType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="sizeCodeListAgency" type="String1to3Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="sizeCodeValue" type="String1to3Type" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TradeItemQuantitiesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="orderQuantityMaximum" type="QuantityType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="orderQuantityMinimum" type="QuantityType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="orderQuantityMultiple" type="QuantityType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="orderSizingFactor" type="Integer1to15Type" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TradeItemUnitIndicatorType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="baseUnitIndicator" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="despatchUnitIndicator" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="invoiceUnitIndicator" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="orderingUnitIndicator" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TradeItemCharacteristicsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="countryOfOrigin" type="CountryISOCodeType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="nonPublicIndicator" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="prePricedAmount" type="MonetaryAmountType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="pricingOnTheProduct" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="rightOfReturnForNonSoldTradeItems" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="tradeItemBarcoded" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="variableWeightTradeItem" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="targetMarketCode" type="TargetMarketCodeType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TargetMarketCodeType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="description" type="TextDescriptionType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="type" type="String1to35Type" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TradeItemMeasuresType" abstract="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="measureCode" type="MeasurementType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="measureValue" type="Integer1to6Type" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:group name="ItemLinksOrDetailsGroupType">
|
||||
<xsd:sequence/>
|
||||
</xsd:group>
|
||||
<xsd:complexType name="ItemLinkDetailsRecursiveType" abstract="true"/>
|
||||
<xsd:complexType name="ItemLinksType" abstract="true"/>
|
||||
<xsd:complexType name="ChildItemType" abstract="true">
|
||||
<xsd:attribute name="quantity" type="Integer1to6Type" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ChildItemDetailsType">
|
||||
<xsd:attribute name="quantity" type="Integer1to6Type" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="UnitOfMeasureType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="netContent" type="MeasurementType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="grossWeight" type="MeasurementType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="packagingWeight" type="MeasurementType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="depth" type="MeasurementType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="diameter" type="MeasurementType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="height" type="MeasurementType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="pegHorizontal" type="MeasurementType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="pegVertical" type="MeasurementType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="width" type="MeasurementType" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/msg" xmlns="http://www.uc-council.org/smp/schemas/msg" xmlns:core="http://www.uc-council.org/smp/schemas/core" elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:group name="ChildOrAssociatedGroupType">
|
||||
<xsd:sequence>
|
||||
<xsd:choice>
|
||||
<xsd:element name="hierarchyList" type="HierarchyListType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="associatedDocumentList" type="AssociatedDocumentListType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
</xsd:group>
|
||||
<xsd:complexType name="AssociatedDocumentListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="documentIdentifier" type="DocumentIdentifierType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="HierarchyListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="child" type="ChildType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ChildType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="documentIdentifier" type="DocumentIdentifierType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="quantity" type="core:Integer1to6Type" use="optional" default="1"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="LinkCommandType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="linkCommandHeader" type="LinkCommandHeaderType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="linkCommandOperand" type="LinkCommandOperandType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="LinkCommandOperandType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="documentIdentifier" type="DocumentIdentifierType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:group ref="ChildOrAssociatedGroupType"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="LinkCommandHeaderType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="CommandHeaderType">
|
||||
<xsd:attribute name="type" type="ListCommandListType" use="required"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="ListCommandListType">
|
||||
<xsd:restriction base="core:String1to80Type">
|
||||
<xsd:enumeration value="LINK"/>
|
||||
<xsd:enumeration value="UNLINK"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/msg" xmlns="http://www.uc-council.org/smp/schemas/msg" xmlns:fmcg="http://www.uc-council.org/smp/schemas/fmcg" xmlns:core="http://www.uc-council.org/smp/schemas/core" elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:import namespace="http://www.uc-council.org/smp/schemas/core" schemaLocation="Core.xsd"/>
|
||||
<xsd:include schemaLocation="Document.xsd"/>
|
||||
<xsd:include schemaLocation="Command.xsd"/>
|
||||
<xsd:complexType name="BodyType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="transaction" type="TransactionType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ResponseType" abstract="true"/>
|
||||
<xsd:complexType name="DocumentIdentifierListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="documentIdentifier" type="DocumentIdentifierType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="DocumentIdentifierType">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="DocumentIdentifierTypeGroupType"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="contentVersion" type="core:VersionType" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:group name="DocumentIdentifierTypeGroupType">
|
||||
<xsd:choice>
|
||||
<xsd:element name="partyIdentification" type="core:PartyIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element ref="fmcg:itemIdentification" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="typedEntityIdentification" type="core:TypedEntityIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:choice>
|
||||
</xsd:group>
|
||||
<xsd:element name="body" type="BodyType"/>
|
||||
<xsd:complexType name="TransactionType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="entityIdentification" type="core:EntityIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="command" type="CommandType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CommandType">
|
||||
<xsd:group ref="CommandTypeGroupType"/>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/core" xmlns="http://www.uc-council.org/smp/schemas/core" elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType name="OrderType" abstract="true">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="DocumentType">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="TermsGroupType"/>
|
||||
<xsd:element name="movementDate" type="DateType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="movementDateType" type="MovementDateListType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="typedEntityIdentification" type="TypedEntityIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="buyer" type="PartyIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="seller" type="PartyIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="shipParty" type="ShipPartyIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ShipPartyIdentificationType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="PartyIdentificationType">
|
||||
<xsd:attribute name="identificationType" type="ShipPartyIdentificationListType" use="required"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="ShipPartyIdentificationListType">
|
||||
<xsd:restriction base="String1to80Type">
|
||||
<xsd:enumeration value="SHIP_FROM"/>
|
||||
<xsd:enumeration value="SHIP_TO"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="MovementDateListType">
|
||||
<xsd:restriction base="String1to80Type">
|
||||
<xsd:enumeration value="REQUESTED_DELIVERY"/>
|
||||
<xsd:enumeration value="REQUESTED_PICKUP"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="OrderLineItemType" abstract="true">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="LineItemType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="netPrice" type="MonetaryAmountType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="requested" type="QuantityType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="allowanceCharge" type="AllowanceChargeType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
158
platform/runtime/modules/atlasmap/xsom/schemas/EAN-UCC/Party.xsd
Normal file
158
platform/runtime/modules/atlasmap/xsom/schemas/EAN-UCC/Party.xsd
Normal file
@ -0,0 +1,158 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/core" xmlns="http://www.uc-council.org/smp/schemas/core" elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType name="PartyType" abstract="true">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="DocumentType"/>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:group name="PartyLinksOrDetailsGroupType">
|
||||
<xsd:sequence/>
|
||||
</xsd:group>
|
||||
<xsd:complexType name="PartyLinksType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="partyIdentification" type="PartyIdentificationType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="PartyLinkDetailsType" abstract="true"/>
|
||||
<xsd:complexType name="PartyInformationType" abstract="true">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="TermsGroupType"/>
|
||||
<xsd:element name="contact" type="ContactType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="facilitySpecification" type="FacilitySpecificationType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="nameAndAddress" type="NameAndAddressType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="partyDates" type="PartyDatesType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="financialInformation" type="PartyFinancialInformationType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="partyIdentification" type="PartyIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="partyRole" type="PartyRoleListType" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="PartyRoleListType">
|
||||
<xsd:restriction base="String1to80Type">
|
||||
<xsd:enumeration value="BILL_TO"/>
|
||||
<xsd:enumeration value="BUYER"/>
|
||||
<xsd:enumeration value="CORPORATE_IDENTITY"/>
|
||||
<xsd:enumeration value="DELIVERY_PARTY"/>
|
||||
<xsd:enumeration value="INFORMATION_PROVIDER"/>
|
||||
<xsd:enumeration value="INVOICEE"/>
|
||||
<xsd:enumeration value="ISSUER_OF_INVOICE"/>
|
||||
<xsd:enumeration value="LOGISTICS_SERVICE_PROVIDER"/>
|
||||
<xsd:enumeration value="MANUFACTURING_PLANT"/>
|
||||
<xsd:enumeration value="MARK_FOR"/>
|
||||
<xsd:enumeration value="MESSAGE_FROM"/>
|
||||
<xsd:enumeration value="MESSAGE_RECIPIENT"/>
|
||||
<xsd:enumeration value="PARTY_TO_RECEIVE_COMMERCIAL_INVOICE"/>
|
||||
<xsd:enumeration value="PAYER"/>
|
||||
<xsd:enumeration value="SELLER"/>
|
||||
<xsd:enumeration value="SHIP_FROM"/>
|
||||
<xsd:enumeration value="SHIP_TO"/>
|
||||
<xsd:enumeration value="SUPPLIER"/>
|
||||
<xsd:enumeration value="WAREHOUSE_DEPOT"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="PartyFinancialInformationType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="standardTermsOfPayment" type="String1to80Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="taxAuthority" type="String1to70Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="taxRegistrationNumber" type="String1to35Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="transactionCurrency" type="CurrencyISOCodeType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="typeOfTaxRegistration" type="String1to3Type" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="PartyDatesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="effectiveChangeDate" type="DateType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="partyEndDate" type="DateType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="partyStartDate" type="DateType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="NameAndAddressType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="city" type="String1to35Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="countryISOcode" type="CountryISOCodeType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="languageOfTheParty" type="xsd:language" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="name" type="String1to35Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="postalCode" type="String1to10Type" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="state" type="String1to9Type" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="streetAddress" type="String1to35Type" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="FacilitySpecificationType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="appointmentRequired" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="operatingDayFrom" type="DaysOfTheWeekListType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="operatingDayTo" type="DaysOfTheWeekListType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="operatingTimeFrom" type="xsd:time" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="operatingTimeTo" type="xsd:time" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CommunicationChannelType">
|
||||
<xsd:attribute name="type" type="CommunicationChannelListType" use="required"/>
|
||||
<xsd:attribute name="communicationNumber" type="String1to70Type" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ContactType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="communicationChannel" type="CommunicationChannelType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
<xsd:element name="personOrDepartmentName" type="TextDescriptionType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="CommunicationChannelListType">
|
||||
<xsd:restriction base="String1to80Type">
|
||||
<xsd:enumeration value="EMAIL"/>
|
||||
<xsd:enumeration value="TELEFAX"/>
|
||||
<xsd:enumeration value="TELEPHONE"/>
|
||||
<xsd:enumeration value="WEBSITE"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="PalletSystemType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="acceptPallets" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="shipPallets" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="FinancialInstitutionalInformationType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="accountHolderName" type="String1to35Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="financialInstitutionAccountNumber" type="String1to35Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="financialInstitutionCode" type="String1to35Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="financialInstitutionName" type="String1to35Type" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="transactionCurrency" type="CurrencyISOCodeType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/core" xmlns="http://www.uc-council.org/smp/schemas/core" elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType name="PaymentTermsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="proximoCutOffDay" type="DayOfMonthDueType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="discountPayment" type="DiscountPaymentType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="installmentDue" type="InstallmentDueType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="netPayment" type="NetPaymentType" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="type" type="PaymentTermsListType" use="required"/>
|
||||
<xsd:attribute name="eventType" type="PaymentTermsEventListType" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="PaymentTermsEventListType">
|
||||
<xsd:restriction base="String1to80Type">
|
||||
<xsd:enumeration value="ANTICIPATED_DELIVERY_DATE"/>
|
||||
<xsd:enumeration value="DATE_INVOICE_RECEIVED"/>
|
||||
<xsd:enumeration value="DATE_OF_DELIVERY_TO_SITE"/>
|
||||
<xsd:enumeration value="DATE_OF_INVOICE"/>
|
||||
<xsd:enumeration value="DATE_OF_SHIPMENT_AS_EVIDENCED_BY_TRANSPORT_DOC"/>
|
||||
<xsd:enumeration value="EFFECTIVE_DATE"/>
|
||||
<xsd:enumeration value="INVOICE_TRANSMISSION_DATE"/>
|
||||
<xsd:enumeration value="RECEIPT_OF_GOODS"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="PaymentTermsListType">
|
||||
<xsd:restriction base="String1to80Type">
|
||||
<xsd:enumeration value="BASIC_(NET)"/>
|
||||
<xsd:enumeration value="BASIC_DISCOUNT_OFFERED"/>
|
||||
<xsd:enumeration value="DEFERRED"/>
|
||||
<xsd:enumeration value="DISCOUNT"/>
|
||||
<xsd:enumeration value="DISCOUNT_AFTER_DEDUCTING_FREIGHT"/>
|
||||
<xsd:enumeration value="DISCOUNT_NOT_APPLICABLE"/>
|
||||
<xsd:enumeration value="ELECTIVE"/>
|
||||
<xsd:enumeration value="END_OF_MONTH"/>
|
||||
<xsd:enumeration value="EXTENDED"/>
|
||||
<xsd:enumeration value="FIXED_DATE"/>
|
||||
<xsd:enumeration value="INSTANT"/>
|
||||
<xsd:enumeration value="MIXED"/>
|
||||
<xsd:enumeration value="PAYMENT_BY_INSTALLMENT"/>
|
||||
<xsd:enumeration value="PREVIOUSLY_AGREED_UPON"/>
|
||||
<xsd:enumeration value="PROXIMO"/>
|
||||
<xsd:enumeration value="VALUTA"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:group name="PaymentTimePeriodGroupType">
|
||||
<xsd:sequence>
|
||||
<xsd:choice>
|
||||
<xsd:element name="timePeriodDue" type="TimePeriodDueType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="dayOfMonthDue" type="DayOfMonthDueType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="date" type="xsd:date" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
</xsd:group>
|
||||
<xsd:complexType name="TimePeriodDueType">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="Integer1to2Type">
|
||||
<xsd:attribute name="type" type="TimePeriodListType" use="required"/>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="TimePeriodListType">
|
||||
<xsd:restriction base="String1to80Type">
|
||||
<xsd:enumeration value="DAYS"/>
|
||||
<xsd:enumeration value="MONTHS"/>
|
||||
<xsd:enumeration value="WEEKS"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="NetPaymentType">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="PaymentTimePeriodGroupType"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="DiscountPaymentType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="discountDescription" type="TextDescriptionType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:group ref="PaymentTimePeriodGroupType"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="discountType" type="String1to3Type" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="InstallmentDueType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="percentageOfPaymentDue" type="PercentageType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:group ref="PaymentTimePeriodGroupType"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="DayOfMonthDueType">
|
||||
<xsd:restriction base="Integer1to2Type"/>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/core" xmlns="http://www.uc-council.org/smp/schemas/core" elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType name="RequestForPaymentType" abstract="true">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="DocumentType">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="TermsGroupType"/>
|
||||
<xsd:element name="typedEntityIdentification" type="TypedEntityIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="buyer" type="PartyIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="seller" type="PartyIdentificationType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="InvoiceLineItemType" abstract="true">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="LineItemType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="invoiced" type="QuantityType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="allowanceCharge" type="AllowanceChargeType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/simpl-eb" xmlns="http://www.uc-council.org/smp/schemas/simpl-eb" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:import namespace="http://www.uc-council.org/smp/schemas/core" schemaLocation="Core.xsd"/>
|
||||
<xsd:include schemaLocation="Simpl-ebParty.xsd"/>
|
||||
<xsd:element name="party" type="PartyType"/>
|
||||
</xsd:schema>
|
@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/simpl-eb" xmlns="http://www.uc-council.org/smp/schemas/simpl-eb" xmlns:core="http://www.uc-council.org/smp/schemas/core" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType name="PartyInformationType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:PartyInformationType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="financialInstitutionalInformation" type="core:FinancialInstitutionalInformationType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="palletSystem" type="core:PalletSystemType" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="PartyType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:PartyType">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="PartyLinksOrDetailsGroupType"/>
|
||||
<xsd:element name="partyInformation" type="PartyInformationType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="PartyLinkDetailsType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="core:PartyLinkDetailsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="party" type="PartyType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:group name="PartyLinksOrDetailsGroupType">
|
||||
<xsd:choice>
|
||||
<xsd:element name="linkDetails" type="PartyLinkDetailsType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="links" type="core:PartyLinksType" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:choice>
|
||||
</xsd:group>
|
||||
</xsd:schema>
|
@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/core" xmlns="http://www.uc-council.org/smp/schemas/core" elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType name="SimpleInvoiceType" abstract="true">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="RequestForPaymentType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="totalAmount" type="MonetaryAmountType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="orderNumber" type="ReferenceType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="deliveryNote" type="ReferenceType" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="SimpleInvoiceLineItemType" abstract="true">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="InvoiceLineItemType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="totalLineAmount" type="MonetaryAmountType" minOccurs="1" maxOccurs="1"/>
|
||||
<xsd:element name="netPrice" type="MonetaryAmountType" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
218
platform/runtime/modules/atlasmap/xsom/schemas/EAN-UCC/Types.xsd
Normal file
218
platform/runtime/modules/atlasmap/xsom/schemas/EAN-UCC/Types.xsd
Normal file
@ -0,0 +1,218 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2017 Oracle
|
||||
|
||||
Licensed 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.
|
||||
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.uc-council.org/smp/schemas/core" xmlns="http://www.uc-council.org/smp/schemas/core" elementFormDefault="unqualified" attributeFormDefault="unqualified" >
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
© Uniform Code Council, Inc. and EAN International, Inc. 2001
|
||||
The Uniform Code Council, Inc. (UCC) is providing this XML Schema Definition file and resultant XML file as a service to interested industries.
|
||||
This XML Schema Definition file and resultant XML file were developed through a consensus process of interested parties.
|
||||
|
||||
Although efforts have been made to assure that the XML Schema Definition file and resultant XML file are correct, reliable, and technically
|
||||
accurate, the UCC makes NO WARRANTY, EXPRESS OR IMPLIED, THAT THIS XML Schema Definition file and resultant XML file ARE
|
||||
CORRECT, WILL NOT REQUIRE MODIFICATION AS EXPERIENCE AND TECHNOLOGICAL ADVANCES DICTATE, OR WILL BE SUITABLE FOR
|
||||
ANY PURPOSE OR WORKABLE IN ANY APPLICATION, OR OTHERWISE. Use of the XML Schema Definition file and resultant XML
|
||||
file are with the understanding that the UCC has no liability for any claim to the contrary, or for any damage or loss of any kind or nature.
|
||||
|
||||
Version Information:
|
||||
Version Number: 1.0
|
||||
Date of creation: July, 2001.
|
||||
|
||||
The schema and subsequent updates will be provided on the EAN and UCC websites.
|
||||
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<!-- FIXED LENGTH STRINGS -->
|
||||
<xsd:simpleType name="String1Type">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:minLength value="1"/>
|
||||
<xsd:maxLength value="1"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="String3Type">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:minLength value="3"/>
|
||||
<xsd:maxLength value="3"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<!-- VARIABLE LENGTH STRINGS -->
|
||||
<xsd:simpleType name="String0to3Type">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:minLength value="0"/>
|
||||
<xsd:maxLength value="3"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="String1to2Type">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:minLength value="1"/>
|
||||
<xsd:maxLength value="2"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="String1to3Type">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:minLength value="1"/>
|
||||
<xsd:maxLength value="3"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="String1to4Type">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:minLength value="1"/>
|
||||
<xsd:maxLength value="4"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="String1to6Type">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:minLength value="1"/>
|
||||
<xsd:maxLength value="6"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="String1to9Type">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:minLength value="1"/>
|
||||
<xsd:maxLength value="9"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="String1to10Type">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:minLength value="1"/>
|
||||
<xsd:maxLength value="10"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="String1to17Type">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:minLength value="1"/>
|
||||
<xsd:maxLength value="17"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="String1to20Type">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:minLength value="1"/>
|
||||
<xsd:maxLength value="20"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="String1to35Type">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:minLength value="1"/>
|
||||
<xsd:maxLength value="35"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="String1to80Type">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:minLength value="1"/>
|
||||
<xsd:maxLength value="80"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="String1to70Type">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:minLength value="1"/>
|
||||
<xsd:maxLength value="70"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<!-- FIXED LENGTH INTEGER -->
|
||||
<xsd:simpleType name="Integer13Type">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:pattern value="\d{13}"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="Integer14Type">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:pattern value="\d{14}"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="Integer18Type">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:pattern value="\d{18}"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<!-- VARIABLE LENGTH INTEGER -->
|
||||
<xsd:simpleType name="Integer1to2Type">
|
||||
<xsd:restriction base="xsd:nonNegativeInteger">
|
||||
<xsd:totalDigits value="2"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="Integer1to3Type">
|
||||
<xsd:restriction base="xsd:nonNegativeInteger">
|
||||
<xsd:totalDigits value="3"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="Integer1to4Type">
|
||||
<xsd:restriction base="xsd:nonNegativeInteger">
|
||||
<xsd:totalDigits value="4"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="Integer1to6Type">
|
||||
<xsd:restriction base="xsd:nonNegativeInteger">
|
||||
<xsd:totalDigits value="6"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="Integer1to12Type">
|
||||
<xsd:restriction base="xsd:nonNegativeInteger">
|
||||
<xsd:totalDigits value="12"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="Integer1to14Type">
|
||||
<xsd:restriction base="xsd:nonNegativeInteger">
|
||||
<xsd:totalDigits value="14"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="Integer1to15Type">
|
||||
<xsd:restriction base="xsd:nonNegativeInteger">
|
||||
<xsd:totalDigits value="15"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="Integer1to35Type">
|
||||
<xsd:restriction base="xsd:nonNegativeInteger">
|
||||
<xsd:totalDigits value="35"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<!-- FLOAT -->
|
||||
<xsd:simpleType name="Float1to14Type">
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:totalDigits value="14"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="Float1to15Type">
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:totalDigits value="15"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="Float1to18Type">
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:totalDigits value="18"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<!-- SIMPLE FLOAT ( floating precision of 2 ) -->
|
||||
<xsd:simpleType name="SimpleFloat1to2Type">
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:totalDigits value="2"/>
|
||||
<xsd:fractionDigits value="2"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="SimpleFloat1to3Type">
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:totalDigits value="3"/>
|
||||
<xsd:fractionDigits value="2"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="SimpleFloat1to10Type">
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:totalDigits value="5"/>
|
||||
<xsd:fractionDigits value="5"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
256
platform/runtime/modules/atlasmap/xsom/src/attribute.rng
Normal file
256
platform/runtime/modules/atlasmap/xsom/src/attribute.rng
Normal file
@ -0,0 +1,256 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
|
||||
Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
The contents of this file are subject to the terms of either the GNU
|
||||
General Public License Version 2 only ("GPL") or the Common Development
|
||||
and Distribution License("CDDL") (collectively, the "License"). You
|
||||
may not use this file except in compliance with the License. You can
|
||||
obtain a copy of the License at
|
||||
http://glassfish.java.net/public/CDDL+GPL_1_1.html
|
||||
or packager/legal/LICENSE.txt. See the License for the specific
|
||||
language governing permissions and limitations under the License.
|
||||
|
||||
When distributing the software, include this License Header Notice in each
|
||||
file and include the License file at packager/legal/LICENSE.txt.
|
||||
|
||||
GPL Classpath Exception:
|
||||
Oracle designates this particular file as subject to the "Classpath"
|
||||
exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
file that accompanied this code.
|
||||
|
||||
Modifications:
|
||||
If applicable, add the following below the License Header, with the fields
|
||||
enclosed by brackets [] replaced by your own identifying information:
|
||||
"Portions Copyright [year] [name of copyright owner]"
|
||||
|
||||
Contributor(s):
|
||||
If you wish your version of this file to be governed by only the CDDL or
|
||||
only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
elects to include this software in this distribution under the [CDDL or GPL
|
||||
Version 2] license." If you don't indicate a single choice of license, a
|
||||
recipient has the option to distribute your version of this file under
|
||||
either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
its licensees as provided above. However, if you add GPL Version 2 code
|
||||
and therefore, elected the GPL Version 2 license, then the option applies
|
||||
only if the new code is made subject to such option by the copyright
|
||||
holder.
|
||||
|
||||
-->
|
||||
|
||||
<grammar
|
||||
ns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:cc="http://www.xml.gr.jp/xmlns/relaxngcc"
|
||||
xmlns="http://relaxng.org/ns/structure/1.0"
|
||||
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
|
||||
>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<define name="attributeDeclBody"
|
||||
cc:params="Locator locator, boolean isLocal,String defaultValue,String fixedValue"
|
||||
cc:return-type="AttributeDeclImpl" cc:return-value="makeResult()">
|
||||
|
||||
<cc:java-body>
|
||||
private boolean form;
|
||||
private boolean formSpecified = false;
|
||||
|
||||
private AttributeDeclImpl makeResult() {
|
||||
|
||||
if(type==null)
|
||||
// type defaults to anySimpleType
|
||||
type = $runtime.parser.schemaSet.anySimpleType;
|
||||
|
||||
if(!formSpecified) form = $runtime.attributeFormDefault;
|
||||
// global attributes are always qualified
|
||||
if(!isLocal) form = true;
|
||||
|
||||
String tns;
|
||||
if(form==true) tns = $runtime.currentSchema.getTargetNamespace();
|
||||
else tns = "";
|
||||
|
||||
// proper handling of anonymous types
|
||||
return new AttributeDeclImpl( $runtime.document, tns, name,
|
||||
annotation, locator, fa, isLocal,
|
||||
$runtime.createXmlString(defaultValue),
|
||||
$runtime.createXmlString(fixedValue),
|
||||
type );
|
||||
}
|
||||
private Ref.SimpleType type;
|
||||
</cc:java-body>
|
||||
|
||||
<optional>
|
||||
<attribute name="form">
|
||||
<ref name="qualification" cc:alias="form" />
|
||||
formSpecified = true;
|
||||
</attribute>
|
||||
</optional>
|
||||
<!--optional>
|
||||
<attribute name="id">
|
||||
<data type="ID"/>
|
||||
</attribute>
|
||||
</optional-->
|
||||
<attribute name="name">
|
||||
<data type="NCName" cc:alias="name"/>
|
||||
</attribute>
|
||||
fa = <ref name="foreignAttributes"/>(fa);
|
||||
<optional>
|
||||
<ref name="annotation" cc:alias="annotation"/>(null,AnnotationContext.ATTRIBUTE_DECL);
|
||||
</optional>
|
||||
<choice>
|
||||
<empty/> <!-- default to anySimpleType -->
|
||||
<attribute name="type">
|
||||
<ref name="qname" cc:alias="typeName"/>
|
||||
<cc:java>
|
||||
type = new DelayedRef.SimpleType(
|
||||
$runtime, locator, $runtime.currentSchema, typeName );
|
||||
</cc:java>
|
||||
</attribute>
|
||||
<ref name="simpleType" cc:alias="type"/>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
|
||||
|
||||
|
||||
<define name="attributeGroupDecl"
|
||||
cc:return-type="AttGroupDeclImpl" cc:return-value="result">
|
||||
|
||||
<cc:java-body>
|
||||
private AttGroupDeclImpl result;
|
||||
private Locator locator;
|
||||
</cc:java-body>
|
||||
<element name="attributeGroup">
|
||||
<cc:java>locator=$runtime.copyLocator();</cc:java>
|
||||
<attribute name="name">
|
||||
<data type="NCName" cc:alias="name"/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="id">
|
||||
<data type="ID"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
fa = <ref name="foreignAttributes"/>(fa);
|
||||
<optional>
|
||||
<ref name="annotation" cc:alias="annotation"/>(null,AnnotationContext.ATTRIBUTE_GROUP);
|
||||
</optional>
|
||||
<cc:java>
|
||||
result = new AttGroupDeclImpl(
|
||||
$runtime.document, annotation, locator, fa, name );
|
||||
</cc:java>
|
||||
<ref name="attributeUses" cc:with-params="result"/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
|
||||
|
||||
<define name="attributeUses" cc:params="AttributesHolder owner">
|
||||
<cc:java-body>
|
||||
private Ref.Attribute decl;
|
||||
private Locator wloc; // locator for wildcards
|
||||
private Locator locator;
|
||||
</cc:java-body>
|
||||
|
||||
<zeroOrMore>
|
||||
<choice>
|
||||
<!-- attribute use -->
|
||||
<element name="attribute">
|
||||
<cc:java>
|
||||
locator=$runtime.copyLocator();
|
||||
use=null;
|
||||
defaultValue=null;
|
||||
fixedValue=null;
|
||||
decl=null;
|
||||
annotation=null;
|
||||
</cc:java>
|
||||
<optional>
|
||||
<attribute name="use">
|
||||
<text cc:alias="use" />
|
||||
<!--choice>
|
||||
<value>optional</value>
|
||||
<value>prohibited</value>
|
||||
<value>required</value>
|
||||
</choice-->
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="default" cc:alias="defaultValue"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="fixed" cc:alias="fixedValue"/>
|
||||
</optional>
|
||||
<choice>
|
||||
<group>
|
||||
<ref name="attributeDeclBody" cc:alias="anonymousDecl"
|
||||
cc:with-params="locator,true,defaultValue,fixedValue"/><!-- anonymous attribute decl -->
|
||||
<cc:java>
|
||||
decl = anonymousDecl;
|
||||
attDeclName = new UName(
|
||||
anonymousDecl.getTargetNamespace(),
|
||||
anonymousDecl.getName());
|
||||
defaultValue = null;
|
||||
fixedValue = null;
|
||||
</cc:java>
|
||||
</group>
|
||||
<group>
|
||||
<attribute name="ref" cc:workaround-significant="yes">
|
||||
<!-- @workaround-significant avoids a bug in RelaxNGCC
|
||||
see https://sourceforge.net/tracker/index.php?func=detail&aid=579864&group_id=53706&atid=471312
|
||||
-->
|
||||
<ref name="qname" cc:alias="attDeclName"/>
|
||||
<cc:java>
|
||||
decl = new DelayedRef.Attribute(
|
||||
$runtime, locator, $runtime.currentSchema, attDeclName );
|
||||
</cc:java>
|
||||
</attribute>
|
||||
<optional>
|
||||
<ref name="annotation" cc:alias="annotation"/>(null,AnnotationContext.ATTRIBUTE_USE);
|
||||
</optional>
|
||||
fa = <ref name="foreignAttributes" />(null);
|
||||
</group>
|
||||
</choice>
|
||||
<cc:java>
|
||||
if("prohibited".equals(use))
|
||||
owner.addProhibitedAttribute(attDeclName);
|
||||
else
|
||||
owner.addAttributeUse(attDeclName,
|
||||
new AttributeUseImpl( $runtime.document, annotation,locator,fa,decl,
|
||||
$runtime.createXmlString(defaultValue),
|
||||
$runtime.createXmlString(fixedValue),
|
||||
"required".equals(use)));
|
||||
</cc:java>
|
||||
</element>
|
||||
<!-- attribute group reference -->
|
||||
<element name="attributeGroup">
|
||||
<cc:java>locator=$runtime.copyLocator();</cc:java>
|
||||
<attribute name="ref">
|
||||
<ref name="qname" cc:alias="groupName"/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<ref name="annotation" />(null,AnnotationContext.ATTRIBUTE_USE);
|
||||
</optional>
|
||||
<cc:java>
|
||||
owner.addAttGroup(new DelayedRef.AttGroup(
|
||||
$runtime, locator, $runtime.currentSchema, groupName ));
|
||||
</cc:java>
|
||||
</element>
|
||||
</choice>
|
||||
</zeroOrMore>
|
||||
<optional>
|
||||
<element name="anyAttribute">
|
||||
<cc:java>wloc = $runtime.copyLocator();</cc:java>
|
||||
<ref name="wildcardBody" cc:alias="wildcard" cc:with-params="wloc" />
|
||||
<cc:java>
|
||||
owner.setWildcard(wildcard);
|
||||
</cc:java>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
|
||||
|
||||
</grammar>
|
@ -0,0 +1,76 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
import org.relaxng.datatype.ValidationContext;
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.Locator;
|
||||
|
||||
/**
|
||||
* Foreign attributes on schema elements.
|
||||
*
|
||||
* <p>
|
||||
* This is not a schema component as defined in the spec,
|
||||
* but this is often useful for a schema processing application.
|
||||
*
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
public interface ForeignAttributes extends Attributes {
|
||||
/**
|
||||
* Returns context information of the element to which foreign attributes
|
||||
* are attached.
|
||||
*
|
||||
* <p>
|
||||
* For example, this can be used to resolve relative references to other resources
|
||||
* (by using {@link ValidationContext#getBaseUri()}) or to resolve
|
||||
* namespace prefixes in the attribute values (by using {@link ValidationContext#resolveNamespacePrefix(String)}.
|
||||
*
|
||||
* @return
|
||||
* always non-null.
|
||||
*/
|
||||
ValidationContext getContext();
|
||||
|
||||
/**
|
||||
* Returns the location of the element to which foreign attributes
|
||||
* are attached.
|
||||
*/
|
||||
Locator getLocator();
|
||||
}
|
@ -0,0 +1,192 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.namespace.NamespaceContext;
|
||||
|
||||
import com.sun.xml.xsom.impl.scd.Iterators;
|
||||
import com.sun.xml.xsom.impl.scd.ParseException;
|
||||
import com.sun.xml.xsom.impl.scd.SCDImpl;
|
||||
import com.sun.xml.xsom.impl.scd.SCDParser;
|
||||
import com.sun.xml.xsom.impl.scd.Step;
|
||||
import com.sun.xml.xsom.impl.scd.TokenMgrError;
|
||||
import com.sun.xml.xsom.util.DeferedCollection;
|
||||
|
||||
/**
|
||||
* Schema Component Designator (SCD).
|
||||
*
|
||||
* <p>
|
||||
* SCD for schema is what XPath is for XML. SCD allows you to select a schema component(s)
|
||||
* from a schema component(s).
|
||||
*
|
||||
* <p>
|
||||
* See <a href="http://www.w3.org/TR/2005/WD-xmlschema-ref-20050329/">XML Schema: Component Designators</a>.
|
||||
* This implementation is based on 03/29/2005 working draft.
|
||||
*
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
public abstract class SCD {
|
||||
|
||||
/**
|
||||
* Parses the string representation of SCD.
|
||||
*
|
||||
* <p>
|
||||
* This method involves parsing the path expression and preparing the in-memory
|
||||
* structure, so this is useful when you plan to use the same SCD against
|
||||
* different context node multiple times.
|
||||
*
|
||||
* <p>
|
||||
* If you want to evaluate SCD just once, use {@link XSComponent#select} methods.
|
||||
*
|
||||
* @param path
|
||||
* the string representation of SCD, such as "/foo/bar".
|
||||
* @param nsContext
|
||||
* Its {@link NamespaceContext#getNamespaceURI(String)} is used
|
||||
* to resolve prefixes in the SCD to the namespace URI.
|
||||
*/
|
||||
public static SCD create(String path, NamespaceContext nsContext) throws java.text.ParseException {
|
||||
try {
|
||||
SCDParser p = new SCDParser(path,nsContext);
|
||||
List<?> list = p.RelativeSchemaComponentPath();
|
||||
return new SCDImpl(path,list.toArray(new Step[list.size()]));
|
||||
} catch (TokenMgrError e) {
|
||||
throw setCause(new java.text.ParseException(e.getMessage(), -1 ),e);
|
||||
} catch (ParseException e) {
|
||||
throw setCause(new java.text.ParseException(e.getMessage(), e.currentToken.beginColumn ),e);
|
||||
}
|
||||
}
|
||||
|
||||
private static java.text.ParseException setCause(java.text.ParseException e, Throwable x) {
|
||||
e.initCause(x);
|
||||
return e;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the SCD against the given context node and
|
||||
* returns the matched nodes.
|
||||
*
|
||||
* @return
|
||||
* could be empty but never be null.
|
||||
*/
|
||||
public final Collection<XSComponent> select(XSComponent contextNode) {
|
||||
return new DeferedCollection<XSComponent>(select(Iterators.singleton(contextNode)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the SCD against the whole schema and
|
||||
* returns the matched nodes.
|
||||
*
|
||||
* <p>
|
||||
* This method is here because {@link XSSchemaSet}
|
||||
* doesn't implement {@link XSComponent}.
|
||||
*
|
||||
* @return
|
||||
* could be empty but never be null.
|
||||
*/
|
||||
public final Collection<XSComponent> select(XSSchemaSet contextNode) {
|
||||
return select(contextNode.getSchemas());
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the SCD against the given context node and
|
||||
* returns the matched node.
|
||||
*
|
||||
* @return
|
||||
* null if the SCD didn't match anything. If the SCD matched more than one node,
|
||||
* the first one will be returned.
|
||||
*/
|
||||
public final XSComponent selectSingle(XSComponent contextNode) {
|
||||
Iterator<XSComponent> r = select(Iterators.singleton(contextNode));
|
||||
if(r.hasNext()) return r.next();
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the SCD against the whole schema set and
|
||||
* returns the matched node.
|
||||
*
|
||||
* @return
|
||||
* null if the SCD didn't match anything. If the SCD matched more than one node,
|
||||
* the first one will be returned.
|
||||
*/
|
||||
public final XSComponent selectSingle(XSSchemaSet contextNode) {
|
||||
Iterator<XSComponent> r = select(contextNode.iterateSchema());
|
||||
if(r.hasNext()) return r.next();
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the SCD against the given set of context nodes and
|
||||
* returns the matched nodes.
|
||||
*
|
||||
* @param contextNodes
|
||||
* {@link XSComponent}s that represent the context node against
|
||||
* which {@link SCD} is evaluated.
|
||||
*
|
||||
* @return
|
||||
* could be empty but never be null.
|
||||
*/
|
||||
public abstract Iterator<XSComponent> select(Iterator<? extends XSComponent> contextNodes);
|
||||
|
||||
/**
|
||||
* Evaluates the SCD against the given set of context nodes and
|
||||
* returns the matched nodes.
|
||||
*
|
||||
* @param contextNodes
|
||||
* {@link XSComponent}s that represent the context node against
|
||||
* which {@link SCD} is evaluated.
|
||||
*
|
||||
* @return
|
||||
* could be empty but never be null.
|
||||
*/
|
||||
public final Collection<XSComponent> select(Collection<? extends XSComponent> contextNodes) {
|
||||
return new DeferedCollection<XSComponent>(select(contextNodes.iterator()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the textual SCD representation as given to {@link SCD#create(String, NamespaceContext)}.
|
||||
*/
|
||||
public abstract String toString();
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
import org.xml.sax.Locator;
|
||||
|
||||
import com.sun.xml.xsom.parser.AnnotationParser;
|
||||
|
||||
/**
|
||||
* <a href="http://www.w3.org/TR/xmlschema-1/#Annotation_details">
|
||||
* XML Schema annotation</a>.
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface XSAnnotation
|
||||
{
|
||||
/**
|
||||
* Obtains the application-parsed annotation.
|
||||
* <p>
|
||||
* annotations are parsed by the user-specified
|
||||
* {@link AnnotationParser}.
|
||||
*
|
||||
* @return may return null
|
||||
*/
|
||||
Object getAnnotation();
|
||||
|
||||
/**
|
||||
* Sets the value to be returned by {@link #getAnnotation()}.
|
||||
*
|
||||
* @param o
|
||||
* can be null.
|
||||
* @return
|
||||
* old value that was replaced by the {@code o}.
|
||||
*/
|
||||
Object setAnnotation(Object o);
|
||||
|
||||
/**
|
||||
* Returns a location information of the annotation.
|
||||
*/
|
||||
Locator getLocator();
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
|
||||
/**
|
||||
* Common aspect of {@link XSComplexType} and {@link XSAttGroupDecl}
|
||||
* as the container of attribute uses/attribute groups.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSAttContainer extends XSDeclaration {
|
||||
XSWildcard getAttributeWildcard();
|
||||
|
||||
/**
|
||||
* Looks for the attribute use with the specified name from
|
||||
* all the attribute uses that are directly/indirectly
|
||||
* referenced from this component.
|
||||
*
|
||||
* <p>
|
||||
* This is the exact implementation of the "attribute use"
|
||||
* schema component.
|
||||
*/
|
||||
XSAttributeUse getAttributeUse( String nsURI, String localName );
|
||||
|
||||
/**
|
||||
* Lists all the attribute uses that are directly/indirectly
|
||||
* referenced from this component.
|
||||
*
|
||||
* <p>
|
||||
* This is the exact implementation of the "attribute use"
|
||||
* schema component.
|
||||
*/
|
||||
Iterator<? extends XSAttributeUse> iterateAttributeUses();
|
||||
|
||||
/**
|
||||
* Gets all the attribute uses.
|
||||
*/
|
||||
Collection<? extends XSAttributeUse> getAttributeUses();
|
||||
|
||||
/**
|
||||
* Looks for the attribute use with the specified name from
|
||||
* the attribute uses which are declared in this complex type.
|
||||
*
|
||||
* This does not include att uses declared in att groups that
|
||||
* are referenced from this complex type, nor does include
|
||||
* att uses declared in base types.
|
||||
*/
|
||||
XSAttributeUse getDeclaredAttributeUse( String nsURI, String localName );
|
||||
|
||||
/**
|
||||
* Lists all the attribute uses that are declared in this complex type.
|
||||
*/
|
||||
Iterator<? extends XSAttributeUse> iterateDeclaredAttributeUses();
|
||||
|
||||
/**
|
||||
* Lists all the attribute uses that are declared in this complex type.
|
||||
*/
|
||||
Collection<? extends XSAttributeUse> getDeclaredAttributeUses();
|
||||
|
||||
|
||||
/**
|
||||
* Iterates all AttGroups which are directly referenced from
|
||||
* this component.
|
||||
*/
|
||||
Iterator<? extends XSAttGroupDecl> iterateAttGroups();
|
||||
|
||||
/**
|
||||
* Iterates all AttGroups which are directly referenced from
|
||||
* this component.
|
||||
*/
|
||||
Collection<? extends XSAttGroupDecl> getAttGroups();
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
/**
|
||||
* Attribute group declaration.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSAttGroupDecl extends XSAttContainer {
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
/**
|
||||
* Attribute declaration.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSAttributeDecl extends XSDeclaration
|
||||
{
|
||||
XSSimpleType getType();
|
||||
|
||||
XmlString getDefaultValue();
|
||||
XmlString getFixedValue();
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
/**
|
||||
* Attribute use.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSAttributeUse extends XSComponent
|
||||
{
|
||||
boolean isRequired();
|
||||
XSAttributeDecl getDecl();
|
||||
|
||||
/**
|
||||
* Gets the default value of this attribute use, if one is specified.
|
||||
*
|
||||
* Note that if a default value is specified in the attribute
|
||||
* declaration, this method returns that value.
|
||||
*/
|
||||
XmlString getDefaultValue();
|
||||
|
||||
/**
|
||||
* Gets the fixed value of this attribute use, if one is specified.
|
||||
*
|
||||
* Note that if a fixed value is specified in the attribute
|
||||
* declaration, this method returns that value.
|
||||
*/
|
||||
XmlString getFixedValue();
|
||||
}
|
@ -0,0 +1,134 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* Complex type.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSComplexType extends XSType, XSAttContainer
|
||||
{
|
||||
/**
|
||||
* Checks if this complex type is declared as an abstract type.
|
||||
*/
|
||||
boolean isAbstract();
|
||||
|
||||
boolean isFinal(int derivationMethod);
|
||||
/**
|
||||
* Roughly corresponds to the block attribute. But see the spec
|
||||
* for gory detail.
|
||||
*/
|
||||
boolean isSubstitutionProhibited(int method);
|
||||
|
||||
/**
|
||||
* Gets the scope of this complex type.
|
||||
* This is not a property defined in the schema spec.
|
||||
*
|
||||
* @return
|
||||
* null if this complex type is global. Otherwise
|
||||
* return the element declaration that contains this anonymous
|
||||
* complex type.
|
||||
*/
|
||||
XSElementDecl getScope();
|
||||
|
||||
/**
|
||||
* The content of this complex type.
|
||||
*
|
||||
* @return
|
||||
* always non-null.
|
||||
*/
|
||||
XSContentType getContentType();
|
||||
|
||||
/**
|
||||
* Gets the explicit content of a complex type with a complex content
|
||||
* that was derived by extension.
|
||||
*
|
||||
* <p>
|
||||
* Informally, the "explicit content" is the portion of the
|
||||
* content model added in this derivation. IOW, it's a delta between
|
||||
* the base complex type and this complex type.
|
||||
*
|
||||
* <p>
|
||||
* For example, when a complex type T2 derives fom T1, then:
|
||||
* <pre>
|
||||
* content type of T2 = SEQUENCE( content type of T1, explicit content of T2 )
|
||||
* </pre>
|
||||
*
|
||||
* @return
|
||||
* If this complex type is derived by restriction or has a
|
||||
* simple content, this method returns null.
|
||||
* IOW, this method only works for a complex type with
|
||||
* a complex content derived by extension from another complex type.
|
||||
*/
|
||||
XSContentType getExplicitContent();
|
||||
|
||||
// meaningful only if getContentType returns particles
|
||||
boolean isMixed();
|
||||
|
||||
/**
|
||||
* If this {@link XSComplexType} is redefined by another complex type,
|
||||
* return that component.
|
||||
*
|
||||
* @return null
|
||||
* if this component has not been redefined.
|
||||
*/
|
||||
public XSComplexType getRedefinedBy();
|
||||
|
||||
/**
|
||||
* Returns a list of direct subtypes of this complex type. If the type is not subtyped, returns empty list.
|
||||
* Doesn't return null.
|
||||
* Note that the complex type may be extended outside of the scope of the schemaset known to XSOM.
|
||||
* @return
|
||||
*/
|
||||
public List<XSComplexType> getSubtypes();
|
||||
|
||||
/**
|
||||
* Returns a list of element declarations of this type.
|
||||
* @return
|
||||
*/
|
||||
public List<XSElementDecl> getElementDecls();
|
||||
|
||||
}
|
@ -0,0 +1,187 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.namespace.NamespaceContext;
|
||||
|
||||
import org.xml.sax.Locator;
|
||||
|
||||
import com.sun.xml.xsom.parser.SchemaDocument;
|
||||
import com.sun.xml.xsom.visitor.XSFunction;
|
||||
import com.sun.xml.xsom.visitor.XSVisitor;
|
||||
|
||||
/**
|
||||
* Base interface for all the schema components.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSComponent
|
||||
{
|
||||
/** Gets the annotation associated to this component, if any. */
|
||||
XSAnnotation getAnnotation();
|
||||
|
||||
/**
|
||||
* Works like {@link #getAnnotation()}, but allow a new empty {@link XSAnnotation} to be created
|
||||
* if not exist.
|
||||
*
|
||||
* @param createIfNotExist
|
||||
* true to create a new {@link XSAnnotation} if it doesn't exist already.
|
||||
* false to make this method behavel like {@link #getAnnotation()}.
|
||||
*
|
||||
* @return
|
||||
* null if {@code createIfNotExist==false} and annotation didn't exist.
|
||||
* Otherwise non-null.
|
||||
*/
|
||||
XSAnnotation getAnnotation(boolean createIfNotExist);
|
||||
|
||||
/**
|
||||
* Gets the foreign attributes on this schema component.
|
||||
*
|
||||
* <p>
|
||||
* In general, a schema component may match multiple elements
|
||||
* in a schema document, and those elements can individually
|
||||
* carry foreign attributes.
|
||||
*
|
||||
* <p>
|
||||
* This method returns a list of {@link ForeignAttributes}, where
|
||||
* each {@link ForeignAttributes} object represent foreign attributes
|
||||
* on one element.
|
||||
*
|
||||
* @return
|
||||
* can be an empty list but never be null.
|
||||
*/
|
||||
List<? extends ForeignAttributes> getForeignAttributes();
|
||||
|
||||
/**
|
||||
* Gets the foreign attribute of the given name, or null if not found.
|
||||
*
|
||||
* <p>
|
||||
* If multiple occurences of the same attribute is found,
|
||||
* this method returns the first one.
|
||||
*
|
||||
* @see #getForeignAttributes()
|
||||
*/
|
||||
String getForeignAttribute(String nsUri, String localName);
|
||||
|
||||
/**
|
||||
* Gets the locator that indicates the source location where
|
||||
* this component is created from, or null if no information is
|
||||
* available.
|
||||
*/
|
||||
Locator getLocator();
|
||||
|
||||
/**
|
||||
* Gets a reference to the {@link XSSchema} object to which this component
|
||||
* belongs.
|
||||
* <p>
|
||||
* In case of <code>XSEmpty</code> component, this method
|
||||
* returns null since there is no owner component.
|
||||
*/
|
||||
XSSchema getOwnerSchema();
|
||||
|
||||
/**
|
||||
* Gets the root schema set that includes this component.
|
||||
*
|
||||
* <p>
|
||||
* In case of <code>XSEmpty</code> component, this method
|
||||
* returns null since there is no owner component.
|
||||
*/
|
||||
XSSchemaSet getRoot();
|
||||
|
||||
/**
|
||||
* Gets the {@link SchemaDocument} that indicates which document this component
|
||||
* was defined in.
|
||||
*
|
||||
* @return
|
||||
* null for components that are built-in to XML Schema, such
|
||||
* as anyType, or "empty" {@link XSContentType}. This method also
|
||||
* returns null for {@link XSSchema}.
|
||||
* For all other user-defined
|
||||
* components this method returns non-null, even if they are local.
|
||||
*/
|
||||
SchemaDocument getSourceDocument();
|
||||
|
||||
/**
|
||||
* Evaluates a schema component designator against this schema component
|
||||
* and returns the resulting schema components.
|
||||
*
|
||||
* @throws IllegalArgumentException
|
||||
* if SCD is syntactically incorrect.
|
||||
*
|
||||
* @param scd
|
||||
* Schema component designator. See {@link SCD} for more details.
|
||||
* @param nsContext
|
||||
* The namespace context in which SCD is evaluated. Cannot be null.
|
||||
* @return
|
||||
* Can be empty but never null.
|
||||
*/
|
||||
Collection<XSComponent> select(String scd, NamespaceContext nsContext);
|
||||
|
||||
/**
|
||||
* Evaluates a schema component designator against this schema component
|
||||
* and returns the first resulting schema component.
|
||||
*
|
||||
* @throws IllegalArgumentException
|
||||
* if SCD is syntactically incorrect.
|
||||
*
|
||||
* @param scd
|
||||
* Schema component designator. See {@link SCD} for more details.
|
||||
* @param nsContext
|
||||
* The namespace context in which SCD is evaluated. Cannot be null.
|
||||
* @return
|
||||
* null if the SCD didn't match anything. If the SCD matched more than one node,
|
||||
* the first one will be returned.
|
||||
*/
|
||||
XSComponent selectSingle(String scd, NamespaceContext nsContext);
|
||||
|
||||
/**
|
||||
* Accepts a visitor.
|
||||
*/
|
||||
void visit( XSVisitor visitor );
|
||||
/**
|
||||
* Accepts a functor.
|
||||
*/
|
||||
<T> T apply( XSFunction<T> function );
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
import com.sun.xml.xsom.visitor.XSContentTypeFunction;
|
||||
import com.sun.xml.xsom.visitor.XSContentTypeVisitor;
|
||||
|
||||
/**
|
||||
* Content of a complex type.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSContentType extends XSComponent
|
||||
{
|
||||
/**
|
||||
* Equivalent of <code>(this instanceof XSSimpleType)?this:null</code>
|
||||
*/
|
||||
XSSimpleType asSimpleType();
|
||||
/**
|
||||
* Equivalent of <code>(this instanceof XSParticle)?this:null</code>
|
||||
*/
|
||||
XSParticle asParticle();
|
||||
/**
|
||||
* If this content type represents the empty content, return <code>this</code>,
|
||||
* otherwise null.
|
||||
*/
|
||||
XSContentType asEmpty();
|
||||
|
||||
<T> T apply( XSContentTypeFunction<T> function );
|
||||
void visit( XSContentTypeVisitor visitor );
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
/**
|
||||
* Base interface of all "declarations".
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSDeclaration extends XSComponent
|
||||
{
|
||||
/**
|
||||
* Target namespace to which this component belongs.
|
||||
* <code>""</code> is used to represent the default no namespace.
|
||||
*/
|
||||
String getTargetNamespace();
|
||||
|
||||
/**
|
||||
* Gets the (local) name of the declaration.
|
||||
*
|
||||
* @return null if this component is anonymous.
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* @deprecated use the isGlobal method, which always returns
|
||||
* the opposite of this function. Or the isLocal method.
|
||||
*/
|
||||
boolean isAnonymous();
|
||||
|
||||
/**
|
||||
* Returns true if this declaration is a global declaration.
|
||||
*
|
||||
* Global declarations are those declaration that can be enumerated
|
||||
* through the schema object.
|
||||
*/
|
||||
boolean isGlobal();
|
||||
|
||||
/**
|
||||
* Returns true if this declaration is a local declaration.
|
||||
* Equivalent of <code>!isGlobal()</code>
|
||||
*/
|
||||
boolean isLocal();
|
||||
}
|
@ -0,0 +1,170 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Element declaration.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSElementDecl extends XSDeclaration, XSTerm
|
||||
{
|
||||
/**
|
||||
* Gets the type of this element declaration.
|
||||
* @return
|
||||
* always non-null.
|
||||
*/
|
||||
XSType getType();
|
||||
|
||||
boolean isNillable();
|
||||
|
||||
/**
|
||||
* Gets the substitution head of this element, if any.
|
||||
* Otherwise null.
|
||||
*/
|
||||
XSElementDecl getSubstAffiliation();
|
||||
|
||||
/**
|
||||
* Returns all the {@link XSIdentityConstraint}s in this element decl.
|
||||
*
|
||||
* @return
|
||||
* never null, but can be empty.
|
||||
*/
|
||||
List<XSIdentityConstraint> getIdentityConstraints();
|
||||
|
||||
/**
|
||||
* Checks the substitution excluded property of the schema component.
|
||||
*
|
||||
* IOW, this checks the value of the <code>final</code> attribute
|
||||
* (plus <code>finalDefault</code>).
|
||||
*
|
||||
* @param method
|
||||
* Possible values are {@link XSType#EXTENSION} or
|
||||
* <code>XSType.RESTRICTION</code>.
|
||||
*/
|
||||
boolean isSubstitutionExcluded(int method);
|
||||
|
||||
/**
|
||||
* Checks the diallowed substitution property of the schema component.
|
||||
*
|
||||
* IOW, this checks the value of the <code>block</code> attribute
|
||||
* (plus <code>blockDefault</code>).
|
||||
*
|
||||
* @param method
|
||||
* Possible values are {@link XSType#EXTENSION},
|
||||
* <code>XSType.RESTRICTION</code>, or <code>XSType.SUBSTITUTION</code>
|
||||
*/
|
||||
boolean isSubstitutionDisallowed(int method);
|
||||
|
||||
boolean isAbstract();
|
||||
|
||||
/**
|
||||
* Returns the element declarations that can substitute
|
||||
* this element.
|
||||
*
|
||||
* <p>
|
||||
* IOW, this set returns all the element decls that satisfies
|
||||
* <a href="http://www.w3.org/TR/xmlschema-1/#cos-equiv-derived-ok-rec">
|
||||
* the "Substitution Group OK" constraint.
|
||||
* </a>
|
||||
*
|
||||
* @return
|
||||
* nun-null valid array. The return value always contains this element
|
||||
* decl itself.
|
||||
*
|
||||
* @deprecated
|
||||
* this method allocates a new array every time, so it could be
|
||||
* inefficient when working with a large schema. Use
|
||||
* {@link #getSubstitutables()} instead.
|
||||
*/
|
||||
XSElementDecl[] listSubstitutables();
|
||||
|
||||
/**
|
||||
* Returns the element declarations that can substitute
|
||||
* this element.
|
||||
*
|
||||
* <p>
|
||||
* IOW, this set returns all the element decls that satisfies
|
||||
* <a href="http://www.w3.org/TR/xmlschema-1/#cos-equiv-derived-ok-rec">
|
||||
* the "Substitution Group OK" constraint.
|
||||
* </a>
|
||||
*
|
||||
* <p>
|
||||
* Note that the above clause does <em>NOT</em> check for
|
||||
* abstract elements. So abstract elements may still show up
|
||||
* in the returned set.
|
||||
*
|
||||
* @return
|
||||
* nun-null unmodifiable list.
|
||||
* The returned list always contains this element decl itself.
|
||||
*/
|
||||
Set<? extends XSElementDecl> getSubstitutables();
|
||||
|
||||
/**
|
||||
* Returns true if this element declaration can be validly substituted
|
||||
* by the given declaration.
|
||||
*
|
||||
* <p>
|
||||
* Just a short cut of {@code getSubstitutables().contain(e);}
|
||||
*/
|
||||
boolean canBeSubstitutedBy(XSElementDecl e);
|
||||
|
||||
// TODO: identitiy constraints
|
||||
// TODO: scope
|
||||
|
||||
XmlString getDefaultValue();
|
||||
XmlString getFixedValue();
|
||||
|
||||
/**
|
||||
* Used for javadoc schema generation
|
||||
*
|
||||
* @return
|
||||
* null if form attribute not present,
|
||||
* true if form attribute present and set to qualified,
|
||||
* false if form attribute present and set to unqualified.
|
||||
*/
|
||||
|
||||
Boolean getForm();
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
/**
|
||||
* Facet for a simple type.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSFacet extends XSComponent
|
||||
{
|
||||
/** Gets the name of the facet, such as "length". */
|
||||
String getName();
|
||||
|
||||
/** Gets the value of the facet. */
|
||||
XmlString getValue();
|
||||
|
||||
/** Returns true if this facet is "fixed". */
|
||||
boolean isFixed();
|
||||
|
||||
|
||||
// well-known facet name constants
|
||||
final static String FACET_LENGTH = "length";
|
||||
final static String FACET_MINLENGTH = "minLength";
|
||||
final static String FACET_MAXLENGTH = "maxLength";
|
||||
final static String FACET_PATTERN = "pattern";
|
||||
final static String FACET_ENUMERATION = "enumeration";
|
||||
final static String FACET_TOTALDIGITS = "totalDigits";
|
||||
final static String FACET_FRACTIONDIGITS = "fractionDigits";
|
||||
final static String FACET_MININCLUSIVE = "minInclusive";
|
||||
final static String FACET_MAXINCLUSIVE = "maxInclusive";
|
||||
final static String FACET_MINEXCLUSIVE = "minExclusive";
|
||||
final static String FACET_MAXEXCLUSIVE = "maxExclusive";
|
||||
final static String FACET_WHITESPACE = "whiteSpace";
|
||||
}
|
@ -0,0 +1,117 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Identity constraint.
|
||||
*
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
public interface XSIdentityConstraint extends XSComponent {
|
||||
|
||||
/**
|
||||
* Gets the {@link XSElementDecl} that owns this identity constraint.
|
||||
*
|
||||
* @return
|
||||
* never null.
|
||||
*/
|
||||
XSElementDecl getParent();
|
||||
|
||||
/**
|
||||
* Name of the identity constraint.
|
||||
*
|
||||
* A name uniquely identifies this {@link XSIdentityConstraint} within
|
||||
* the namespace.
|
||||
*
|
||||
* @return
|
||||
* never null.
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Target namespace of the identity constraint.
|
||||
*
|
||||
* Just short for <code>getParent().getTargetNamespace()</code>.
|
||||
*/
|
||||
String getTargetNamespace();
|
||||
|
||||
/**
|
||||
* Returns the type of the identity constraint.
|
||||
*
|
||||
* @return
|
||||
* either {@link #KEY},{@link #KEYREF}, or {@link #UNIQUE}.
|
||||
*/
|
||||
short getCategory();
|
||||
|
||||
final short KEY = 0;
|
||||
final short KEYREF = 1;
|
||||
final short UNIQUE = 2;
|
||||
|
||||
/**
|
||||
* Returns the selector XPath expression as string.
|
||||
*
|
||||
* @return
|
||||
* never null.
|
||||
*/
|
||||
XSXPath getSelector();
|
||||
|
||||
/**
|
||||
* Returns the list of field XPaths.
|
||||
*
|
||||
* @return
|
||||
* a non-empty read-only list of {@link String}s,
|
||||
* each representing the XPath.
|
||||
*/
|
||||
List<XSXPath> getFields();
|
||||
|
||||
/**
|
||||
* If this is {@link #KEYREF}, returns the key {@link XSIdentityConstraint}
|
||||
* being referenced.
|
||||
*
|
||||
* @return
|
||||
* always non-null (when {@link #getCategory()}=={@link #KEYREF}).
|
||||
* @throws IllegalStateException
|
||||
* if {@link #getCategory()}!={@link #KEYREF}
|
||||
*/
|
||||
XSIdentityConstraint getReferencedKey();
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
/**
|
||||
* List simple type.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSListSimpleType extends XSSimpleType
|
||||
{
|
||||
XSSimpleType getItemType();
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
/**
|
||||
* Model group.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSModelGroup extends XSComponent, XSTerm, Iterable<XSParticle>
|
||||
{
|
||||
/**
|
||||
* Type-safe enumeration for kind of model groups.
|
||||
* Constants are defined in the {@link XSModelGroup} interface.
|
||||
*/
|
||||
public static enum Compositor {
|
||||
ALL("all"),CHOICE("choice"),SEQUENCE("sequence");
|
||||
|
||||
private Compositor(String _value) {
|
||||
this.value = _value;
|
||||
}
|
||||
|
||||
private final String value;
|
||||
/**
|
||||
* Returns the human-readable compositor name.
|
||||
*
|
||||
* @return
|
||||
* Either "all", "sequence", or "choice".
|
||||
*/
|
||||
public String toString() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A constant that represents "all" compositor.
|
||||
*/
|
||||
static final Compositor ALL = Compositor.ALL;
|
||||
/**
|
||||
* A constant that represents "sequence" compositor.
|
||||
*/
|
||||
static final Compositor SEQUENCE = Compositor.SEQUENCE;
|
||||
/**
|
||||
* A constant that represents "choice" compositor.
|
||||
*/
|
||||
static final Compositor CHOICE = Compositor.CHOICE;
|
||||
|
||||
Compositor getCompositor();
|
||||
|
||||
/**
|
||||
* Gets <i>i</i>-ith child.
|
||||
*/
|
||||
XSParticle getChild(int idx);
|
||||
/**
|
||||
* Gets the number of children.
|
||||
*/
|
||||
int getSize();
|
||||
|
||||
/**
|
||||
* Gets all the children in one array.
|
||||
*/
|
||||
XSParticle[] getChildren();
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
|
||||
/**
|
||||
* Named model group declaration.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSModelGroupDecl extends XSDeclaration, XSTerm
|
||||
{
|
||||
/**
|
||||
* Gets the body of this declaration.
|
||||
*/
|
||||
XSModelGroup getModelGroup();
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
/**
|
||||
* Notation declaration.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSNotation extends XSDeclaration {
|
||||
String getPublicId();
|
||||
String getSystemId();
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
/**
|
||||
* Particle schema component.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSParticle extends XSContentType
|
||||
{
|
||||
BigInteger getMinOccurs();
|
||||
/**
|
||||
* Gets the max occurs property.
|
||||
*
|
||||
* @return
|
||||
* {@link UNBOUNDED} will be returned if the value
|
||||
* is "unbounded".
|
||||
*/
|
||||
BigInteger getMaxOccurs();
|
||||
|
||||
/**
|
||||
* True if the maxOccurs is neither 0 or 1.
|
||||
*/
|
||||
boolean isRepeated();
|
||||
|
||||
public static final int UNBOUNDED = -1;
|
||||
|
||||
XSTerm getTerm();
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Restriction simple type.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSRestrictionSimpleType extends XSSimpleType {
|
||||
// TODO
|
||||
|
||||
/** Iterates facets that are specified in this step of derivation. */
|
||||
public Iterator<XSFacet> iterateDeclaredFacets();
|
||||
|
||||
/**
|
||||
* Gets all the facets that are declared on this restriction.
|
||||
*
|
||||
* @return
|
||||
* Can be empty but always non-null.
|
||||
*/
|
||||
public Collection<? extends XSFacet> getDeclaredFacets();
|
||||
|
||||
/**
|
||||
* Gets the declared facet object of the given name.
|
||||
*
|
||||
* <p>
|
||||
* This method returns a facet object that is added in this
|
||||
* type and does not recursively check the ancestors.
|
||||
*
|
||||
* <p>
|
||||
* For those facets that can have multiple values
|
||||
* (pattern facets and enumeration facets), this method
|
||||
* will return only the first one.
|
||||
*
|
||||
* @return
|
||||
* Null if the facet is not specified in the last step
|
||||
* of derivation.
|
||||
*/
|
||||
XSFacet getDeclaredFacet( String name );
|
||||
|
||||
/**
|
||||
* Gets the declared facets of the given name.
|
||||
*
|
||||
* This method is for those facets (such as 'pattern') that
|
||||
* can be specified multiple times on a simple type.
|
||||
*
|
||||
* @return
|
||||
* can be empty but never be null.
|
||||
*/
|
||||
List<XSFacet> getDeclaredFacets( String name );
|
||||
}
|
@ -0,0 +1,154 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import com.sun.xml.xsom.parser.SchemaDocument;
|
||||
|
||||
/**
|
||||
* Schema.
|
||||
*
|
||||
* Container of declarations that belong to the same target namespace.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSSchema extends XSComponent
|
||||
{
|
||||
/**
|
||||
* Gets the target namespace of the schema.
|
||||
*
|
||||
* @return
|
||||
* can be empty, but never be null.
|
||||
*/
|
||||
String getTargetNamespace();
|
||||
|
||||
/**
|
||||
* Gets all the {@link XSAttributeDecl}s in this schema
|
||||
* keyed by their local names.
|
||||
*/
|
||||
Map<String,XSAttributeDecl> getAttributeDecls();
|
||||
Iterator<XSAttributeDecl> iterateAttributeDecls();
|
||||
XSAttributeDecl getAttributeDecl(String localName);
|
||||
|
||||
/**
|
||||
* Gets all the {@link XSElementDecl}s in this schema.
|
||||
*/
|
||||
Map<String,XSElementDecl> getElementDecls();
|
||||
Iterator<XSElementDecl> iterateElementDecls();
|
||||
XSElementDecl getElementDecl(String localName);
|
||||
|
||||
/**
|
||||
* Gets all the {@link XSAttGroupDecl}s in this schema.
|
||||
*/
|
||||
Map<String,XSAttGroupDecl> getAttGroupDecls();
|
||||
Iterator<XSAttGroupDecl> iterateAttGroupDecls();
|
||||
XSAttGroupDecl getAttGroupDecl(String localName);
|
||||
|
||||
/**
|
||||
* Gets all the {@link XSModelGroupDecl}s in this schema.
|
||||
*/
|
||||
Map<String,XSModelGroupDecl> getModelGroupDecls();
|
||||
Iterator<XSModelGroupDecl> iterateModelGroupDecls();
|
||||
XSModelGroupDecl getModelGroupDecl(String localName);
|
||||
|
||||
/**
|
||||
* Gets all the {@link XSType}s in this schema (union of
|
||||
* {@link #getSimpleTypes()} and {@link #getComplexTypes()}
|
||||
*/
|
||||
Map<String,XSType> getTypes();
|
||||
Iterator<XSType> iterateTypes();
|
||||
XSType getType(String localName);
|
||||
|
||||
/**
|
||||
* Gets all the {@link XSSimpleType}s in this schema.
|
||||
*/
|
||||
Map<String,XSSimpleType> getSimpleTypes();
|
||||
Iterator<XSSimpleType> iterateSimpleTypes();
|
||||
XSSimpleType getSimpleType(String localName);
|
||||
|
||||
/**
|
||||
* Gets all the {@link XSComplexType}s in this schema.
|
||||
*/
|
||||
Map<String,XSComplexType> getComplexTypes();
|
||||
Iterator<XSComplexType> iterateComplexTypes();
|
||||
XSComplexType getComplexType(String localName);
|
||||
|
||||
/**
|
||||
* Gets all the {@link XSNotation}s in this schema.
|
||||
*/
|
||||
Map<String,XSNotation> getNotations();
|
||||
Iterator<XSNotation> iterateNotations();
|
||||
XSNotation getNotation(String localName);
|
||||
|
||||
/**
|
||||
* Gets all the {@link XSIdentityConstraint}s in this schema,
|
||||
* keyed by their names.
|
||||
*/
|
||||
Map<String,XSIdentityConstraint> getIdentityConstraints();
|
||||
|
||||
/**
|
||||
* Gets the identity constraint of the given name, or null if not found.
|
||||
*/
|
||||
XSIdentityConstraint getIdentityConstraint(String localName);
|
||||
|
||||
/**
|
||||
* Sine an {@link XSSchema} is not necessarily defined in
|
||||
* one schema document (for example one schema can span across
|
||||
* many documents through <xs:include>s.),
|
||||
* so this method always returns null.
|
||||
*
|
||||
* @deprecated
|
||||
* Since this method always returns null, if you are calling
|
||||
* this method from {@link XSSchema} and not from {@link XSComponent},
|
||||
* there's something wrong with your code.
|
||||
*/
|
||||
SchemaDocument getSourceDocument();
|
||||
|
||||
/**
|
||||
* Gets the root schema set that includes this schema.
|
||||
*
|
||||
* @return never null.
|
||||
*/
|
||||
XSSchemaSet getRoot();
|
||||
}
|
@ -0,0 +1,131 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
|
||||
import javax.xml.namespace.NamespaceContext;
|
||||
|
||||
/**
|
||||
* Set of {@link XSSchema} objects.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSSchemaSet
|
||||
{
|
||||
XSSchema getSchema(String targetNamespace);
|
||||
XSSchema getSchema(int idx);
|
||||
int getSchemaSize();
|
||||
Iterator<XSSchema> iterateSchema();
|
||||
|
||||
/**
|
||||
* Gets all {@link XSSchema}s in a single collection.
|
||||
*/
|
||||
Collection<XSSchema> getSchemas();
|
||||
|
||||
XSType getType(String namespaceURI, String localName);
|
||||
XSSimpleType getSimpleType(String namespaceURI, String localName);
|
||||
XSAttributeDecl getAttributeDecl(String namespaceURI, String localName);
|
||||
XSElementDecl getElementDecl(String namespaceURI, String localName);
|
||||
XSModelGroupDecl getModelGroupDecl(String namespaceURI, String localName);
|
||||
XSAttGroupDecl getAttGroupDecl(String namespaceURI, String localName);
|
||||
XSComplexType getComplexType(String namespaceURI, String localName);
|
||||
XSIdentityConstraint getIdentityConstraint(String namespaceURI, String localName);
|
||||
|
||||
/** Iterates all element declarations in all the schemas. */
|
||||
Iterator<XSElementDecl> iterateElementDecls();
|
||||
/** Iterates all type definitions in all the schemas. */
|
||||
Iterator<XSType> iterateTypes();
|
||||
/** Iterates all atribute declarations in all the schemas. */
|
||||
Iterator<XSAttributeDecl> iterateAttributeDecls();
|
||||
/** Iterates all attribute group declarations in all the schemas. */
|
||||
Iterator<XSAttGroupDecl> iterateAttGroupDecls();
|
||||
/** Iterates all model group declarations in all the schemas. */
|
||||
Iterator<XSModelGroupDecl> iterateModelGroupDecls();
|
||||
/** Iterates all simple type definitions in all the schemas. */
|
||||
Iterator<XSSimpleType> iterateSimpleTypes();
|
||||
/** Iterates all complex type definitions in all the schemas. */
|
||||
Iterator<XSComplexType> iterateComplexTypes();
|
||||
/** Iterates all notation declarations in all the schemas. */
|
||||
Iterator<XSNotation> iterateNotations();
|
||||
/**
|
||||
* Iterates all identity constraints in all the schemas.
|
||||
*/
|
||||
Iterator<XSIdentityConstraint> iterateIdentityConstraints();
|
||||
|
||||
// conceptually static methods
|
||||
XSComplexType getAnyType();
|
||||
XSSimpleType getAnySimpleType();
|
||||
XSContentType getEmpty();
|
||||
|
||||
/**
|
||||
* Evaluates a schema component designator against this schema component
|
||||
* and returns the resulting schema components.
|
||||
*
|
||||
* @throws IllegalArgumentException
|
||||
* if SCD is syntactically incorrect.
|
||||
* @param scd
|
||||
* Schema component designator. See {@link SCD} for more details.
|
||||
* @param nsContext
|
||||
* The namespace context in which SCD is evaluated. Cannot be null.
|
||||
* @return
|
||||
* Can be empty but never null.
|
||||
*/
|
||||
Collection<XSComponent> select(String scd, NamespaceContext nsContext);
|
||||
|
||||
/**
|
||||
* Evaluates a schema component designator against this schema component
|
||||
* and returns the first resulting schema component.
|
||||
*
|
||||
* @throws IllegalArgumentException
|
||||
* if SCD is syntactically incorrect.
|
||||
* @param scd
|
||||
* Schema component designator. See {@link SCD} for more details.
|
||||
* @param nsContext
|
||||
* The namespace context in which SCD is evaluated. Cannot be null.
|
||||
* @return
|
||||
* null if the SCD didn't match anything. If the SCD matched more than one node,
|
||||
* the first one will be returned.
|
||||
*/
|
||||
XSComponent selectSingle(String scd, NamespaceContext nsContext);
|
||||
}
|
@ -0,0 +1,177 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.sun.xml.xsom.visitor.XSSimpleTypeFunction;
|
||||
import com.sun.xml.xsom.visitor.XSSimpleTypeVisitor;
|
||||
|
||||
/**
|
||||
* Simple type.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSSimpleType extends XSType, XSContentType
|
||||
{
|
||||
/**
|
||||
* Gets the base type as XSSimpleType.
|
||||
*
|
||||
* Equivalent to
|
||||
* <code>
|
||||
* (XSSimpleType)getBaseType()
|
||||
* </code>
|
||||
* Since this is a simple type, we know that the base type
|
||||
* is also a simple type.
|
||||
*
|
||||
* The only exception is xs:anySimpleType, which has xs:anyType
|
||||
* as the base type.
|
||||
*
|
||||
* @return
|
||||
* null if this is xs:anySimpleType. Otherwise non-null.
|
||||
*/
|
||||
XSSimpleType getSimpleBaseType();
|
||||
|
||||
/**
|
||||
* Gets the variety of this simple type.
|
||||
*/
|
||||
XSVariety getVariety();
|
||||
|
||||
/**
|
||||
* Gets the ancestor primitive {@link XSSimpleType} if
|
||||
* this type is {@link XSVariety#ATOMIC atomic}.
|
||||
*
|
||||
* @return
|
||||
* null otherwise.
|
||||
*/
|
||||
XSSimpleType getPrimitiveType();
|
||||
|
||||
/**
|
||||
* Returns true if this is a primitive built-in simple type
|
||||
* (that directly derives from xs:anySimpleType, by definition.)
|
||||
*/
|
||||
boolean isPrimitive();
|
||||
|
||||
/**
|
||||
* Gets the nearest ancestor {@link XSListSimpleType} (including itself)
|
||||
* if the variety of this type is {@link XSVariety#LIST list}.
|
||||
*
|
||||
* @return otherwise return null
|
||||
*/
|
||||
XSListSimpleType getBaseListType();
|
||||
|
||||
/**
|
||||
* Gets the nearest ancestor {@link XSUnionSimpleType} (including itself)
|
||||
* if the variety of this type is {@link XSVariety#UNION union}.
|
||||
*
|
||||
* @return otherwise return null
|
||||
*/
|
||||
XSUnionSimpleType getBaseUnionType();
|
||||
|
||||
/**
|
||||
* Returns true if this type definition is marked as 'final'
|
||||
* with respect to the given {@link XSVariety}.
|
||||
*
|
||||
* @return
|
||||
* true if the type is marked final.
|
||||
*/
|
||||
boolean isFinal(XSVariety v);
|
||||
|
||||
/**
|
||||
* If this {@link XSSimpleType} is redefined by another simple type,
|
||||
* return that component.
|
||||
*
|
||||
* @return null
|
||||
* if this component has not been redefined.
|
||||
*/
|
||||
public XSSimpleType getRedefinedBy();
|
||||
|
||||
/**
|
||||
* Gets the effective facet object of the given name.
|
||||
*
|
||||
* <p>
|
||||
* For example, if a simple type "foo" is derived from
|
||||
* xs:string by restriction with the "maxLength" facet and
|
||||
* another simple type "bar" is derived from "foo" by
|
||||
* restriction with another "maxLength" facet, this method
|
||||
* will return the latter one, because that is the most
|
||||
* restrictive, effective facet.
|
||||
*
|
||||
* <p>
|
||||
* For those facets that can have multiple values
|
||||
* (pattern facets and enumeration facets), this method
|
||||
* will return only the first one.
|
||||
* TODO: allow clients to access all of them by some means.
|
||||
*
|
||||
* @return
|
||||
* If this datatype has a facet of the given name,
|
||||
* return that object. If the facet is not specified
|
||||
* anywhere in its derivation chain, null will be returned.
|
||||
*/
|
||||
XSFacet getFacet( String name );
|
||||
|
||||
/**
|
||||
* For multi-valued facets (enumeration and pattern), obtain all values.
|
||||
*
|
||||
* @see #getFacet(String)
|
||||
*
|
||||
* @return
|
||||
* can be empty but never null.
|
||||
*/
|
||||
List<XSFacet> getFacets( String name );
|
||||
|
||||
|
||||
|
||||
void visit( XSSimpleTypeVisitor visitor );
|
||||
<T> T apply( XSSimpleTypeFunction<T> function );
|
||||
|
||||
/** Returns true if <code>this instanceof XSRestrictionSimpleType</code>. */
|
||||
boolean isRestriction();
|
||||
/** Returns true if <code>this instanceof XSListSimpleType</code>. */
|
||||
boolean isList();
|
||||
/** Returns true if <code>this instanceof XSUnionSimpleType</code>. */
|
||||
boolean isUnion();
|
||||
|
||||
XSRestrictionSimpleType asRestriction();
|
||||
XSListSimpleType asList();
|
||||
XSUnionSimpleType asUnion();
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
import com.sun.xml.xsom.visitor.XSTermFunction;
|
||||
import com.sun.xml.xsom.visitor.XSTermFunctionWithParam;
|
||||
import com.sun.xml.xsom.visitor.XSTermVisitor;
|
||||
|
||||
/**
|
||||
* A component that can be referenced from {@link XSParticle}
|
||||
*
|
||||
* This interface provides a set of type check functions (<code>isXXX</code>),
|
||||
* which are essentially:
|
||||
*
|
||||
* <pre>
|
||||
* boolean isXXX() {
|
||||
* return this instanceof XXX;
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* and a set of cast functions (<code>asXXX</code>), which are
|
||||
* essentially:
|
||||
*
|
||||
* <pre>
|
||||
* XXX asXXX() {
|
||||
* if(isXXX()) return (XXX)this;
|
||||
* else return null;
|
||||
* }
|
||||
* </pre>
|
||||
*/
|
||||
public interface XSTerm extends XSComponent
|
||||
{
|
||||
void visit( XSTermVisitor visitor );
|
||||
<T> T apply( XSTermFunction<T> function );
|
||||
<T,P> T apply( XSTermFunctionWithParam<T,P> function, P param );
|
||||
|
||||
// cast functions
|
||||
boolean isWildcard();
|
||||
boolean isModelGroupDecl();
|
||||
boolean isModelGroup();
|
||||
boolean isElementDecl();
|
||||
|
||||
XSWildcard asWildcard();
|
||||
XSModelGroupDecl asModelGroupDecl();
|
||||
XSModelGroup asModelGroup();
|
||||
XSElementDecl asElementDecl();
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
/**
|
||||
* Base interface for {@link XSComplexType} and {@link XSSimpleType}.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSType extends XSDeclaration {
|
||||
/**
|
||||
* Returns the base type of this type.
|
||||
*
|
||||
* Note that if this type represents {@code xs:anyType}, this method returns itself.
|
||||
* This is awkward as an API, but it follows the schema specification.
|
||||
*
|
||||
* @return always non-null.
|
||||
*/
|
||||
XSType getBaseType();
|
||||
|
||||
final static int EXTENSION = 1;
|
||||
final static int RESTRICTION = 2;
|
||||
final static int SUBSTITUTION = 4;
|
||||
|
||||
int getDerivationMethod();
|
||||
|
||||
/** Returns true if <code>this instanceof XSSimpleType</code>. */
|
||||
boolean isSimpleType();
|
||||
/** Returns true if <code>this instanceof XSComplexType</code>. */
|
||||
boolean isComplexType();
|
||||
|
||||
/**
|
||||
* Lists up types that can substitute this type by using xsi:type.
|
||||
* Includes this type itself.
|
||||
* <p>
|
||||
* This method honors the block flag.
|
||||
*/
|
||||
XSType[] listSubstitutables();
|
||||
|
||||
/**
|
||||
* If this {@link XSType} is redefined by another type,
|
||||
* return that component.
|
||||
*
|
||||
* @return null
|
||||
* if this component has not been redefined.
|
||||
*/
|
||||
XSType getRedefinedBy();
|
||||
|
||||
/**
|
||||
* Returns the number of complex types that redefine this component.
|
||||
*
|
||||
* <p>
|
||||
* For example, if A is redefined by B and B is redefined by C,
|
||||
* A.getRedefinedCount()==2, B.getRedefinedCount()==1, and
|
||||
* C.getRedefinedCount()==0.
|
||||
*/
|
||||
int getRedefinedCount();
|
||||
|
||||
|
||||
/** Casts this object to XSSimpleType if possible, otherwise returns null. */
|
||||
XSSimpleType asSimpleType();
|
||||
/** Casts this object to XSComplexType if possible, otherwise returns null. */
|
||||
XSComplexType asComplexType();
|
||||
|
||||
/**
|
||||
* Returns true if this type is derived from the specified type.
|
||||
*
|
||||
* <p>
|
||||
* Note that {@code t.isDerivedFrom(t)} returns true.
|
||||
*/
|
||||
boolean isDerivedFrom( XSType t );
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
/**
|
||||
* Union simple type.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface XSUnionSimpleType extends XSSimpleType, Iterable<XSSimpleType>
|
||||
{
|
||||
XSSimpleType getMember(int idx);
|
||||
int getMemberSize();
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
/**
|
||||
* Constants that represent variety of simple types.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke,kawaguchi@sun.com)
|
||||
*/
|
||||
public final class XSVariety {
|
||||
public static final XSVariety ATOMIC = new XSVariety("atomic");
|
||||
public static final XSVariety UNION = new XSVariety("union");
|
||||
public static final XSVariety LIST = new XSVariety("list");
|
||||
|
||||
private XSVariety(String _name) { this.name=_name; }
|
||||
private final String name;
|
||||
public String toString() { return name; }
|
||||
}
|
||||
|
@ -0,0 +1,110 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.sun.xml.xsom.visitor.XSWildcardFunction;
|
||||
import com.sun.xml.xsom.visitor.XSWildcardVisitor;
|
||||
|
||||
/**
|
||||
* Wildcard schema component (used for both attribute wildcard
|
||||
* and element wildcard.)
|
||||
*
|
||||
* XSWildcard interface can always be downcasted to either
|
||||
* Any, Other, or Union.
|
||||
*/
|
||||
public interface XSWildcard extends XSComponent, XSTerm
|
||||
{
|
||||
static final int LAX = 1;
|
||||
static final int STRTICT = 2;
|
||||
static final int SKIP = 3;
|
||||
/**
|
||||
* Gets the processing mode.
|
||||
*
|
||||
* @return
|
||||
* Either LAX, STRICT, or SKIP.
|
||||
*/
|
||||
int getMode();
|
||||
|
||||
/**
|
||||
* Returns true if the specified namespace URI is valid
|
||||
* wrt this wildcard.
|
||||
*
|
||||
* @param namespaceURI
|
||||
* Use the empty string to test the default no-namespace.
|
||||
*/
|
||||
boolean acceptsNamespace(String namespaceURI);
|
||||
|
||||
/** Visitor support. */
|
||||
void visit(XSWildcardVisitor visitor);
|
||||
<T> T apply(XSWildcardFunction<T> function);
|
||||
|
||||
/**
|
||||
* <code>##any</code> wildcard.
|
||||
*/
|
||||
interface Any extends XSWildcard {
|
||||
}
|
||||
/**
|
||||
* <code>##other</code> wildcard.
|
||||
*/
|
||||
interface Other extends XSWildcard {
|
||||
/**
|
||||
* Gets the namespace URI excluded from this wildcard.
|
||||
*/
|
||||
String getOtherNamespace();
|
||||
}
|
||||
/**
|
||||
* Wildcard of a set of namespace URIs.
|
||||
*/
|
||||
interface Union extends XSWildcard {
|
||||
/**
|
||||
* Short for <code>getNamespaces().iterator()</code>
|
||||
*/
|
||||
Iterator<String> iterateNamespaces();
|
||||
|
||||
/**
|
||||
* Read-only list of namespace URIs.
|
||||
*/
|
||||
Collection<String> getNamespaces();
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
/**
|
||||
* Selector or field of {@link XSIdentityConstraint}.
|
||||
*
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
public interface XSXPath extends XSComponent {
|
||||
|
||||
/**
|
||||
* Returns the {@link XSIdentityConstraint} to which
|
||||
* this XPath belongs to.
|
||||
*
|
||||
* @return
|
||||
* never null.
|
||||
*/
|
||||
XSIdentityConstraint getParent();
|
||||
|
||||
/**
|
||||
* Gets the XPath as a string.
|
||||
*
|
||||
* @return
|
||||
* never null.
|
||||
*/
|
||||
XmlString getXPath();
|
||||
}
|
@ -0,0 +1,132 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom;
|
||||
|
||||
import org.relaxng.datatype.ValidationContext;
|
||||
|
||||
/**
|
||||
* String with in-scope namespace binding information.
|
||||
*
|
||||
* <p>
|
||||
* In a general case, text (PCDATA/attributes) that appear in XML schema
|
||||
* cannot be correctly interpreted unless you also have in-scope namespace
|
||||
* binding (a case in point is QName.) Therefore, it's convenient to
|
||||
* handle the lexical representation and the in-scope namespace binding
|
||||
* in a pair.
|
||||
*
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
public final class XmlString {
|
||||
/**
|
||||
* Textual value. AKA lexical representation.
|
||||
*/
|
||||
public final String value;
|
||||
|
||||
/**
|
||||
* Used to resole in-scope namespace bindings.
|
||||
*/
|
||||
public final ValidationContext context;
|
||||
|
||||
/**
|
||||
* Creates a new {@link XmlString} from a lexical representation and in-scope namespaces.
|
||||
*/
|
||||
public XmlString(String value, ValidationContext context) {
|
||||
this.value = value;
|
||||
this.context = context;
|
||||
if(context==null)
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new {@link XmlString} with empty in-scope namespace bindings.
|
||||
*/
|
||||
public XmlString(String value) {
|
||||
this(value,NULL_CONTEXT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves a namespace prefix to the corresponding namespace URI.
|
||||
*
|
||||
* This method is used for resolving prefixes in the {@link #value}
|
||||
* (such as when {@link #value} represents a QName type.)
|
||||
*
|
||||
* <p>
|
||||
* If the prefix is "" (empty string), the method
|
||||
* returns the default namespace URI.
|
||||
*
|
||||
* <p>
|
||||
* If the prefix is "xml", then the method returns
|
||||
* "http://www.w3.org/XML/1998/namespace",
|
||||
* as defined in the XML Namespaces Recommendation.
|
||||
*
|
||||
* @return
|
||||
* namespace URI of this prefix.
|
||||
* If the specified prefix is not declared,
|
||||
* the implementation returns null.
|
||||
*/
|
||||
public final String resolvePrefix(String prefix) {
|
||||
return context.resolveNamespacePrefix(prefix);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return value;
|
||||
}
|
||||
|
||||
private static final ValidationContext NULL_CONTEXT = new ValidationContext() {
|
||||
public String resolveNamespacePrefix(String s) {
|
||||
if(s.length()==0) return "";
|
||||
if(s.equals("xml")) return "http://www.w3.org/XML/1998/namespace";
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getBaseUri() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isUnparsedEntity(String s) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isNotation(String s) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom.impl;
|
||||
|
||||
import org.xml.sax.Locator;
|
||||
import org.xml.sax.helpers.LocatorImpl;
|
||||
|
||||
import com.sun.xml.xsom.XSAnnotation;
|
||||
|
||||
public class AnnotationImpl implements XSAnnotation
|
||||
{
|
||||
private Object annotation;
|
||||
public Object getAnnotation() { return annotation; }
|
||||
|
||||
public Object setAnnotation(Object o) {
|
||||
Object r = this.annotation;
|
||||
this.annotation = o;
|
||||
return r;
|
||||
}
|
||||
|
||||
private final Locator locator;
|
||||
public Locator getLocator() { return locator; }
|
||||
|
||||
public AnnotationImpl( Object o, Locator _loc ) {
|
||||
this.annotation = o;
|
||||
this.locator = _loc;
|
||||
}
|
||||
|
||||
public AnnotationImpl() {
|
||||
locator = NULL_LOCATION;
|
||||
}
|
||||
|
||||
private static class LocatorImplUnmodifiable extends LocatorImpl {
|
||||
|
||||
@Override
|
||||
public void setColumnNumber(int columnNumber) {
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPublicId(String publicId) {
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSystemId(String systemId) {
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLineNumber(int lineNumber) {
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
private static final LocatorImplUnmodifiable NULL_LOCATION = new LocatorImplUnmodifiable();
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom.impl;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.xml.sax.Locator;
|
||||
|
||||
import com.sun.xml.xsom.XSAttGroupDecl;
|
||||
import com.sun.xml.xsom.XSAttributeUse;
|
||||
import com.sun.xml.xsom.XSWildcard;
|
||||
import com.sun.xml.xsom.impl.parser.DelayedRef;
|
||||
import com.sun.xml.xsom.impl.parser.SchemaDocumentImpl;
|
||||
import com.sun.xml.xsom.visitor.XSFunction;
|
||||
import com.sun.xml.xsom.visitor.XSVisitor;
|
||||
|
||||
public class AttGroupDeclImpl extends AttributesHolder implements XSAttGroupDecl
|
||||
{
|
||||
public AttGroupDeclImpl( SchemaDocumentImpl _parent, AnnotationImpl _annon,
|
||||
Locator _loc, ForeignAttributesImpl _fa, String _name, WildcardImpl _wildcard ) {
|
||||
|
||||
this(_parent,_annon,_loc,_fa,_name);
|
||||
setWildcard(_wildcard);
|
||||
}
|
||||
|
||||
public AttGroupDeclImpl( SchemaDocumentImpl _parent, AnnotationImpl _annon,
|
||||
Locator _loc, ForeignAttributesImpl _fa, String _name ) {
|
||||
|
||||
super(_parent,_annon,_loc,_fa,_name,false);
|
||||
}
|
||||
|
||||
|
||||
private WildcardImpl wildcard;
|
||||
public void setWildcard( WildcardImpl wc ) { wildcard=wc; }
|
||||
public XSWildcard getAttributeWildcard() { return wildcard; }
|
||||
|
||||
public XSAttributeUse getAttributeUse( String nsURI, String localName ) {
|
||||
UName name = new UName(nsURI,localName);
|
||||
XSAttributeUse o=null;
|
||||
|
||||
Iterator itr = iterateAttGroups();
|
||||
while(itr.hasNext() && o==null)
|
||||
o = ((XSAttGroupDecl)itr.next()).getAttributeUse(nsURI,localName);
|
||||
|
||||
if(o==null) o = attributes.get(name);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
public void redefine( AttGroupDeclImpl ag ) {
|
||||
for (Iterator itr = attGroups.iterator(); itr.hasNext();) {
|
||||
DelayedRef.AttGroup r = (DelayedRef.AttGroup) itr.next();
|
||||
r.redefine(ag);
|
||||
}
|
||||
}
|
||||
|
||||
public void visit( XSVisitor visitor ) {
|
||||
visitor.attGroupDecl(this);
|
||||
}
|
||||
public Object apply( XSFunction function ) {
|
||||
return function.attGroupDecl(this);
|
||||
}
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom.impl;
|
||||
|
||||
import org.xml.sax.Locator;
|
||||
|
||||
import com.sun.xml.xsom.XSAttributeDecl;
|
||||
import com.sun.xml.xsom.XSSimpleType;
|
||||
import com.sun.xml.xsom.XmlString;
|
||||
import com.sun.xml.xsom.impl.parser.SchemaDocumentImpl;
|
||||
import com.sun.xml.xsom.visitor.XSFunction;
|
||||
import com.sun.xml.xsom.visitor.XSVisitor;
|
||||
|
||||
public class AttributeDeclImpl extends DeclarationImpl implements XSAttributeDecl, Ref.Attribute
|
||||
{
|
||||
public AttributeDeclImpl( SchemaDocumentImpl owner,
|
||||
String _targetNamespace, String _name,
|
||||
AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa, boolean _anonymous,
|
||||
XmlString _defValue, XmlString _fixedValue,
|
||||
Ref.SimpleType _type ) {
|
||||
|
||||
super(owner,_annon,_loc,_fa,_targetNamespace,_name,_anonymous);
|
||||
|
||||
if(_name==null) // assertion failed.
|
||||
throw new IllegalArgumentException();
|
||||
|
||||
this.defaultValue = _defValue;
|
||||
this.fixedValue = _fixedValue;
|
||||
this.type = _type;
|
||||
}
|
||||
|
||||
private final Ref.SimpleType type;
|
||||
public XSSimpleType getType() { return type.getType(); }
|
||||
|
||||
private final XmlString defaultValue;
|
||||
public XmlString getDefaultValue() { return defaultValue; }
|
||||
|
||||
private final XmlString fixedValue;
|
||||
public XmlString getFixedValue() { return fixedValue; }
|
||||
|
||||
public void visit( XSVisitor visitor ) {
|
||||
visitor.attributeDecl(this);
|
||||
}
|
||||
public Object apply( XSFunction function ) {
|
||||
return function.attributeDecl(this);
|
||||
}
|
||||
|
||||
|
||||
// Ref.Attribute implementation
|
||||
public XSAttributeDecl getAttribute() { return this; }
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom.impl;
|
||||
|
||||
import org.xml.sax.Locator;
|
||||
|
||||
import com.sun.xml.xsom.XSAttributeDecl;
|
||||
import com.sun.xml.xsom.XSAttributeUse;
|
||||
import com.sun.xml.xsom.XmlString;
|
||||
import com.sun.xml.xsom.impl.parser.SchemaDocumentImpl;
|
||||
import com.sun.xml.xsom.visitor.XSFunction;
|
||||
import com.sun.xml.xsom.visitor.XSVisitor;
|
||||
|
||||
public class AttributeUseImpl extends ComponentImpl implements XSAttributeUse
|
||||
{
|
||||
public AttributeUseImpl( SchemaDocumentImpl owner, AnnotationImpl ann, Locator loc, ForeignAttributesImpl fa, Ref.Attribute _decl,
|
||||
XmlString def, XmlString fixed, boolean req ) {
|
||||
|
||||
super(owner,ann,loc,fa);
|
||||
|
||||
this.att = _decl;
|
||||
this.defaultValue = def;
|
||||
this.fixedValue = fixed;
|
||||
this.required = req;
|
||||
}
|
||||
|
||||
private final Ref.Attribute att;
|
||||
public XSAttributeDecl getDecl() { return att.getAttribute(); }
|
||||
|
||||
private final XmlString defaultValue;
|
||||
public XmlString getDefaultValue() {
|
||||
if( defaultValue!=null ) return defaultValue;
|
||||
else return getDecl().getDefaultValue();
|
||||
}
|
||||
|
||||
private final XmlString fixedValue;
|
||||
public XmlString getFixedValue() {
|
||||
if( fixedValue!=null ) return fixedValue;
|
||||
else return getDecl().getFixedValue();
|
||||
}
|
||||
|
||||
private final boolean required;
|
||||
public boolean isRequired() { return required; }
|
||||
|
||||
public Object apply( XSFunction f ) {
|
||||
return f.attributeUse(this);
|
||||
}
|
||||
public void visit( XSVisitor v ) {
|
||||
v.attributeUse(this);
|
||||
}
|
||||
}
|
@ -0,0 +1,144 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom.impl;
|
||||
|
||||
import java.util.AbstractSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.xml.sax.Locator;
|
||||
|
||||
import com.sun.xml.xsom.XSAttGroupDecl;
|
||||
import com.sun.xml.xsom.XSAttributeUse;
|
||||
import com.sun.xml.xsom.impl.Ref.AttGroup;
|
||||
import com.sun.xml.xsom.impl.parser.SchemaDocumentImpl;
|
||||
import com.sun.xml.xsom.impl.scd.Iterators;
|
||||
|
||||
public abstract class AttributesHolder extends DeclarationImpl {
|
||||
|
||||
protected AttributesHolder( SchemaDocumentImpl _parent, AnnotationImpl _annon,
|
||||
Locator loc, ForeignAttributesImpl _fa, String _name, boolean _anonymous ) {
|
||||
|
||||
super(_parent,_annon,loc,_fa,_parent.getTargetNamespace(),_name,_anonymous);
|
||||
}
|
||||
|
||||
/** set the local wildcard. */
|
||||
public abstract void setWildcard(WildcardImpl wc);
|
||||
|
||||
/**
|
||||
* Local attribute use.
|
||||
* Use linked hash map to guarantee the iteration order, and make it close to
|
||||
* what was in the schema document.
|
||||
*/
|
||||
protected final Map<UName,AttributeUseImpl> attributes = new LinkedHashMap<UName,AttributeUseImpl>();
|
||||
public void addAttributeUse( UName name, AttributeUseImpl a ) {
|
||||
attributes.put( name, a );
|
||||
}
|
||||
/** prohibited attributes. */
|
||||
protected final Set<UName> prohibitedAtts = new HashSet<UName>();
|
||||
public void addProhibitedAttribute( UName name ) {
|
||||
prohibitedAtts.add(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the attribute uses by looking at attribute groups and etc.
|
||||
* Searching for the base type is done in {@link ComplexTypeImpl}.
|
||||
*/
|
||||
public Collection<XSAttributeUse> getAttributeUses() {
|
||||
// TODO: this is fairly inefficient
|
||||
List<XSAttributeUse> v = new ArrayList<XSAttributeUse>();
|
||||
v.addAll(attributes.values());
|
||||
for( XSAttGroupDecl agd : getAttGroups() )
|
||||
v.addAll(agd.getAttributeUses());
|
||||
return v;
|
||||
}
|
||||
public Iterator<XSAttributeUse> iterateAttributeUses() {
|
||||
return getAttributeUses().iterator();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public XSAttributeUse getDeclaredAttributeUse( String nsURI, String localName ) {
|
||||
return attributes.get(new UName(nsURI,localName));
|
||||
}
|
||||
|
||||
public Iterator<AttributeUseImpl> iterateDeclaredAttributeUses() {
|
||||
return attributes.values().iterator();
|
||||
}
|
||||
|
||||
public Collection<AttributeUseImpl> getDeclaredAttributeUses() {
|
||||
return attributes.values();
|
||||
}
|
||||
|
||||
|
||||
/** {@link Ref.AttGroup}s that are directly refered from this. */
|
||||
protected final Set<Ref.AttGroup> attGroups = new HashSet<Ref.AttGroup>();
|
||||
|
||||
public void addAttGroup( Ref.AttGroup a ) { attGroups.add(a); }
|
||||
|
||||
// Iterates all AttGroups which are directly referenced from this component
|
||||
// this does not iterate att groups referenced from the base type
|
||||
public Iterator<XSAttGroupDecl> iterateAttGroups() {
|
||||
return new Iterators.Adapter<XSAttGroupDecl,Ref.AttGroup>(attGroups.iterator()) {
|
||||
protected XSAttGroupDecl filter(AttGroup u) {
|
||||
return u.get();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public Set<XSAttGroupDecl> getAttGroups() {
|
||||
return new AbstractSet<XSAttGroupDecl>() {
|
||||
public Iterator<XSAttGroupDecl> iterator() {
|
||||
return iterateAttGroups();
|
||||
}
|
||||
|
||||
public int size() {
|
||||
return attGroups.size();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
@ -0,0 +1,315 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.xml.sax.Locator;
|
||||
|
||||
import com.sun.xml.xsom.XSAttGroupDecl;
|
||||
import com.sun.xml.xsom.XSAttributeDecl;
|
||||
import com.sun.xml.xsom.XSAttributeUse;
|
||||
import com.sun.xml.xsom.XSComplexType;
|
||||
import com.sun.xml.xsom.XSContentType;
|
||||
import com.sun.xml.xsom.XSElementDecl;
|
||||
import com.sun.xml.xsom.XSSchema;
|
||||
import com.sun.xml.xsom.XSSchemaSet;
|
||||
import com.sun.xml.xsom.XSSimpleType;
|
||||
import com.sun.xml.xsom.XSType;
|
||||
import com.sun.xml.xsom.XSWildcard;
|
||||
import com.sun.xml.xsom.impl.parser.DelayedRef;
|
||||
import com.sun.xml.xsom.impl.parser.SchemaDocumentImpl;
|
||||
import com.sun.xml.xsom.impl.scd.Iterators;
|
||||
import com.sun.xml.xsom.visitor.XSFunction;
|
||||
import com.sun.xml.xsom.visitor.XSVisitor;
|
||||
|
||||
public class ComplexTypeImpl extends AttributesHolder implements XSComplexType, Ref.ComplexType
|
||||
{
|
||||
public ComplexTypeImpl( SchemaDocumentImpl _parent,
|
||||
AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa,
|
||||
String _name, boolean _anonymous,
|
||||
|
||||
boolean _abstract, int _derivationMethod,
|
||||
Ref.Type _base, int _final, int _block, boolean _mixed ) {
|
||||
|
||||
super(_parent,_annon,_loc,_fa,_name,_anonymous);
|
||||
|
||||
if(_base==null)
|
||||
throw new IllegalArgumentException();
|
||||
|
||||
this._abstract = _abstract;
|
||||
this.derivationMethod = _derivationMethod;
|
||||
this.baseType = _base;
|
||||
this.finalValue = _final;
|
||||
this.blockValue = _block;
|
||||
this.mixed = _mixed;
|
||||
}
|
||||
|
||||
public XSComplexType asComplexType(){ return this; }
|
||||
|
||||
public boolean isDerivedFrom(XSType t) {
|
||||
XSType x = this;
|
||||
while(true) {
|
||||
if(t==x)
|
||||
return true;
|
||||
XSType s = x.getBaseType();
|
||||
if(s==x)
|
||||
return false;
|
||||
x = s;
|
||||
}
|
||||
}
|
||||
|
||||
public XSSimpleType asSimpleType() { return null; }
|
||||
public final boolean isSimpleType() { return false; }
|
||||
public final boolean isComplexType(){ return true; }
|
||||
|
||||
private int derivationMethod;
|
||||
public int getDerivationMethod() { return derivationMethod; }
|
||||
|
||||
private Ref.Type baseType;
|
||||
public XSType getBaseType() { return baseType.getType(); }
|
||||
|
||||
/**
|
||||
* Called when this complex type redefines the specified complex type.
|
||||
*/
|
||||
public void redefine( ComplexTypeImpl ct ) {
|
||||
if( baseType instanceof DelayedRef )
|
||||
((DelayedRef)baseType).redefine(ct);
|
||||
else
|
||||
this.baseType = ct;
|
||||
ct.redefinedBy = this;
|
||||
redefiningCount = (short)(ct.redefiningCount+1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Number of times this component redefines other components.
|
||||
*/
|
||||
private short redefiningCount = 0;
|
||||
|
||||
private ComplexTypeImpl redefinedBy = null;
|
||||
|
||||
public XSComplexType getRedefinedBy() {
|
||||
return redefinedBy;
|
||||
}
|
||||
|
||||
public int getRedefinedCount() {
|
||||
int i=0;
|
||||
for( ComplexTypeImpl ct=this.redefinedBy; ct!=null; ct=ct.redefinedBy)
|
||||
i++;
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
private XSElementDecl scope;
|
||||
public XSElementDecl getScope() { return scope; }
|
||||
public void setScope( XSElementDecl _scope ) { this.scope=_scope; }
|
||||
|
||||
private final boolean _abstract;
|
||||
public boolean isAbstract() { return _abstract; }
|
||||
|
||||
private WildcardImpl localAttWildcard;
|
||||
/**
|
||||
* Set the local attribute wildcard.
|
||||
*/
|
||||
public void setWildcard( WildcardImpl wc ) {
|
||||
this.localAttWildcard = wc;
|
||||
}
|
||||
public XSWildcard getAttributeWildcard() {
|
||||
WildcardImpl complete = localAttWildcard;
|
||||
|
||||
Iterator itr = iterateAttGroups();
|
||||
while( itr.hasNext() ) {
|
||||
WildcardImpl w = (WildcardImpl)((XSAttGroupDecl)itr.next()).getAttributeWildcard();
|
||||
|
||||
if(w==null) continue;
|
||||
|
||||
if(complete==null)
|
||||
complete = w;
|
||||
else
|
||||
// TODO: the spec says it's intersection,
|
||||
// but I think it has to be union.
|
||||
complete = complete.union(ownerDocument,w);
|
||||
}
|
||||
|
||||
if( getDerivationMethod()==RESTRICTION ) return complete;
|
||||
|
||||
WildcardImpl base=null;
|
||||
XSType baseType = getBaseType();
|
||||
if(baseType.asComplexType()!=null)
|
||||
base = (WildcardImpl)baseType.asComplexType().getAttributeWildcard();
|
||||
|
||||
if(complete==null) return base;
|
||||
if(base==null) return complete;
|
||||
|
||||
return complete.union(ownerDocument,base);
|
||||
}
|
||||
|
||||
private final int finalValue;
|
||||
public boolean isFinal( int derivationMethod ) {
|
||||
return (finalValue&derivationMethod)!=0;
|
||||
}
|
||||
|
||||
private final int blockValue;
|
||||
public boolean isSubstitutionProhibited( int method ) {
|
||||
return (blockValue&method)!=0;
|
||||
}
|
||||
|
||||
|
||||
private Ref.ContentType contentType;
|
||||
public void setContentType( Ref.ContentType v ) { contentType = v; }
|
||||
public XSContentType getContentType() { return contentType.getContentType(); }
|
||||
|
||||
private XSContentType explicitContent;
|
||||
public void setExplicitContent( XSContentType v ) {
|
||||
this.explicitContent = v;
|
||||
}
|
||||
public XSContentType getExplicitContent() { return explicitContent; }
|
||||
|
||||
private final boolean mixed;
|
||||
public boolean isMixed() { return mixed; }
|
||||
|
||||
|
||||
|
||||
|
||||
public XSAttributeUse getAttributeUse( String nsURI, String localName ) {
|
||||
UName name = new UName(nsURI,localName);
|
||||
|
||||
if(prohibitedAtts.contains(name)) return null;
|
||||
|
||||
XSAttributeUse o = attributes.get(name);
|
||||
|
||||
|
||||
if(o==null) {
|
||||
Iterator itr = iterateAttGroups();
|
||||
while(itr.hasNext() && o==null)
|
||||
o = ((XSAttGroupDecl)itr.next()).getAttributeUse(nsURI,localName);
|
||||
}
|
||||
|
||||
if(o==null) {
|
||||
XSType base = getBaseType();
|
||||
if(base.asComplexType()!=null)
|
||||
o = base.asComplexType().getAttributeUse(nsURI,localName);
|
||||
}
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
public Iterator<XSAttributeUse> iterateAttributeUses() {
|
||||
|
||||
XSComplexType baseType = getBaseType().asComplexType();
|
||||
|
||||
if( baseType==null ) return super.iterateAttributeUses();
|
||||
|
||||
return new Iterators.Union<XSAttributeUse>(
|
||||
new Iterators.Filter<XSAttributeUse>(baseType.iterateAttributeUses()) {
|
||||
protected boolean matches(XSAttributeUse value) {
|
||||
XSAttributeDecl u = value.getDecl();
|
||||
UName n = new UName(u.getTargetNamespace(),u.getName());
|
||||
return !prohibitedAtts.contains(n);
|
||||
}
|
||||
},
|
||||
super.iterateAttributeUses() );
|
||||
}
|
||||
|
||||
public Collection<XSAttributeUse> getAttributeUses() {
|
||||
XSComplexType baseType = getBaseType().asComplexType();
|
||||
|
||||
if( baseType==null ) return super.getAttributeUses();
|
||||
|
||||
// TODO: this is fairly inefficient
|
||||
Map<UName,XSAttributeUse> uses = new HashMap<UName, XSAttributeUse>();
|
||||
for( XSAttributeUse a : baseType.getAttributeUses())
|
||||
uses.put(new UName(a.getDecl()),a);
|
||||
|
||||
uses.keySet().removeAll(prohibitedAtts);
|
||||
|
||||
for( XSAttributeUse a : super.getAttributeUses())
|
||||
uses.put(new UName(a.getDecl()),a);
|
||||
|
||||
return uses.values();
|
||||
}
|
||||
|
||||
|
||||
public XSType[] listSubstitutables() {
|
||||
return Util.listSubstitutables(this);
|
||||
}
|
||||
|
||||
public void visit( XSVisitor visitor ) {
|
||||
visitor.complexType(this);
|
||||
}
|
||||
public <T> T apply( XSFunction<T> function ) {
|
||||
return function.complexType(this);
|
||||
}
|
||||
|
||||
// Ref.ComplexType implementation
|
||||
public XSComplexType getType() { return this; }
|
||||
|
||||
public List<XSComplexType> getSubtypes() {
|
||||
ArrayList subtypeList = new ArrayList();
|
||||
Iterator<XSComplexType> cTypes = getRoot().iterateComplexTypes();
|
||||
while (cTypes.hasNext()) {
|
||||
XSComplexType cType= cTypes.next();
|
||||
XSType base = cType.getBaseType();
|
||||
if ((base != null) && (base.equals(this))) {
|
||||
subtypeList.add(cType);
|
||||
}
|
||||
}
|
||||
return subtypeList;
|
||||
}
|
||||
|
||||
public List<XSElementDecl> getElementDecls() {
|
||||
ArrayList declList = new ArrayList();
|
||||
XSSchemaSet schemaSet = getRoot();
|
||||
for (XSSchema sch : schemaSet.getSchemas()) {
|
||||
for (XSElementDecl decl : sch.getElementDecls().values()) {
|
||||
if (decl.getType().equals(this)) {
|
||||
declList.add(decl);
|
||||
}
|
||||
}
|
||||
}
|
||||
return declList;
|
||||
}
|
||||
}
|
@ -0,0 +1,160 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom.impl;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.namespace.NamespaceContext;
|
||||
|
||||
import org.xml.sax.Locator;
|
||||
|
||||
import com.sun.xml.xsom.SCD;
|
||||
import com.sun.xml.xsom.XSAnnotation;
|
||||
import com.sun.xml.xsom.XSComponent;
|
||||
import com.sun.xml.xsom.XSSchemaSet;
|
||||
import com.sun.xml.xsom.impl.parser.SchemaDocumentImpl;
|
||||
import com.sun.xml.xsom.parser.SchemaDocument;
|
||||
import com.sun.xml.xsom.util.ComponentNameFunction;
|
||||
|
||||
public abstract class ComponentImpl implements XSComponent
|
||||
{
|
||||
protected ComponentImpl( SchemaDocumentImpl _owner, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl fa ) {
|
||||
this.ownerDocument = _owner;
|
||||
this.annotation = _annon;
|
||||
this.locator = _loc;
|
||||
this.foreignAttributes = fa;
|
||||
}
|
||||
|
||||
protected final SchemaDocumentImpl ownerDocument;
|
||||
public SchemaImpl getOwnerSchema() {
|
||||
if(ownerDocument==null)
|
||||
return null;
|
||||
else
|
||||
return ownerDocument.getSchema();
|
||||
}
|
||||
|
||||
public XSSchemaSet getRoot() {
|
||||
if(ownerDocument==null)
|
||||
return null;
|
||||
else
|
||||
return getOwnerSchema().getRoot();
|
||||
}
|
||||
|
||||
public SchemaDocument getSourceDocument() {
|
||||
return ownerDocument;
|
||||
}
|
||||
|
||||
private AnnotationImpl annotation;
|
||||
public final XSAnnotation getAnnotation() { return annotation; }
|
||||
|
||||
public XSAnnotation getAnnotation(boolean createIfNotExist) {
|
||||
if(createIfNotExist && annotation==null) {
|
||||
annotation = new AnnotationImpl();
|
||||
}
|
||||
return annotation;
|
||||
}
|
||||
|
||||
private final Locator locator;
|
||||
public final Locator getLocator() { return locator; }
|
||||
|
||||
/**
|
||||
* Either {@link ForeignAttributesImpl} or {@link List}.
|
||||
*
|
||||
* Initially it's {@link ForeignAttributesImpl}, but it's lazily turned into
|
||||
* a list when necessary.
|
||||
*/
|
||||
private Object foreignAttributes;
|
||||
|
||||
public List<ForeignAttributesImpl> getForeignAttributes() {
|
||||
Object t = foreignAttributes;
|
||||
|
||||
if(t==null)
|
||||
return Collections.EMPTY_LIST;
|
||||
|
||||
if(t instanceof List)
|
||||
return (List)t;
|
||||
|
||||
t = foreignAttributes = convertToList((ForeignAttributesImpl)t);
|
||||
return (List)t;
|
||||
}
|
||||
|
||||
public String getForeignAttribute(String nsUri, String localName) {
|
||||
for( ForeignAttributesImpl fa : getForeignAttributes() ) {
|
||||
String v = fa.getValue(nsUri,localName);
|
||||
if(v!=null) return v;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private List<ForeignAttributesImpl> convertToList(ForeignAttributesImpl fa) {
|
||||
List<ForeignAttributesImpl> lst = new ArrayList<ForeignAttributesImpl>();
|
||||
while(fa!=null) {
|
||||
lst.add(fa);
|
||||
fa = fa.next;
|
||||
}
|
||||
return Collections.unmodifiableList(lst);
|
||||
}
|
||||
|
||||
public Collection<XSComponent> select(String scd, NamespaceContext nsContext) {
|
||||
try {
|
||||
return SCD.create(scd,nsContext).select(this);
|
||||
} catch (ParseException e) {
|
||||
throw new IllegalArgumentException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public XSComponent selectSingle(String scd, NamespaceContext nsContext) {
|
||||
try {
|
||||
return SCD.create(scd,nsContext).selectSingle(this);
|
||||
} catch (ParseException e) {
|
||||
throw new IllegalArgumentException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return apply(new ComponentNameFunction());
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom.impl;
|
||||
|
||||
public class Const
|
||||
{
|
||||
/** Namespace URI of XML Schema. */
|
||||
public static final String schemaNamespace = "http://www.w3.org/2001/XMLSchema";
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom.impl;
|
||||
|
||||
import com.sun.xml.xsom.XSContentType;
|
||||
|
||||
/**
|
||||
* Marker interface that says this implementation
|
||||
* implements XSContentType.
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public interface ContentTypeImpl extends Ref.ContentType, XSContentType {
|
||||
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom.impl;
|
||||
|
||||
import org.xml.sax.Locator;
|
||||
|
||||
import com.sun.xml.xsom.XSDeclaration;
|
||||
import com.sun.xml.xsom.impl.parser.SchemaDocumentImpl;
|
||||
|
||||
abstract class DeclarationImpl extends ComponentImpl implements XSDeclaration
|
||||
{
|
||||
DeclarationImpl( SchemaDocumentImpl owner,
|
||||
AnnotationImpl _annon, Locator loc, ForeignAttributesImpl fa,
|
||||
String _targetNamespace, String _name, boolean _anonymous ) {
|
||||
|
||||
super(owner,_annon,loc,fa);
|
||||
this.targetNamespace = _targetNamespace;
|
||||
this.name = _name;
|
||||
this.anonymous = _anonymous;
|
||||
}
|
||||
|
||||
private final String name;
|
||||
public String getName() { return name; }
|
||||
|
||||
private final String targetNamespace;
|
||||
public String getTargetNamespace() { return targetNamespace; }
|
||||
|
||||
private final boolean anonymous;
|
||||
/** @deprecated */
|
||||
public boolean isAnonymous() { return anonymous; }
|
||||
|
||||
public final boolean isGlobal() { return !isAnonymous(); }
|
||||
public final boolean isLocal() { return isAnonymous(); }
|
||||
}
|
@ -0,0 +1,251 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.xml.sax.Locator;
|
||||
|
||||
import com.sun.xml.xsom.XSElementDecl;
|
||||
import com.sun.xml.xsom.XSIdentityConstraint;
|
||||
import com.sun.xml.xsom.XSModelGroup;
|
||||
import com.sun.xml.xsom.XSModelGroupDecl;
|
||||
import com.sun.xml.xsom.XSTerm;
|
||||
import com.sun.xml.xsom.XSType;
|
||||
import com.sun.xml.xsom.XSWildcard;
|
||||
import com.sun.xml.xsom.XmlString;
|
||||
import com.sun.xml.xsom.impl.parser.PatcherManager;
|
||||
import com.sun.xml.xsom.impl.parser.SchemaDocumentImpl;
|
||||
import com.sun.xml.xsom.visitor.XSFunction;
|
||||
import com.sun.xml.xsom.visitor.XSTermFunction;
|
||||
import com.sun.xml.xsom.visitor.XSTermFunctionWithParam;
|
||||
import com.sun.xml.xsom.visitor.XSTermVisitor;
|
||||
import com.sun.xml.xsom.visitor.XSVisitor;
|
||||
|
||||
public class ElementDecl extends DeclarationImpl implements XSElementDecl, Ref.Term
|
||||
{
|
||||
public ElementDecl( PatcherManager reader, SchemaDocumentImpl owner,
|
||||
AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl fa,
|
||||
String _tns, String _name, boolean _anonymous,
|
||||
|
||||
XmlString _defv, XmlString _fixedv,
|
||||
boolean _nillable, boolean _abstract, Boolean _form,
|
||||
Ref.Type _type, Ref.Element _substHead,
|
||||
int _substDisallowed, int _substExcluded,
|
||||
List<IdentityConstraintImpl> idConstraints) {
|
||||
|
||||
super(owner,_annon,_loc,fa,_tns,_name,_anonymous);
|
||||
|
||||
this.defaultValue = _defv;
|
||||
this.fixedValue = _fixedv;
|
||||
this.nillable = _nillable;
|
||||
this._abstract = _abstract;
|
||||
this.form = _form;
|
||||
this.type = _type;
|
||||
this.substHead = _substHead;
|
||||
this.substDisallowed = _substDisallowed;
|
||||
this.substExcluded = _substExcluded;
|
||||
this.idConstraints = Collections.unmodifiableList((List<? extends XSIdentityConstraint>)idConstraints);
|
||||
|
||||
for (IdentityConstraintImpl idc : idConstraints)
|
||||
idc.setParent(this);
|
||||
|
||||
if(type==null)
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
private XmlString defaultValue;
|
||||
public XmlString getDefaultValue() { return defaultValue; }
|
||||
|
||||
private XmlString fixedValue;
|
||||
public XmlString getFixedValue() { return fixedValue; }
|
||||
|
||||
private boolean nillable;
|
||||
public boolean isNillable() { return nillable; }
|
||||
|
||||
private boolean _abstract;
|
||||
public boolean isAbstract() { return _abstract; }
|
||||
|
||||
private Ref.Type type;
|
||||
public XSType getType() { return type.getType(); }
|
||||
|
||||
private Ref.Element substHead;
|
||||
public XSElementDecl getSubstAffiliation() {
|
||||
if(substHead==null) return null;
|
||||
return substHead.get();
|
||||
}
|
||||
|
||||
private int substDisallowed;
|
||||
public boolean isSubstitutionDisallowed( int method ) {
|
||||
return (substDisallowed&method)!=0;
|
||||
}
|
||||
|
||||
private int substExcluded;
|
||||
public boolean isSubstitutionExcluded( int method ) {
|
||||
return (substExcluded&method)!=0;
|
||||
}
|
||||
|
||||
private final List<XSIdentityConstraint> idConstraints;
|
||||
public List<XSIdentityConstraint> getIdentityConstraints() {
|
||||
return idConstraints;
|
||||
}
|
||||
|
||||
private Boolean form;
|
||||
public Boolean getForm() {
|
||||
return form;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public XSElementDecl[] listSubstitutables() {
|
||||
Set<? extends XSElementDecl> s = getSubstitutables();
|
||||
return s.toArray(new XSElementDecl[s.size()]);
|
||||
}
|
||||
|
||||
/** Set that represents element decls that can substitute this element. */
|
||||
private Set<XSElementDecl> substitutables = null;
|
||||
|
||||
/** Unmodifieable view of {@link #substitutables}. */
|
||||
private Set<XSElementDecl> substitutablesView = null;
|
||||
|
||||
public Set<? extends XSElementDecl> getSubstitutables() {
|
||||
if( substitutables==null ) {
|
||||
// if the field is null by the time this method
|
||||
// is called, it means this element is substitutable by itself only.
|
||||
substitutables = substitutablesView = Collections.singleton((XSElementDecl)this);
|
||||
}
|
||||
return substitutablesView;
|
||||
}
|
||||
|
||||
protected void addSubstitutable( ElementDecl decl ) {
|
||||
if( substitutables==null ) {
|
||||
substitutables = new HashSet<XSElementDecl>();
|
||||
substitutables.add(this);
|
||||
substitutablesView = Collections.unmodifiableSet(substitutables);
|
||||
}
|
||||
substitutables.add(decl);
|
||||
}
|
||||
|
||||
|
||||
public void updateSubstitutabilityMap() {
|
||||
ElementDecl parent = this;
|
||||
XSType type = this.getType();
|
||||
|
||||
boolean rused = false;
|
||||
boolean eused = false;
|
||||
|
||||
while( (parent=(ElementDecl)parent.getSubstAffiliation())!=null ) {
|
||||
|
||||
if(parent.isSubstitutionDisallowed(XSType.SUBSTITUTION))
|
||||
continue;
|
||||
|
||||
boolean rd = parent.isSubstitutionDisallowed(XSType.RESTRICTION);
|
||||
boolean ed = parent.isSubstitutionDisallowed(XSType.EXTENSION);
|
||||
|
||||
if( (rd && rused) || ( ed && eused ) ) continue;
|
||||
|
||||
XSType parentType = parent.getType();
|
||||
while (type!=parentType) {
|
||||
if(type.getDerivationMethod()==XSType.RESTRICTION) rused = true;
|
||||
else eused = true;
|
||||
|
||||
type = type.getBaseType();
|
||||
if(type==null) // parentType and type doesn't share the common base type. a bug in the schema.
|
||||
break;
|
||||
|
||||
if( type.isComplexType() ) {
|
||||
rd |= type.asComplexType().isSubstitutionProhibited(XSType.RESTRICTION);
|
||||
ed |= type.asComplexType().isSubstitutionProhibited(XSType.EXTENSION);
|
||||
}
|
||||
if (getRoot().getAnyType().equals(type)) break;
|
||||
}
|
||||
|
||||
if( (rd && rused) || ( ed && eused ) ) continue;
|
||||
|
||||
// this element can substitute "parent"
|
||||
parent.addSubstitutable(this);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean canBeSubstitutedBy(XSElementDecl e) {
|
||||
return getSubstitutables().contains(e);
|
||||
}
|
||||
|
||||
public boolean isWildcard() { return false; }
|
||||
public boolean isModelGroupDecl() { return false; }
|
||||
public boolean isModelGroup() { return false; }
|
||||
public boolean isElementDecl() { return true; }
|
||||
|
||||
public XSWildcard asWildcard() { return null; }
|
||||
public XSModelGroupDecl asModelGroupDecl() { return null; }
|
||||
public XSModelGroup asModelGroup() { return null; }
|
||||
public XSElementDecl asElementDecl() { return this; }
|
||||
|
||||
|
||||
|
||||
|
||||
public void visit( XSVisitor visitor ) {
|
||||
visitor.elementDecl(this);
|
||||
}
|
||||
public void visit( XSTermVisitor visitor ) {
|
||||
visitor.elementDecl(this);
|
||||
}
|
||||
public Object apply( XSTermFunction function ) {
|
||||
return function.elementDecl(this);
|
||||
}
|
||||
|
||||
public <T,P> T apply(XSTermFunctionWithParam<T, P> function, P param) {
|
||||
return function.elementDecl(this,param);
|
||||
}
|
||||
|
||||
public Object apply( XSFunction function ) {
|
||||
return function.elementDecl(this);
|
||||
}
|
||||
|
||||
|
||||
// Ref.Term implementation
|
||||
public XSTerm getTerm() { return this; }
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom.impl;
|
||||
|
||||
import com.sun.xml.xsom.XSContentType;
|
||||
import com.sun.xml.xsom.XSParticle;
|
||||
import com.sun.xml.xsom.XSSimpleType;
|
||||
import com.sun.xml.xsom.visitor.XSContentTypeFunction;
|
||||
import com.sun.xml.xsom.visitor.XSContentTypeVisitor;
|
||||
import com.sun.xml.xsom.visitor.XSFunction;
|
||||
import com.sun.xml.xsom.visitor.XSVisitor;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public class EmptyImpl extends ComponentImpl implements ContentTypeImpl {
|
||||
public EmptyImpl() { super(null,null,null,null); }
|
||||
|
||||
public XSSimpleType asSimpleType() { return null; }
|
||||
public XSParticle asParticle() { return null; }
|
||||
public XSContentType asEmpty() { return this; }
|
||||
|
||||
public Object apply( XSContentTypeFunction function ) {
|
||||
return function.empty(this);
|
||||
}
|
||||
public Object apply( XSFunction function ) {
|
||||
return function.empty(this);
|
||||
}
|
||||
public void visit( XSVisitor visitor ) {
|
||||
visitor.empty(this);
|
||||
}
|
||||
public void visit( XSContentTypeVisitor visitor ) {
|
||||
visitor.empty(this);
|
||||
}
|
||||
|
||||
public XSContentType getContentType() { return this; }
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom.impl;
|
||||
|
||||
import org.xml.sax.Locator;
|
||||
|
||||
import com.sun.xml.xsom.XSFacet;
|
||||
import com.sun.xml.xsom.XmlString;
|
||||
import com.sun.xml.xsom.impl.parser.SchemaDocumentImpl;
|
||||
import com.sun.xml.xsom.visitor.XSFunction;
|
||||
import com.sun.xml.xsom.visitor.XSVisitor;
|
||||
|
||||
public class FacetImpl extends ComponentImpl implements XSFacet {
|
||||
public FacetImpl( SchemaDocumentImpl owner, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa,
|
||||
String _name, XmlString _value, boolean _fixed ) {
|
||||
|
||||
super(owner,_annon,_loc,_fa);
|
||||
|
||||
this.name = _name;
|
||||
this.value = _value;
|
||||
this.fixed = _fixed;
|
||||
}
|
||||
|
||||
private final String name;
|
||||
public String getName() { return name; }
|
||||
|
||||
private final XmlString value;
|
||||
public XmlString getValue() { return value; }
|
||||
|
||||
private boolean fixed;
|
||||
public boolean isFixed() { return fixed; }
|
||||
|
||||
|
||||
public void visit( XSVisitor visitor ) {
|
||||
visitor.facet(this);
|
||||
}
|
||||
public Object apply( XSFunction function ) {
|
||||
return function.facet(this);
|
||||
}
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom.impl;
|
||||
|
||||
import org.relaxng.datatype.ValidationContext;
|
||||
import org.xml.sax.Locator;
|
||||
import org.xml.sax.helpers.AttributesImpl;
|
||||
|
||||
import com.sun.xml.xsom.ForeignAttributes;
|
||||
|
||||
/**
|
||||
* Remembers foreign attributes.
|
||||
*
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
public final class ForeignAttributesImpl extends AttributesImpl implements ForeignAttributes {
|
||||
private final ValidationContext context;
|
||||
private final Locator locator;
|
||||
/**
|
||||
* {@link ForeignAttributes} forms a linked list.
|
||||
*/
|
||||
final ForeignAttributesImpl next;
|
||||
|
||||
public ForeignAttributesImpl(ValidationContext context, Locator locator, ForeignAttributesImpl next) {
|
||||
this.context = context;
|
||||
this.locator = locator;
|
||||
this.next = next;
|
||||
}
|
||||
|
||||
public ValidationContext getContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
public Locator getLocator() {
|
||||
return locator;
|
||||
}
|
||||
}
|
@ -0,0 +1,132 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.xml.sax.Locator;
|
||||
|
||||
import com.sun.xml.xsom.XSElementDecl;
|
||||
import com.sun.xml.xsom.XSIdentityConstraint;
|
||||
import com.sun.xml.xsom.XSXPath;
|
||||
import com.sun.xml.xsom.impl.parser.SchemaDocumentImpl;
|
||||
import com.sun.xml.xsom.visitor.XSFunction;
|
||||
import com.sun.xml.xsom.visitor.XSVisitor;
|
||||
|
||||
/**
|
||||
* {@link XSIdentityConstraint} implementation.
|
||||
*
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
public class IdentityConstraintImpl extends ComponentImpl implements XSIdentityConstraint, Ref.IdentityConstraint {
|
||||
|
||||
private XSElementDecl parent;
|
||||
private final short category;
|
||||
private final String name;
|
||||
private final XSXPath selector;
|
||||
private final List<XSXPath> fields;
|
||||
private final Ref.IdentityConstraint refer;
|
||||
|
||||
public IdentityConstraintImpl(SchemaDocumentImpl _owner, AnnotationImpl _annon, Locator _loc,
|
||||
ForeignAttributesImpl fa, short category, String name, XPathImpl selector,
|
||||
List<XPathImpl> fields, Ref.IdentityConstraint refer) {
|
||||
|
||||
super(_owner, _annon, _loc, fa);
|
||||
this.category = category;
|
||||
this.name = name;
|
||||
this.selector = selector;
|
||||
selector.setParent(this);
|
||||
this.fields = Collections.unmodifiableList((List<? extends XSXPath>)fields);
|
||||
for( XPathImpl xp : fields )
|
||||
xp.setParent(this);
|
||||
this.refer = refer;
|
||||
}
|
||||
|
||||
|
||||
public void visit(XSVisitor visitor) {
|
||||
visitor.identityConstraint(this);
|
||||
}
|
||||
|
||||
public <T> T apply(XSFunction<T> function) {
|
||||
return function.identityConstraint(this);
|
||||
}
|
||||
|
||||
public void setParent(ElementDecl parent) {
|
||||
this.parent = parent;
|
||||
parent.getOwnerSchema().addIdentityConstraint(this);
|
||||
}
|
||||
|
||||
public XSElementDecl getParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getTargetNamespace() {
|
||||
return getParent().getTargetNamespace();
|
||||
}
|
||||
|
||||
public short getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public XSXPath getSelector() {
|
||||
return selector;
|
||||
}
|
||||
|
||||
public List<XSXPath> getFields() {
|
||||
return fields;
|
||||
}
|
||||
|
||||
public XSIdentityConstraint getReferencedKey() {
|
||||
if(category==KEYREF)
|
||||
return refer.get();
|
||||
else
|
||||
throw new IllegalStateException("not a keyref");
|
||||
}
|
||||
|
||||
public XSIdentityConstraint get() {
|
||||
return this;
|
||||
}
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.xml.sax.Locator;
|
||||
|
||||
import com.sun.xml.xsom.XSFacet;
|
||||
import com.sun.xml.xsom.XSListSimpleType;
|
||||
import com.sun.xml.xsom.XSSimpleType;
|
||||
import com.sun.xml.xsom.XSVariety;
|
||||
import com.sun.xml.xsom.impl.parser.SchemaDocumentImpl;
|
||||
import com.sun.xml.xsom.visitor.XSSimpleTypeFunction;
|
||||
import com.sun.xml.xsom.visitor.XSSimpleTypeVisitor;
|
||||
|
||||
public class ListSimpleTypeImpl extends SimpleTypeImpl implements XSListSimpleType
|
||||
{
|
||||
public ListSimpleTypeImpl( SchemaDocumentImpl _parent,
|
||||
AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa,
|
||||
String _name, boolean _anonymous, Set<XSVariety> finalSet,
|
||||
Ref.SimpleType _itemType ) {
|
||||
|
||||
super(_parent,_annon,_loc,_fa,_name,_anonymous, finalSet,
|
||||
_parent.getSchema().parent.anySimpleType);
|
||||
|
||||
this.itemType = _itemType;
|
||||
}
|
||||
|
||||
private final Ref.SimpleType itemType;
|
||||
public XSSimpleType getItemType() { return itemType.getType(); }
|
||||
|
||||
public void visit( XSSimpleTypeVisitor visitor ) {
|
||||
visitor.listSimpleType(this);
|
||||
}
|
||||
public Object apply( XSSimpleTypeFunction function ) {
|
||||
return function.listSimpleType(this);
|
||||
}
|
||||
|
||||
// list type by itself doesn't have any facet. */
|
||||
public XSFacet getFacet( String name ) { return null; }
|
||||
public List<XSFacet> getFacets( String name ) { return Collections.EMPTY_LIST; }
|
||||
|
||||
public XSVariety getVariety() { return XSVariety.LIST; }
|
||||
|
||||
public XSSimpleType getPrimitiveType() { return null; }
|
||||
|
||||
public XSListSimpleType getBaseListType() {return this;}
|
||||
|
||||
public boolean isList() { return true; }
|
||||
public XSListSimpleType asList() { return this; }
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom.impl;
|
||||
|
||||
import org.xml.sax.Locator;
|
||||
|
||||
import com.sun.xml.xsom.XSElementDecl;
|
||||
import com.sun.xml.xsom.XSModelGroup;
|
||||
import com.sun.xml.xsom.XSModelGroupDecl;
|
||||
import com.sun.xml.xsom.XSTerm;
|
||||
import com.sun.xml.xsom.XSWildcard;
|
||||
import com.sun.xml.xsom.impl.parser.SchemaDocumentImpl;
|
||||
import com.sun.xml.xsom.visitor.XSFunction;
|
||||
import com.sun.xml.xsom.visitor.XSTermFunction;
|
||||
import com.sun.xml.xsom.visitor.XSTermFunctionWithParam;
|
||||
import com.sun.xml.xsom.visitor.XSTermVisitor;
|
||||
import com.sun.xml.xsom.visitor.XSVisitor;
|
||||
|
||||
public class ModelGroupDeclImpl extends DeclarationImpl implements XSModelGroupDecl, Ref.Term
|
||||
{
|
||||
public ModelGroupDeclImpl( SchemaDocumentImpl owner,
|
||||
AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa,
|
||||
String _targetNamespace, String _name,
|
||||
ModelGroupImpl _modelGroup ) {
|
||||
|
||||
super(owner,_annon,_loc,_fa,_targetNamespace,_name,false);
|
||||
this.modelGroup = _modelGroup;
|
||||
|
||||
if(modelGroup==null)
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
private final ModelGroupImpl modelGroup;
|
||||
public XSModelGroup getModelGroup() { return modelGroup; }
|
||||
|
||||
/**
|
||||
* This component is a redefinition of "oldMG". Fix up the internal state
|
||||
* as such.
|
||||
*/
|
||||
public void redefine( ModelGroupDeclImpl oldMG ) {
|
||||
modelGroup.redefine(oldMG);
|
||||
}
|
||||
|
||||
|
||||
public void visit( XSVisitor visitor ) {
|
||||
visitor.modelGroupDecl(this);
|
||||
}
|
||||
public void visit( XSTermVisitor visitor ) {
|
||||
visitor.modelGroupDecl(this);
|
||||
}
|
||||
public Object apply( XSTermFunction function ) {
|
||||
return function.modelGroupDecl(this);
|
||||
}
|
||||
|
||||
public <T,P> T apply(XSTermFunctionWithParam<T, P> function, P param) {
|
||||
return function.modelGroupDecl(this,param);
|
||||
}
|
||||
|
||||
public Object apply( XSFunction function ) {
|
||||
return function.modelGroupDecl(this);
|
||||
}
|
||||
|
||||
|
||||
public boolean isWildcard() { return false; }
|
||||
public boolean isModelGroupDecl() { return true; }
|
||||
public boolean isModelGroup() { return false; }
|
||||
public boolean isElementDecl() { return false; }
|
||||
|
||||
public XSWildcard asWildcard() { return null; }
|
||||
public XSModelGroupDecl asModelGroupDecl() { return this; }
|
||||
public XSModelGroup asModelGroup() { return null; }
|
||||
public XSElementDecl asElementDecl() { return null; }
|
||||
|
||||
|
||||
// Ref.Term implementation
|
||||
public XSTerm getTerm() { return this; }
|
||||
}
|
@ -0,0 +1,130 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom.impl;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.xml.sax.Locator;
|
||||
|
||||
import com.sun.xml.xsom.XSElementDecl;
|
||||
import com.sun.xml.xsom.XSModelGroup;
|
||||
import com.sun.xml.xsom.XSModelGroupDecl;
|
||||
import com.sun.xml.xsom.XSParticle;
|
||||
import com.sun.xml.xsom.XSTerm;
|
||||
import com.sun.xml.xsom.XSWildcard;
|
||||
import com.sun.xml.xsom.impl.parser.SchemaDocumentImpl;
|
||||
import com.sun.xml.xsom.visitor.XSFunction;
|
||||
import com.sun.xml.xsom.visitor.XSTermFunction;
|
||||
import com.sun.xml.xsom.visitor.XSTermFunctionWithParam;
|
||||
import com.sun.xml.xsom.visitor.XSTermVisitor;
|
||||
import com.sun.xml.xsom.visitor.XSVisitor;
|
||||
|
||||
public class ModelGroupImpl extends ComponentImpl implements XSModelGroup, Ref.Term
|
||||
{
|
||||
public ModelGroupImpl( SchemaDocumentImpl owner, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa,
|
||||
Compositor _compositor, ParticleImpl[] _children ) {
|
||||
|
||||
super(owner,_annon,_loc,_fa);
|
||||
this.compositor = _compositor;
|
||||
this.children = _children;
|
||||
|
||||
if(compositor==null)
|
||||
throw new IllegalArgumentException();
|
||||
for( int i=children.length-1; i>=0; i-- )
|
||||
if(children[i]==null)
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
private final ParticleImpl[] children;
|
||||
public ParticleImpl getChild( int idx ) { return children[idx]; }
|
||||
public int getSize() { return children.length; }
|
||||
|
||||
public ParticleImpl[] getChildren() { return children; }
|
||||
|
||||
|
||||
private final Compositor compositor;
|
||||
public Compositor getCompositor() { return compositor; }
|
||||
|
||||
|
||||
public void redefine(ModelGroupDeclImpl oldMG) {
|
||||
for (ParticleImpl p : children)
|
||||
p.redefine(oldMG);
|
||||
}
|
||||
|
||||
public Iterator<XSParticle> iterator() {
|
||||
return Arrays.asList((XSParticle[])children).iterator();
|
||||
}
|
||||
|
||||
|
||||
public boolean isWildcard() { return false; }
|
||||
public boolean isModelGroupDecl() { return false; }
|
||||
public boolean isModelGroup() { return true; }
|
||||
public boolean isElementDecl() { return false; }
|
||||
|
||||
public XSWildcard asWildcard() { return null; }
|
||||
public XSModelGroupDecl asModelGroupDecl() { return null; }
|
||||
public XSModelGroup asModelGroup() { return this; }
|
||||
public XSElementDecl asElementDecl() { return null; }
|
||||
|
||||
|
||||
|
||||
public void visit( XSVisitor visitor ) {
|
||||
visitor.modelGroup(this);
|
||||
}
|
||||
public void visit( XSTermVisitor visitor ) {
|
||||
visitor.modelGroup(this);
|
||||
}
|
||||
public Object apply( XSTermFunction function ) {
|
||||
return function.modelGroup(this);
|
||||
}
|
||||
|
||||
public <T,P> T apply(XSTermFunctionWithParam<T, P> function, P param) {
|
||||
return function.modelGroup(this,param);
|
||||
}
|
||||
|
||||
public Object apply( XSFunction function ) {
|
||||
return function.modelGroup(this);
|
||||
}
|
||||
|
||||
// Ref.Term implementation
|
||||
public XSTerm getTerm() { return this; }
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* xsom
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2024 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Oracle
|
||||
*
|
||||
* Licensed 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 com.sun.xml.xsom.impl;
|
||||
|
||||
import org.xml.sax.Locator;
|
||||
|
||||
import com.sun.xml.xsom.XSNotation;
|
||||
import com.sun.xml.xsom.impl.parser.SchemaDocumentImpl;
|
||||
import com.sun.xml.xsom.visitor.XSFunction;
|
||||
import com.sun.xml.xsom.visitor.XSVisitor;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author
|
||||
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||
*/
|
||||
public class NotationImpl extends DeclarationImpl implements XSNotation {
|
||||
|
||||
public NotationImpl( SchemaDocumentImpl owner, AnnotationImpl _annon,
|
||||
Locator _loc, ForeignAttributesImpl _fa, String _name,
|
||||
String _publicId, String _systemId ) {
|
||||
super(owner,_annon,_loc,_fa,owner.getTargetNamespace(),_name,false);
|
||||
|
||||
this.publicId = _publicId;
|
||||
this.systemId = _systemId;
|
||||
}
|
||||
|
||||
private final String publicId;
|
||||
private final String systemId;
|
||||
|
||||
public String getPublicId() { return publicId; }
|
||||
public String getSystemId() { return systemId; }
|
||||
|
||||
public void visit(XSVisitor visitor) {
|
||||
visitor.notation(this);
|
||||
}
|
||||
|
||||
public Object apply(XSFunction function) {
|
||||
return function.notation(this);
|
||||
}
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user