-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OpenDoPE optional standardised answer file format.
- Loading branch information
Showing
9 changed files
with
436 additions
and
1 deletion.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
|
||
package org.opendope.answers; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlAttribute; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
import javax.xml.bind.annotation.XmlType; | ||
import javax.xml.bind.annotation.XmlValue; | ||
|
||
|
||
/** | ||
* <p>Java class for anonymous complex type. | ||
* | ||
* <p>The following schema fragment specifies the expected content contained within this class. | ||
* | ||
* <pre> | ||
* <complexType> | ||
* <simpleContent> | ||
* <extension base="<http://www.w3.org/2001/XMLSchema>string"> | ||
* <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> | ||
* </extension> | ||
* </simpleContent> | ||
* </complexType> | ||
* </pre> | ||
* | ||
* | ||
*/ | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
@XmlType(name = "", propOrder = { | ||
"value" | ||
}) | ||
@XmlRootElement(name = "answer") | ||
public class Answer { | ||
|
||
@XmlValue | ||
protected String value; | ||
@XmlAttribute(required = true) | ||
protected String id; | ||
|
||
/** | ||
* Gets the value of the value property. | ||
* | ||
* @return | ||
* possible object is | ||
* {@link String } | ||
* | ||
*/ | ||
public String getValue() { | ||
return value; | ||
} | ||
|
||
/** | ||
* Sets the value of the value property. | ||
* | ||
* @param value | ||
* allowed object is | ||
* {@link String } | ||
* | ||
*/ | ||
public void setValue(String value) { | ||
this.value = value; | ||
} | ||
|
||
/** | ||
* Gets the value of the id property. | ||
* | ||
* @return | ||
* possible object is | ||
* {@link String } | ||
* | ||
*/ | ||
public String getId() { | ||
return id; | ||
} | ||
|
||
/** | ||
* Sets the value of the id property. | ||
* | ||
* @param value | ||
* allowed object is | ||
* {@link String } | ||
* | ||
*/ | ||
public void setId(String value) { | ||
this.id = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
|
||
package org.opendope.answers; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlElements; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
import javax.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> | ||
* <choice maxOccurs="unbounded"> | ||
* <element ref="{http://opendope.org/answers}answer" minOccurs="0"/> | ||
* <element ref="{http://opendope.org/answers}repeat" minOccurs="0"/> | ||
* </choice> | ||
* </sequence> | ||
* </restriction> | ||
* </complexContent> | ||
* </complexType> | ||
* </pre> | ||
* | ||
* | ||
*/ | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
@XmlType(namespace = "http://opendope.org/answers", name = "", propOrder = { | ||
"answerOrRepeat" | ||
}) | ||
@XmlRootElement(name = "answers") | ||
public class Answers { | ||
|
||
@XmlElements({ | ||
@XmlElement(name = "answer", type = Answer.class), | ||
@XmlElement(name = "repeat", type = Repeat.class) | ||
}) | ||
protected List<Object> answerOrRepeat; | ||
|
||
/** | ||
* Gets the value of the answerOrRepeat property. | ||
* | ||
* <p> | ||
* This accessor method returns a reference to the live list, | ||
* not a snapshot. Therefore any modification you make to the | ||
* returned list will be present inside the JAXB object. | ||
* This is why there is not a <CODE>set</CODE> method for the answerOrRepeat property. | ||
* | ||
* <p> | ||
* For example, to add a new item, do as follows: | ||
* <pre> | ||
* getAnswerOrRepeat().add(newItem); | ||
* </pre> | ||
* | ||
* | ||
* <p> | ||
* Objects of the following type(s) are allowed in the list | ||
* {@link Answer } | ||
* {@link Repeat } | ||
* | ||
* | ||
*/ | ||
public List<Object> getAnswerOrRepeat() { | ||
if (answerOrRepeat == null) { | ||
answerOrRepeat = new ArrayList<Object>(); | ||
} | ||
return this.answerOrRepeat; | ||
} | ||
|
||
} |
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,64 @@ | ||
|
||
package org.opendope.answers; | ||
|
||
import javax.xml.bind.annotation.XmlRegistry; | ||
|
||
|
||
/** | ||
* This object contains factory methods for each | ||
* Java content interface and Java element interface | ||
* generated in the org.opendope.answers 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 { | ||
|
||
|
||
/** | ||
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.opendope.answers | ||
* | ||
*/ | ||
public ObjectFactory() { | ||
} | ||
|
||
/** | ||
* Create an instance of {@link Repeat } | ||
* | ||
*/ | ||
public Repeat createRepeat() { | ||
return new Repeat(); | ||
} | ||
|
||
/** | ||
* Create an instance of {@link Answers } | ||
* | ||
*/ | ||
public Answers createAnswers() { | ||
return new Answers(); | ||
} | ||
|
||
/** | ||
* Create an instance of {@link Repeat.Row } | ||
* | ||
*/ | ||
public Repeat.Row createRepeatRow() { | ||
return new Repeat.Row(); | ||
} | ||
|
||
/** | ||
* Create an instance of {@link Answer } | ||
* | ||
*/ | ||
public Answer createAnswer() { | ||
return new Answer(); | ||
} | ||
|
||
} |
Oops, something went wrong.