-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly tracking the scoped methods of ObjectFactory (fixes #72).
- Loading branch information
Showing
9 changed files
with
297 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
140 changes: 140 additions & 0 deletions
140
src/test/generated_resources/inner_scoped_element/Catalogue.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
|
||
package inner_scoped_element; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import jakarta.xml.bind.JAXBElement; | ||
import jakarta.xml.bind.annotation.XmlAccessType; | ||
import jakarta.xml.bind.annotation.XmlAccessorType; | ||
import jakarta.xml.bind.annotation.XmlElement; | ||
import jakarta.xml.bind.annotation.XmlElementRef; | ||
import jakarta.xml.bind.annotation.XmlElementRefs; | ||
import jakarta.xml.bind.annotation.XmlElementWrapper; | ||
import jakarta.xml.bind.annotation.XmlRootElement; | ||
import jakarta.xml.bind.annotation.XmlType; | ||
|
||
|
||
/** | ||
* <p>Java class for anonymous complex type. | ||
* | ||
* <p>The following schema fragment specifies the expected content contained within this class. | ||
* | ||
* <pre> | ||
* <complexType> | ||
* <complexContent> | ||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> | ||
* <sequence> | ||
* <element name="stockage_collection"> | ||
* <complexType> | ||
* <complexContent> | ||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> | ||
* <sequence minOccurs="0"> | ||
* <element name="stockage" maxOccurs="unbounded" minOccurs="0"> | ||
* <complexType> | ||
* <complexContent> | ||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> | ||
* <all> | ||
* <element name="collection" minOccurs="0"> | ||
* <complexType> | ||
* <complexContent> | ||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> | ||
* <sequence maxOccurs="unbounded" minOccurs="0"> | ||
* <element name="effect" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> | ||
* <element name="term" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> | ||
* </sequence> | ||
* </restriction> | ||
* </complexContent> | ||
* </complexType> | ||
* </element> | ||
* </all> | ||
* </restriction> | ||
* </complexContent> | ||
* </complexType> | ||
* </element> | ||
* </sequence> | ||
* </restriction> | ||
* </complexContent> | ||
* </complexType> | ||
* </element> | ||
* </sequence> | ||
* </restriction> | ||
* </complexContent> | ||
* </complexType> | ||
* </pre> | ||
* | ||
* | ||
*/ | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
@XmlType(name = "", propOrder = { | ||
"stockageCollection" | ||
}) | ||
@XmlRootElement(name = "catalogue") | ||
public class Catalogue { | ||
|
||
@XmlElementWrapper(name = "stockage_collection", required = true) | ||
@XmlElement(name = "stockage") | ||
protected List<Catalogue.Stockage> stockageCollection = new ArrayList<Catalogue.Stockage>(); | ||
|
||
public List<Catalogue.Stockage> getStockageCollection() { | ||
return stockageCollection; | ||
} | ||
|
||
public void setStockageCollection(List<Catalogue.Stockage> stockageCollection) { | ||
this.stockageCollection = stockageCollection; | ||
} | ||
|
||
|
||
/** | ||
* <p>Java class for anonymous complex type. | ||
* | ||
* <p>The following schema fragment specifies the expected content contained within this class. | ||
* | ||
* <pre> | ||
* <complexType> | ||
* <complexContent> | ||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> | ||
* <all> | ||
* <element name="collection" minOccurs="0"> | ||
* <complexType> | ||
* <complexContent> | ||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> | ||
* <sequence maxOccurs="unbounded" minOccurs="0"> | ||
* <element name="effect" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> | ||
* <element name="term" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> | ||
* </sequence> | ||
* </restriction> | ||
* </complexContent> | ||
* </complexType> | ||
* </element> | ||
* </all> | ||
* </restriction> | ||
* </complexContent> | ||
* </complexType> | ||
* </pre> | ||
* | ||
* | ||
*/ | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
@XmlType(name = "", propOrder = { | ||
|
||
}) | ||
public static class Stockage { | ||
|
||
@XmlElementWrapper | ||
@XmlElementRefs({ | ||
@XmlElementRef(name = "effect", type = JAXBElement.class, required = false), | ||
@XmlElementRef(name = "term", type = JAXBElement.class, required = false) | ||
}) | ||
protected List<JAXBElement<String>> collection = new ArrayList<JAXBElement<String>>(); | ||
|
||
public List<JAXBElement<String>> getCollection() { | ||
return collection; | ||
} | ||
|
||
public void setCollection(List<JAXBElement<String>> collection) { | ||
this.collection = collection; | ||
} | ||
|
||
} | ||
|
||
} |
63 changes: 63 additions & 0 deletions
63
src/test/generated_resources/inner_scoped_element/ObjectFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
|
||
package inner_scoped_element; | ||
|
||
import javax.xml.namespace.QName; | ||
import jakarta.xml.bind.JAXBElement; | ||
import jakarta.xml.bind.annotation.XmlElementDecl; | ||
import jakarta.xml.bind.annotation.XmlRegistry; | ||
|
||
|
||
/** | ||
* This object contains factory methods for each | ||
* Java content interface and Java element interface | ||
* generated in the inner_scoped_element package. | ||
* <p>An ObjectFactory allows you to programatically | ||
* construct new instances of the Java representation | ||
* for XML content. The Java representation of XML | ||
* content can consist of schema derived interfaces | ||
* and classes representing the binding of schema | ||
* type definitions, element declarations and model | ||
* groups. Factory methods for each of these are | ||
* provided in this class. | ||
* | ||
*/ | ||
@XmlRegistry | ||
public class ObjectFactory { | ||
|
||
private final static QName _CatalogueStockageCollectionStockageCollectionEffect_QNAME = new QName("", "effect"); | ||
private final static QName _CatalogueStockageCollectionStockageCollectionTerm_QNAME = new QName("", "term"); | ||
|
||
/** | ||
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: inner_scoped_element | ||
* | ||
*/ | ||
public ObjectFactory() { | ||
} | ||
|
||
/** | ||
* Create an instance of {@link Catalogue } | ||
* | ||
*/ | ||
public Catalogue createCatalogue() { | ||
return new Catalogue(); | ||
} | ||
|
||
/** | ||
* Create an instance of {@link Catalogue.Stockage } | ||
* | ||
*/ | ||
public Catalogue.Stockage createCatalogueStockage() { | ||
return new Catalogue.Stockage(); | ||
} | ||
|
||
@XmlElementDecl(namespace = "", name = "effect", scope = Catalogue.Stockage.class) | ||
public JAXBElement<String> createCatalogueStockageEffect(String value) { | ||
return new JAXBElement<String>(new QName("", "effect"), String.class, Catalogue.Stockage.class, value); | ||
} | ||
|
||
@XmlElementDecl(namespace = "", name = "term", scope = Catalogue.Stockage.class) | ||
public JAXBElement<String> createCatalogueStockageTerm(String value) { | ||
return new JAXBElement<String>(new QName("", "term"), String.class, Catalogue.Stockage.class, value); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.