This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new a09f71a7cf ISIS-3306: Schema: generate '@Named' annotations
a09f71a7cf is described below

commit a09f71a7cf926b3431fb0272d0ae65270d1a856b
Author: Andi Huber <[email protected]>
AuthorDate: Mon Dec 12 16:32:59 2022 +0100

    ISIS-3306: Schema: generate '@Named' annotations
---
 api/schema/pom.xml                                 |   9 +
 api/schema/src/main/java/module-info.java          |   1 +
 .../org/apache/causeway/schema/chg/chg-2.0.xsd     |  11 +-
 .../org/apache/causeway/schema/cmd/cmd-2.0.xsd     |  34 +-
 .../apache/causeway/schema/common/common-2.0.xsd   |  69 ++-
 .../org/apache/causeway/schema/ixn/ixn-2.0.xsd     |  40 +-
 .../causeway/schema/metamodel/metamodel-2.0.xsd    | 478 +++++++++++++--------
 7 files changed, 445 insertions(+), 197 deletions(-)

diff --git a/api/schema/pom.xml b/api/schema/pom.xml
index 688f94a4c3..1a641dec6e 100644
--- a/api/schema/pom.xml
+++ b/api/schema/pom.xml
@@ -86,7 +86,16 @@
                                                                        <args>
                                                                                
<arg>-extension</arg>
                                                                                
<arg>-Xnamespace-prefix</arg>
+                                                                               
<arg>-Xannotate</arg>
                                                                        </args>
+                                                                       
<extension>true</extension>
+                                                                       
<plugins>
+                                                                               
<plugin>
+                                                                               
        <groupId>org.jvnet.jaxb2_commons</groupId>
+                                                                               
        <artifactId>jaxb2-basics-annotate</artifactId>
+                                                                               
        <version>1.1.0</version>
+                                                                               
</plugin>
+                                                                       
</plugins>
                                                                </configuration>
                                                        </execution>
                                                </executions>
diff --git a/api/schema/src/main/java/module-info.java 
b/api/schema/src/main/java/module-info.java
index a7839c8e37..e9f289daf6 100644
--- a/api/schema/src/main/java/module-info.java
+++ b/api/schema/src/main/java/module-info.java
@@ -27,6 +27,7 @@ module org.apache.causeway.schema {
     requires java.xml;
     requires java.xml.bind;
     requires spring.context;
+    requires java.inject;
 
     opens org.apache.causeway.schema.metamodel.v2;
     opens org.apache.causeway.schema.common.v2;
diff --git 
a/api/schema/src/main/resources/org/apache/causeway/schema/chg/chg-2.0.xsd 
b/api/schema/src/main/resources/org/apache/causeway/schema/chg/chg-2.0.xsd
index b42612d8b9..3a398a2358 100644
--- a/api/schema/src/main/resources/org/apache/causeway/schema/chg/chg-2.0.xsd
+++ b/api/schema/src/main/resources/org/apache/causeway/schema/chg/chg-2.0.xsd
@@ -22,7 +22,10 @@
            xmlns:xs="http://www.w3.org/2001/XMLSchema";
            xmlns="http://causeway.apache.org/schema/chg";
            xmlns:com="http://causeway.apache.org/schema/common";
->
+                      
+          xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"; jaxb:version="2.1"
+           xmlns:annox="http://annox.dev.java.net";
+           jaxb:extensionBindingPrefixes="annox">
 
     <xs:import namespace="http://causeway.apache.org/schema/common"; 
schemaLocation="../common/common-2.0.xsd"/>
 
@@ -30,6 +33,9 @@
         <xs:annotation>
             <xs:documentation>Represents v2.0 of this schema (as per 
majorVersion.minorVersion @default attribute, below).  The changes 
(create/update/delete) to one or more domain objects within a transaction.  
(nb: only published objects are included in these lists).
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.chg.v2.ChangesDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:complexType>
             <xs:sequence>
@@ -77,6 +83,9 @@
     <xs:complexType name="objectsDto">
         <xs:annotation>
             <xs:documentation>A set of changes to domain 
objects.</xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.chg.v2.ObjectsDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:sequence>
             <xs:element name="loaded" type="xs:int">
diff --git 
a/api/schema/src/main/resources/org/apache/causeway/schema/cmd/cmd-2.0.xsd 
b/api/schema/src/main/resources/org/apache/causeway/schema/cmd/cmd-2.0.xsd
index 7746f86e98..94ca3b7b5c 100644
--- a/api/schema/src/main/resources/org/apache/causeway/schema/cmd/cmd-2.0.xsd
+++ b/api/schema/src/main/resources/org/apache/causeway/schema/cmd/cmd-2.0.xsd
@@ -21,13 +21,20 @@
            elementFormDefault="qualified"
            xmlns:xs="http://www.w3.org/2001/XMLSchema";
            xmlns="http://causeway.apache.org/schema/cmd";
-           xmlns:com="http://causeway.apache.org/schema/common";>
+           xmlns:com="http://causeway.apache.org/schema/common";
+           
+           xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"; jaxb:version="2.1"
+           xmlns:annox="http://annox.dev.java.net";
+           jaxb:extensionBindingPrefixes="annox">
 
     <xs:import namespace="http://causeway.apache.org/schema/common"; 
schemaLocation="../common/common-2.0.xsd"/>
 
     <xs:element name="commandsDto">
         <xs:annotation>
             <xs:documentation>Collection of commandDto's</xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.cmd.v2.CommandsDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:complexType>
             <xs:sequence>
@@ -55,6 +62,9 @@
             <xs:documentation>Represents the intention to invoke an action or 
to edit a property, usually on one target object but possibly on multiple 
targets (all of the same type).
                 Commands can also be deferred, which is to say that they can 
be scheduled to be invoked in the background.  In such cases the originating 
command/action which schedules the background commands is called the _parent_ 
of the background commands.
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.cmd.v2.CommandDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:complexType>
             <xs:sequence>
@@ -121,6 +131,9 @@
         <xs:annotation>
             <xs:documentation>Represents the information required to be able 
to invoke an action or modify a property on the target(s).  Specifically, is 
the identifier of the action/property, along with the parameter arguments.  Is 
subclassed by 'actionDto' and 'propertyDto'.
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.cmd.v2.MemberDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:sequence>
             <xs:element name="logicalMemberIdentifier" type="xs:string">
@@ -142,6 +155,9 @@
         <xs:annotation>
             <xs:documentation>Captures the information required to be able to 
invoke an action on the target(s).
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.cmd.v2.ActionDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:complexContent>
             <xs:extension base="memberDto">
@@ -161,6 +177,9 @@
         <xs:annotation>
             <xs:documentation>Captures the information required to be able to 
modify a property on the target(s).
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.cmd.v2.PropertyDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:complexContent>
             <xs:extension base="memberDto">
@@ -175,6 +194,9 @@
         <xs:annotation>
             <xs:documentation>A list of of parameter/argument values.
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.cmd.v2.ParamsDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:sequence minOccurs="0" maxOccurs="unbounded">
             <xs:element name="parameter" type="paramDto"/>
@@ -185,6 +207,9 @@
         <xs:annotation>
             <xs:documentation>Defines an action parameter: its name, type and 
value (ie provided argument).
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.cmd.v2.ParamDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:complexContent>
             <xs:extension base="com:namedValueWithTypeDto">
@@ -193,6 +218,13 @@
     </xs:complexType>
 
     <xs:complexType name="mapDto">
+        <xs:annotation>
+            <xs:documentation>Key value mapping.
+            </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.cmd.v2.MapDto")</annox:annotate>
+            </xs:appinfo>
+        </xs:annotation>
         <xs:sequence>
             <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
                 <xs:complexType>
diff --git 
a/api/schema/src/main/resources/org/apache/causeway/schema/common/common-2.0.xsd
 
b/api/schema/src/main/resources/org/apache/causeway/schema/common/common-2.0.xsd
index b5c88fdfb8..47685f2274 100644
--- 
a/api/schema/src/main/resources/org/apache/causeway/schema/common/common-2.0.xsd
+++ 
b/api/schema/src/main/resources/org/apache/causeway/schema/common/common-2.0.xsd
@@ -22,10 +22,10 @@
            xmlns="http://causeway.apache.org/schema/common";
            xmlns:xs="http://www.w3.org/2001/XMLSchema";
            
-           xmlns:jaxb="http://java.sun.com/xml/ns/jaxb";
+           xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"; jaxb:version="2.1"
            xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc";
-           jaxb:extensionBindingPrefixes="xjc"
-           jaxb:version="1.0">
+           xmlns:annox="http://annox.dev.java.net";
+           jaxb:extensionBindingPrefixes="annox">
            
        <xs:annotation>
           <xs:appinfo>
@@ -36,6 +36,12 @@
        </xs:annotation>
 
     <xs:complexType name="valueDto">
+        <xs:annotation>
+            <xs:documentation>Represents a value of fundamental 
type.</xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.common.v2.ValueDto")</annox:annotate>
+            </xs:appinfo>
+        </xs:annotation>
         <xs:choice minOccurs="0" maxOccurs="1">
             <xs:element name="string" type="xs:string"/>
             <xs:element name="byte" type="xs:byte"/>
@@ -70,6 +76,9 @@
         <xs:annotation>
             <xs:documentation>A fixed-size ordered list of named type/value 
pairs.
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.common.v2.TypedTupleDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:sequence>
             <xs:element name="elements" type="namedValueWithTypeDto" 
minOccurs="1" maxOccurs="unbounded"/>
@@ -79,6 +88,12 @@
     </xs:complexType>
 
     <xs:complexType name="oidDto">
+        <xs:annotation>
+            <xs:documentation>Object identifier.</xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.common.v2.OidDto")</annox:annotate>
+            </xs:appinfo>
+        </xs:annotation>
         <xs:attribute name="type" type="xs:string"/>
         <xs:attribute name="id" type="xs:string"/>
     </xs:complexType>
@@ -87,6 +102,9 @@
         <xs:annotation>
             <xs:documentation>A collection of (argument) values
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.common.v2.CollectionDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:sequence>
             <xs:element name="value" type="valueDto" minOccurs="1" 
maxOccurs="unbounded"/>
@@ -97,8 +115,10 @@
 
     <xs:complexType name="blobDto">
         <xs:annotation>
-            <xs:documentation>A collection of (argument) values
-            </xs:documentation>
+            <xs:documentation>Data type that stores binary 
data.</xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.common.v2.BlobDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:sequence>
             <xs:element name="name" type="xs:string"/>
@@ -109,8 +129,10 @@
 
     <xs:complexType name="clobDto">
         <xs:annotation>
-            <xs:documentation>A collection of (argument) values
-            </xs:documentation>
+            <xs:documentation>Data type that stores textual 
data.</xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.common.v2.ClobDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:sequence>
             <xs:element name="name" type="xs:string"/>
@@ -121,8 +143,10 @@
 
     <xs:complexType name="oidsDto">
         <xs:annotation>
-            <xs:documentation>A list of OIDs
-            </xs:documentation>
+            <xs:documentation>A list of OIDs</xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.common.v2.OidsDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:sequence>
             <xs:element name="oid" type="oidDto" minOccurs="1" 
maxOccurs="unbounded"/>
@@ -130,6 +154,12 @@
     </xs:complexType>
 
     <xs:complexType name="enumDto">
+        <xs:annotation>
+            <xs:documentation>Enumeration</xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.common.v2.EnumDto")</annox:annotate>
+            </xs:appinfo>
+        </xs:annotation>
         <xs:sequence>
             <xs:element name="enumType" type="xs:string"/>
             <xs:element name="enumName" type="xs:string"/>
@@ -137,6 +167,12 @@
     </xs:complexType>
 
     <xs:simpleType name="valueType">
+        <xs:annotation>
+            <xs:documentation>Value type</xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.common.v2.ValueType")</annox:annotate>
+            </xs:appinfo>
+        </xs:annotation>
         <xs:restriction base="xs:string">
                <xs:enumeration value="void">
                 <xs:annotation>
@@ -176,6 +212,9 @@
         <xs:annotation>
             <xs:documentation>Captures a period of time, eg for capturing 
metrics/timings.
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.common.v2.PeriodDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:sequence>
             <xs:element name="startedAt" type="xs:dateTime">
@@ -197,6 +236,9 @@
         <xs:annotation>
             <xs:documentation>Captures a pair of numbers representing a 
difference.  Used for example to capture metrics (number objects modified 
before and after).
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.common.v2.DifferenceType")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:sequence>
         </xs:sequence>
@@ -218,6 +260,9 @@
         <xs:annotation>
             <xs:documentation>Captures both a value and its corresponding 
type.  Used for the return value of action invocations, and for the new value 
in property edits.
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.common.v2.ValueWithTypeDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:complexContent>
             <xs:extension base="valueDto">
@@ -231,6 +276,9 @@
         <xs:annotation>
             <xs:documentation>Defines a named value, a tuple of: name, type 
and value.
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.common.v2.NamedValueWithTypeDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:complexContent>
             <xs:extension base="valueWithTypeDto">
@@ -242,6 +290,9 @@
     <xs:simpleType name="interactionType" >
         <xs:annotation>
             <xs:documentation>Whether this interaction with a member is 
invoking an action, or editing a property.</xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.common.v2.InteractionType")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:restriction base="xs:string">
             <xs:enumeration value="action_invocation" />
diff --git 
a/api/schema/src/main/resources/org/apache/causeway/schema/ixn/ixn-2.0.xsd 
b/api/schema/src/main/resources/org/apache/causeway/schema/ixn/ixn-2.0.xsd
index 7fb1a371a1..df5c642680 100644
--- a/api/schema/src/main/resources/org/apache/causeway/schema/ixn/ixn-2.0.xsd
+++ b/api/schema/src/main/resources/org/apache/causeway/schema/ixn/ixn-2.0.xsd
@@ -23,15 +23,20 @@
            xmlns="http://causeway.apache.org/schema/ixn";
            xmlns:cmd="http://causeway.apache.org/schema/cmd";
            xmlns:com="http://causeway.apache.org/schema/common";
->
+
+            xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"; jaxb:version="2.1"
+            xmlns:annox="http://annox.dev.java.net";
+            jaxb:extensionBindingPrefixes="annox">
 
     <xs:import namespace="http://causeway.apache.org/schema/common"; 
schemaLocation="../common/common-2.0.xsd"/>
     <xs:import namespace="http://causeway.apache.org/schema/cmd"; 
schemaLocation="../cmd/cmd-2.0.xsd"/>
 
     <xs:element name="interactionsDto">
         <xs:annotation>
-            <xs:documentation>A collection of interactions.
-            </xs:documentation>
+            <xs:documentation>A collection of interactions.</xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.ixn.v2.InteractionsDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:complexType>
             <xs:sequence>
@@ -59,6 +64,9 @@
             <xs:documentation>Represents an interaction, that is the execution 
of a command on a target object.
                 There is typically just a single execution per command.  In 
more complex cases though executions can be nested, whereby a top-level 
execution causes other executions, as invoked through a wrapper (Wrapperproxy 
obtained from the WrapperFactory service).
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.ixn.v2.InteractionDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:complexType>
             <xs:sequence>
@@ -95,6 +103,9 @@
         <xs:annotation>
             <xs:documentation>Represents either an action invocation or a 
property edit.  Is subclassed by both.
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.ixn.v2.MemberExecutionDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:sequence>
             <xs:element name="sequence" type="xs:int">
@@ -155,6 +166,11 @@
     </xs:complexType>
 
     <xs:complexType name="actionInvocationDto">
+        <xs:annotation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.ixn.v2.ActionInvocationDto")</annox:annotate>
+            </xs:appinfo>
+        </xs:annotation>
         <xs:complexContent>
             <xs:extension base="memberExecutionDto">
                 <xs:sequence>
@@ -176,6 +192,11 @@
     </xs:complexType>
 
     <xs:complexType name="propertyEditDto">
+        <xs:annotation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.ixn.v2.PropertyEditDto")</annox:annotate>
+            </xs:appinfo>
+        </xs:annotation>
         <xs:complexContent>
             <xs:extension base="memberExecutionDto">
                 <xs:sequence>
@@ -186,6 +207,11 @@
     </xs:complexType>
 
     <xs:complexType name="metricsDto">
+        <xs:annotation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.ixn.v2.MetricsDto")</annox:annotate>
+            </xs:appinfo>
+        </xs:annotation>
         <xs:sequence>
             <xs:element name="timings" type="com:periodDto">
                 <xs:annotation>
@@ -203,6 +229,11 @@
     </xs:complexType>
 
     <xs:complexType name="objectCountsDto">
+        <xs:annotation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.ixn.v2.ObjectCountsDto")</annox:annotate>
+            </xs:appinfo>
+        </xs:annotation>
         <xs:sequence>
             <xs:element name="loaded" type="com:differenceDto">
                 <xs:annotation>
@@ -223,6 +254,9 @@
         <xs:annotation>
             <xs:documentation>Captures any exception thrown by an action 
invocation.  Use as the xsd:type of the 'threw' element.
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.ixn.v2.ExceptionDto")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:sequence>
             <xs:element name="message" type="xs:string"/>
diff --git 
a/api/schema/src/main/resources/org/apache/causeway/schema/metamodel/metamodel-2.0.xsd
 
b/api/schema/src/main/resources/org/apache/causeway/schema/metamodel/metamodel-2.0.xsd
index 6bd23ff88c..238a87bc61 100644
--- 
a/api/schema/src/main/resources/org/apache/causeway/schema/metamodel/metamodel-2.0.xsd
+++ 
b/api/schema/src/main/resources/org/apache/causeway/schema/metamodel/metamodel-2.0.xsd
@@ -1,31 +1,36 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more 
contributor 
+    license agreements. See the NOTICE file distributed with this work for 
additional 
+    information regarding copyright ownership. The ASF licenses this file to 
+    you under the Apache License, Version 2.0 (the "License"); you may not use 
+    this file except in compliance with the License. You may obtain a copy of 
+    the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
+    by applicable law or agreed to in writing, software distributed under the 
+    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 
CONDITIONS 
+    OF ANY KIND, either express or implied. See the License for the specific 
+    language governing permissions and limitations under the License. -->
+<xs:schema
+    targetNamespace="http://causeway.apache.org/schema/metamodel";
+    elementFormDefault="qualified"
+    xmlns="http://causeway.apache.org/schema/metamodel";
+    xmlns:xs="http://www.w3.org/2001/XMLSchema";
 
-         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.
--->
-<xs:schema targetNamespace="http://causeway.apache.org/schema/metamodel";
-           elementFormDefault="qualified"
-           xmlns="http://causeway.apache.org/schema/metamodel";
-           xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+    xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"; jaxb:version="2.1"
+    xmlns:annox="http://annox.dev.java.net";
+    jaxb:extensionBindingPrefixes="annox">
 
     <xs:element name="metamodelDto">
         <xs:complexType>
+            <xs:annotation>
+                <xs:documentation>Represents a collection of domain
+                    classes, the metamodel.
+                </xs:documentation>
+                <xs:appinfo>
+                    
<annox:annotate>@javax.inject.Named("causeway.schema.metamodel.v2.MetamodelDto")</annox:annotate>
+                </xs:appinfo>
+            </xs:annotation>
             <xs:sequence minOccurs="1" maxOccurs="unbounded">
-                <xs:element ref="domainClassDto"/>
+                <xs:element ref="domainClassDto" />
             </xs:sequence>
         </xs:complexType>
     </xs:element>
@@ -34,70 +39,105 @@
         <xs:complexType>
             <xs:annotation>
                 <xs:documentation>Represents a domain class.
-                    Corresponds to ObjectSpecification in the internal 
metamodel.
+                    Corresponds
+                    to ObjectSpecification in the internal metamodel.
                 </xs:documentation>
+                <xs:appinfo>
+                    
<annox:annotate>@javax.inject.Named("causeway.schema.metamodel.v2.DomainClassDto")
+                    </annox:annotate>
+                </xs:appinfo>
             </xs:annotation>
             <xs:complexContent>
                 <xs:extension base="facetHolder">
                     <xs:sequence>
-                        <xs:element name="majorVersion" type="xs:string" 
minOccurs="0" maxOccurs="1" default="2">
+                        <xs:element name="majorVersion"
+                            type="xs:string" minOccurs="0" maxOccurs="1"
+                            default="2">
                             <xs:annotation>
-                                <xs:documentation>The major version of the 
schema that an XML instance was created using.
+                                <xs:documentation>The major version of
+                                    the schema that an XML instance was
+                                    created using.
                                 </xs:documentation>
                             </xs:annotation>
                         </xs:element>
-                        <xs:element name="minorVersion" type="xs:string" 
minOccurs="0" maxOccurs="1" default="0">
+                        <xs:element name="minorVersion"
+                            type="xs:string" minOccurs="0" maxOccurs="1"
+                            default="0">
                             <xs:annotation>
-                                <xs:documentation>The minor version of the 
schema that an XML instance was created using.
+                                <xs:documentation>The minor version of
+                                    the schema that an XML instance was
+                                    created using.
                                 </xs:documentation>
                             </xs:annotation>
                         </xs:element>
-                        <xs:element name="properties" minOccurs="0">
+                        <xs:element name="properties"
+                            minOccurs="0">
                             <xs:annotation>
-                                <xs:documentation>The properties, if any, of 
this domain class.  This will include any mixin properties.
+                                <xs:documentation>The properties, if
+                                    any, of this domain class. This will
+                                    include any mixin properties.
                                 </xs:documentation>
                             </xs:annotation>
                             <xs:complexType>
                                 <xs:sequence>
-                                    <xs:element name="prop" type="property" 
minOccurs="0" maxOccurs="unbounded"/>
+                                    <xs:element name="prop"
+                                        type="property" minOccurs="0"
+                                        maxOccurs="unbounded" />
                                 </xs:sequence>
                             </xs:complexType>
                         </xs:element>
-                        <xs:element name="collections" minOccurs="0">
+                        <xs:element name="collections"
+                            minOccurs="0">
                             <xs:annotation>
-                                <xs:documentation>The collections, if any, of 
this domain class.  This will include any mixin collections.
+                                <xs:documentation>The collections, if
+                                    any, of this domain class. This will
+                                    include any mixin collections.
                                 </xs:documentation>
                             </xs:annotation>
                             <xs:complexType>
                                 <xs:sequence>
-                                    <xs:element name="coll" type="collection" 
minOccurs="0" maxOccurs="unbounded"/>
+                                    <xs:element name="coll"
+                                        type="collection" minOccurs="0"
+                                        maxOccurs="unbounded" />
                                 </xs:sequence>
                             </xs:complexType>
                         </xs:element>
-                        <xs:element name="actions" minOccurs="0">
+                        <xs:element name="actions"
+                            minOccurs="0">
                             <xs:annotation>
-                                <xs:documentation>The actions, if any, of this 
domain class.  This will include any mixin actions.
+                                <xs:documentation>The actions, if any,
+                                    of this domain class. This will
+                                    include any mixin actions.
                                 </xs:documentation>
                             </xs:annotation>
                             <xs:complexType>
                                 <xs:sequence>
-                                    <xs:element name="act" type="action" 
minOccurs="0" maxOccurs="unbounded"/>
+                                    <xs:element name="act"
+                                        type="action" minOccurs="0"
+                                        maxOccurs="unbounded" />
                                 </xs:sequence>
                             </xs:complexType>
                         </xs:element>
                     </xs:sequence>
                     <xs:attribute name="id" type="xs:ID">
                         <xs:annotation>
-                            <xs:documentation>The fully qualified class name 
of the underlying Java class.
-                                This is declared as 'xs:ID' so can be 
referenced elsewhere (using 'xs:IDREF')
+                            <xs:documentation>The fully qualified class
+                                name of the underlying Java class.
+                                This
+                                is declared as 'xs:ID' so can be
+                                referenced elsewhere (using 'xs:IDREF')
 
-                                In the internal metamodel, corresponds to 
ObjectSpecification#getFullIdentifier()
+                                In the internal metamodel, corresponds
+                                to
+                                ObjectSpecification#getFullIdentifier()
                             </xs:documentation>
                         </xs:annotation>
                     </xs:attribute>
-                    <xs:attribute name="service" type="xs:boolean">
+                    <xs:attribute name="service"
+                        type="xs:boolean">
                         <xs:annotation>
-                            <xs:documentation>Whether this is a domain 
service</xs:documentation>
+                            <xs:documentation>Whether this is a domain
+                                service</xs:documentation>
                         </xs:annotation>
                     </xs:attribute>
                 </xs:extension>
@@ -107,48 +147,61 @@
 
 
     <xs:complexType name="member">
-       <xs:annotation>
-               <xs:documentation>
-                       Represents a member of a class (property, collection or
-                       action). Corresponds to ObjectMember in the internal
-                       metamodel.
-               </xs:documentation>
-       </xs:annotation>
-       <xs:complexContent>
-               <xs:extension base="facetHolder">
-                       <xs:attribute name="id" type="xs:string">
-                               <xs:annotation>
-                                       <xs:documentation>
-                                               The id of the member, which 
should be unique
-                                               within the domain class. NB: 
this assumes no
-                                               overloading of method names.
-                                       </xs:documentation>
-                               </xs:annotation>
-                       </xs:attribute>
-                       <xs:attribute name="mixedIn" type="xs:boolean" 
use="required">
-                               <xs:annotation>
-                                       <xs:documentation>
-                                               Whether the member (action, 
property or collection) is mixed in.
-                                       </xs:documentation>
-                               </xs:annotation>
-                       </xs:attribute>
-               </xs:extension>
-       </xs:complexContent>
+        <xs:annotation>
+            <xs:documentation>
+                Represents a member of a class (property, collection or
+                action). Corresponds to ObjectMember in the internal
+                metamodel.
+            </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.metamodel.v2.Member")
+                </annox:annotate>
+            </xs:appinfo>
+        </xs:annotation>
+        <xs:complexContent>
+            <xs:extension base="facetHolder">
+                <xs:attribute name="id" type="xs:string">
+                    <xs:annotation>
+                        <xs:documentation>
+                            The id of the member, which should be unique
+                            within the domain class. NB: this assumes no
+                            overloading of method names.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:attribute>
+                <xs:attribute name="mixedIn"
+                    type="xs:boolean" use="required">
+                    <xs:annotation>
+                        <xs:documentation>
+                            Whether the member (action, property or 
collection) is mixed in.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:attribute>
+            </xs:extension>
+        </xs:complexContent>
     </xs:complexType>
 
     <xs:complexType name="property">
         <xs:annotation>
             <xs:documentation>Represents a property of a domain class.
-                Corresponds to OneToOneAssociation in the internal metamodel.
+                Corresponds to OneToOneAssociation in the internal
+                metamodel.
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.metamodel.v2.Property")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:complexContent>
             <xs:extension base="member">
                 <xs:sequence>
                     <xs:element name="type" type="xs:IDREF">
                         <xs:annotation>
-                            <xs:documentation>A (reference to ) the type of 
this property, eg a String or a Customer.
-                                Corresponds to 
OneToOneAssociation#getSpecification() in the internal metamodel.
+                            <xs:documentation>A (reference to ) the type
+                                of this property, eg a String or a
+                                Customer.
+                                Corresponds to
+                                OneToOneAssociation#getSpecification()
+                                in the internal metamodel.
                             </xs:documentation>
                         </xs:annotation>
                     </xs:element>
@@ -160,16 +213,24 @@
     <xs:complexType name="collection">
         <xs:annotation>
             <xs:documentation>Represents a collection of a domain class.
-                Corresponds to OneToManyAssociation in the internal metamodel.
+                Corresponds to OneToManyAssociation in the internal
+                metamodel.
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.metamodel.v2.Collection")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:complexContent>
             <xs:extension base="member">
                 <xs:sequence>
                     <xs:element name="type" type="xs:IDREF">
                         <xs:annotation>
-                            <xs:documentation>A (reference to ) the _element_ 
type of this collection, eg a String or a Customer.
-                                Corresponds to 
OneToOneAssociation#getSpecification() in the internal metamodel.
+                            <xs:documentation>A (reference to ) the
+                                _element_ type of this collection, eg a
+                                String or a Customer.
+                                Corresponds to
+                                OneToOneAssociation#getSpecification()
+                                in the internal metamodel.
                             </xs:documentation>
                         </xs:annotation>
                     </xs:element>
@@ -183,21 +244,31 @@
             <xs:documentation>Represents an action of a domain class.
                 Corresponds to ObjectAction in the internal metamodel.
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.metamodel.v2.Action")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:complexContent>
             <xs:extension base="member">
                 <xs:sequence>
-                    <xs:element name="returnType" type="xs:IDREF">
+                    <xs:element name="returnType"
+                        type="xs:IDREF">
                         <xs:annotation>
-                            <xs:documentation>A (reference to) the return type 
of this action, eg a String or a Customer.
-                                Corresponds to ObjectAction#getReturnType() in 
the internal metamodel.
+                            <xs:documentation>A (reference to) the
+                                return type of this action, eg a String
+                                or a Customer.
+                                Corresponds to
+                                ObjectAction#getReturnType() in the
+                                internal metamodel.
                             </xs:documentation>
                         </xs:annotation>
                     </xs:element>
                     <xs:element name="params">
                         <xs:complexType>
                             <xs:sequence>
-                                <xs:element name="param" type="param" 
minOccurs="0" maxOccurs="unbounded"/>
+                                <xs:element name="param"
+                                    type="param" minOccurs="0"
+                                    maxOccurs="unbounded" />
                             </xs:sequence>
                         </xs:complexType>
                     </xs:element>
@@ -209,24 +280,35 @@
     <xs:complexType name="param">
         <xs:annotation>
             <xs:documentation>Represents the parameter of an action
-                Corresponds to ObjectActionParameter in the internal metamodel.
+                Corresponds to ObjectActionParameter in the internal
+                metamodel.
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.metamodel.v2.Param")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:complexContent>
             <xs:extension base="facetHolder">
                 <xs:sequence>
                     <xs:element name="type" type="xs:IDREF">
                         <xs:annotation>
-                            <xs:documentation>(A reference to) the type of 
this action parameter, eg a String or a Customer.
-                                For vector parameters, this is the element 
types of the collection parameter.
-                                Corresponds to 
ObjectActionParameter#getSpecification() in the internal metamodel.
+                            <xs:documentation>(A reference to) the type
+                                of this action parameter, eg a String or
+                                a Customer.
+                                For vector parameters, this
+                                is the element types of the collection
+                                parameter.
+                                Corresponds to
+                                ObjectActionParameter#getSpecification()
+                                in the internal metamodel.
                             </xs:documentation>
                         </xs:annotation>
                     </xs:element>
                 </xs:sequence>
                 <xs:attribute name="id" type="xs:string">
                     <xs:annotation>
-                        <xs:documentation>The id of the parameter, which 
should be unique within the action.
+                        <xs:documentation>The id of the parameter, which
+                            should be unique within the action.
                         </xs:documentation>
                     </xs:annotation>
                 </xs:attribute>
@@ -237,8 +319,12 @@
     <xs:complexType name="scalarParam">
         <xs:annotation>
             <xs:documentation>Represents a parameter of an action
-                Corresponds to OneToOneActionParameter in the internal 
metamodel.
+                Corresponds to OneToOneActionParameter in the internal
+                metamodel.
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.metamodel.v2.ScalarParam")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:complexContent>
             <xs:extension base="param">
@@ -250,9 +336,14 @@
 
     <xs:complexType name="vectorParam">
         <xs:annotation>
-            <xs:documentation>Represents a multi-valued parameter of an action
-                Corresponds to OneToManyActionParameter in the internal 
metamodel.
+            <xs:documentation>Represents a multi-valued parameter of an
+                action
+                Corresponds to OneToManyActionParameter in the
+                internal metamodel.
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.metamodel.v2.VectorParam")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:complexContent>
             <xs:extension base="param">
@@ -262,90 +353,104 @@
         </xs:complexContent>
     </xs:complexType>
 
-       <xs:complexType name="facetHolder">
-               <xs:annotation>
-                       <xs:documentation>
-                               Corresponds to FacetHolder interface in the 
internal metamodel.
-                       </xs:documentation>
-               </xs:annotation>
-               <xs:complexContent>
-                       <xs:extension base="metamodelElement">
-                               <xs:sequence>
-                                       <xs:element name="facets" minOccurs="0">
-                                               <xs:complexType>
-                                                       <xs:sequence>
-                                                               <xs:element 
name="facet" type="facet" minOccurs="0"
-                                                                       
maxOccurs="unbounded" />
-                                                       </xs:sequence>
-                                               </xs:complexType>
-                                       </xs:element>
-                               </xs:sequence>
-                       </xs:extension>
-               </xs:complexContent>
-       </xs:complexType>
+    <xs:complexType name="facetHolder">
+        <xs:annotation>
+            <xs:documentation>
+                Corresponds to FacetHolder interface in the internal metamodel.
+            </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.metamodel.v2.FacetHolder")</annox:annotate>
+            </xs:appinfo>
+        </xs:annotation>
+        <xs:complexContent>
+            <xs:extension base="metamodelElement">
+                <xs:sequence>
+                    <xs:element name="facets" minOccurs="0">
+                        <xs:complexType>
+                            <xs:sequence>
+                                <xs:element name="facet"
+                                    type="facet" minOccurs="0"
+                                    maxOccurs="unbounded" />
+                            </xs:sequence>
+                        </xs:complexType>
+                    </xs:element>
+                </xs:sequence>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
 
-       <xs:complexType name="facet">
-               <xs:annotation>
-                       <xs:documentation>
-                               Describes a facet of the metamodel, for example 
whether
-                               an action can be disabled, or the name of a 
class.
-                               Corresponds to Facet interface in the internal
-                               metamodel.
-                       </xs:documentation>
-               </xs:annotation>
-               <xs:complexContent>
-                       <xs:extension base="metamodelElement">
-                               <xs:sequence>
-                                       <xs:element name="attr" 
type="facetAttr" minOccurs="0"
-                                               maxOccurs="unbounded" />        
                        </xs:sequence>
-                               <xs:attribute name="id" type="xs:string">
-                                       <xs:annotation>
-                                               <xs:documentation>
-                                                       The facet type (fqcn) 
that is common to a set of
-                                                       concrete facet 
implementations. These ids are
-                                                       usually known to the 
framework for there well
-                                                       defined semantics 
within the programming model.
-                                               </xs:documentation>
-                                       </xs:annotation>
-                               </xs:attribute>
-                               <xs:attribute name="fqcn" type="xs:string" />
-                       </xs:extension>
-               </xs:complexContent>
-       </xs:complexType>
+    <xs:complexType name="facet">
+        <xs:annotation>
+            <xs:documentation>
+                Describes a facet of the metamodel, for example whether
+                an action can be disabled, or the name of a class.
+                Corresponds to Facet interface in the internal
+                metamodel.
+            </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.metamodel.v2.Facet")</annox:annotate>
+            </xs:appinfo>
+        </xs:annotation>
+        <xs:complexContent>
+            <xs:extension base="metamodelElement">
+                <xs:sequence>
+                    <xs:element name="attr" type="facetAttr"
+                        minOccurs="0" maxOccurs="unbounded" />                
</xs:sequence>
+                <xs:attribute name="id" type="xs:string">
+                    <xs:annotation>
+                        <xs:documentation>
+                            The facet type (fqcn) that is common to a set of
+                            concrete facet implementations. These ids are
+                            usually known to the framework for there well
+                            defined semantics within the programming model.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:attribute>
+                <xs:attribute name="fqcn" type="xs:string" />
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
 
-       <xs:complexType name="facetAttr">
-               <xs:annotation>
-                       <xs:documentation>
-                               Describes an attribute of a facet of the 
metamodel, as a
-                               simple key/value pair of strings (the key is 
modelled as
-                               an attribute of the value).
-                       </xs:documentation>
-               </xs:annotation>
-               <xs:complexContent>
-                       <xs:extension base="metamodelElement">
-                               <xs:attribute name="name" type="xs:string">
-                                       <xs:annotation>
-                                               <xs:documentation>
-                                                       The name of the 
attribute, unique across all
-                                                       facet attributes of a 
facet.
-                                               </xs:documentation>
-                                       </xs:annotation>
-                               </xs:attribute>
-                               <xs:attribute name="value" type="xs:string">
-                                       <xs:annotation>
-                                               <xs:documentation>
-                                                       The value of the 
attribute.
-                                               </xs:documentation>
-                                       </xs:annotation>
-                               </xs:attribute>
-                       </xs:extension>
-               </xs:complexContent>
-       </xs:complexType>
+    <xs:complexType name="facetAttr">
+        <xs:annotation>
+            <xs:documentation>
+                Describes an attribute of a facet of the metamodel, as a
+                simple key/value pair of strings (the key is modelled as
+                an attribute of the value).
+            </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.metamodel.v2.FacetAttr")</annox:annotate>
+            </xs:appinfo>
+        </xs:annotation>
+        <xs:complexContent>
+            <xs:extension base="metamodelElement">
+                <xs:attribute name="name" type="xs:string">
+                    <xs:annotation>
+                        <xs:documentation>
+                            The name of the attribute, unique across all
+                            facet attributes of a facet.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:attribute>
+                <xs:attribute name="value" type="xs:string">
+                    <xs:annotation>
+                        <xs:documentation>
+                            The value of the attribute.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:attribute>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
 
-       <xs:complexType name="annotation">
+    <xs:complexType name="annotation">
         <xs:annotation>
-            <xs:documentation>Not part of the metamodel. Enables export tools 
to add arbitrary meta data.
+            <xs:documentation>Not part of the metamodel. Enables export
+                tools to add arbitrary meta data.
             </xs:documentation>
+            <xs:appinfo>
+                
<annox:annotate>@javax.inject.Named("causeway.schema.metamodel.v2.Annotation")</annox:annotate>
+            </xs:appinfo>
         </xs:annotation>
         <xs:simpleContent>
             <xs:extension base="xs:string">
@@ -363,24 +468,31 @@
         </xs:simpleContent>
     </xs:complexType>
 
-       <xs:complexType name="metamodelElement">
+    <xs:complexType name="metamodelElement">
         <xs:annotation>
-               <xs:documentation>Common ancestor of facet and 
facetHolder.</xs:documentation>
-        </xs:annotation>
+            <xs:documentation>Common ancestor of facet and facetHolder.
+            </xs:documentation>
+            <xs:appinfo>
+            
<annox:annotate>@javax.inject.Named("causeway.schema.metamodel.v2.MetamodelElement")</annox:annotate>
+        </xs:appinfo>
+        </xs:annotation>
         <xs:sequence>
-                       <xs:element name="annotations" minOccurs="0">
-                               <xs:annotation>
-                                       <xs:documentation>Not part of the 
metamodel. Enables export tools
-                                               to add arbitrary meta 
data.</xs:documentation>
-                               </xs:annotation>
-                               <xs:complexType>
-                                       <xs:sequence>
-                                               <xs:element name="asList" 
type="annotation"
-                                                       minOccurs="0" 
maxOccurs="unbounded" />
-                                       </xs:sequence>
-                               </xs:complexType>
-                       </xs:element>
-               </xs:sequence>
-       </xs:complexType>
-    
+            <xs:element name="annotations" minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>Not part of the metamodel. Enables
+                        export tools
+                        to add arbitrary meta data.
+                    </xs:documentation>
+                </xs:annotation>
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="asList"
+                            type="annotation" minOccurs="0"
+                            maxOccurs="unbounded" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
 </xs:schema>

Reply via email to