org.hl7.fhir.ElementDefinitionConstraint Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quick Show documentation
Show all versions of quick Show documentation
The quick library for the Clinical Quality Language Java reference implementation
//
// This file was generated by the Eclipse Implementation of JAXB, v3.0.2
// See https://eclipse-ee4j.github.io/jaxb-ri
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2024.03.21 at 12:42:34 PM MDT
//
package org.hl7.fhir;
import java.util.Collection;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.HashCode2;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions
*
* Java class for ElementDefinition.Constraint complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="ElementDefinition.Constraint">
* <complexContent>
* <extension base="{http://hl7.org/fhir}Element">
* <sequence>
* <element name="key" type="{http://hl7.org/fhir}id"/>
* <element name="requirements" type="{http://hl7.org/fhir}string" minOccurs="0"/>
* <element name="severity" type="{http://hl7.org/fhir}ConstraintSeverity"/>
* <element name="human" type="{http://hl7.org/fhir}string"/>
* <element name="expression" type="{http://hl7.org/fhir}string" minOccurs="0"/>
* <element name="xpath" type="{http://hl7.org/fhir}string"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ElementDefinition.Constraint", propOrder = {
"key",
"requirements",
"severity",
"human",
"expression",
"xpath"
})
public class ElementDefinitionConstraint
extends Element
implements Equals2, HashCode2, ToString2
{
@XmlElement(required = true)
protected Id key;
protected org.hl7.fhir.String requirements;
@XmlElement(required = true)
protected ConstraintSeverity severity;
@XmlElement(required = true)
protected org.hl7.fhir.String human;
protected org.hl7.fhir.String expression;
@XmlElement(required = true)
protected org.hl7.fhir.String xpath;
/**
* Gets the value of the key property.
*
* @return
* possible object is
* {@link Id }
*
*/
public Id getKey() {
return key;
}
/**
* Sets the value of the key property.
*
* @param value
* allowed object is
* {@link Id }
*
*/
public void setKey(Id value) {
this.key = value;
}
/**
* Gets the value of the requirements property.
*
* @return
* possible object is
* {@link org.hl7.fhir.String }
*
*/
public org.hl7.fhir.String getRequirements() {
return requirements;
}
/**
* Sets the value of the requirements property.
*
* @param value
* allowed object is
* {@link org.hl7.fhir.String }
*
*/
public void setRequirements(org.hl7.fhir.String value) {
this.requirements = value;
}
/**
* Gets the value of the severity property.
*
* @return
* possible object is
* {@link ConstraintSeverity }
*
*/
public ConstraintSeverity getSeverity() {
return severity;
}
/**
* Sets the value of the severity property.
*
* @param value
* allowed object is
* {@link ConstraintSeverity }
*
*/
public void setSeverity(ConstraintSeverity value) {
this.severity = value;
}
/**
* Gets the value of the human property.
*
* @return
* possible object is
* {@link org.hl7.fhir.String }
*
*/
public org.hl7.fhir.String getHuman() {
return human;
}
/**
* Sets the value of the human property.
*
* @param value
* allowed object is
* {@link org.hl7.fhir.String }
*
*/
public void setHuman(org.hl7.fhir.String value) {
this.human = value;
}
/**
* Gets the value of the expression property.
*
* @return
* possible object is
* {@link org.hl7.fhir.String }
*
*/
public org.hl7.fhir.String getExpression() {
return expression;
}
/**
* Sets the value of the expression property.
*
* @param value
* allowed object is
* {@link org.hl7.fhir.String }
*
*/
public void setExpression(org.hl7.fhir.String value) {
this.expression = value;
}
/**
* Gets the value of the xpath property.
*
* @return
* possible object is
* {@link org.hl7.fhir.String }
*
*/
public org.hl7.fhir.String getXpath() {
return xpath;
}
/**
* Sets the value of the xpath property.
*
* @param value
* allowed object is
* {@link org.hl7.fhir.String }
*
*/
public void setXpath(org.hl7.fhir.String value) {
this.xpath = value;
}
public ElementDefinitionConstraint withKey(Id value) {
setKey(value);
return this;
}
public ElementDefinitionConstraint withRequirements(org.hl7.fhir.String value) {
setRequirements(value);
return this;
}
public ElementDefinitionConstraint withSeverity(ConstraintSeverity value) {
setSeverity(value);
return this;
}
public ElementDefinitionConstraint withHuman(org.hl7.fhir.String value) {
setHuman(value);
return this;
}
public ElementDefinitionConstraint withExpression(org.hl7.fhir.String value) {
setExpression(value);
return this;
}
public ElementDefinitionConstraint withXpath(org.hl7.fhir.String value) {
setXpath(value);
return this;
}
@Override
public ElementDefinitionConstraint withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public ElementDefinitionConstraint withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public ElementDefinitionConstraint withId(java.lang.String value) {
setId(value);
return this;
}
@Override
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
if (!super.equals(thisLocator, thatLocator, object, strategy)) {
return false;
}
final ElementDefinitionConstraint that = ((ElementDefinitionConstraint) object);
{
Id lhsKey;
lhsKey = this.getKey();
Id rhsKey;
rhsKey = that.getKey();
if (!strategy.equals(LocatorUtils.property(thisLocator, "key", lhsKey), LocatorUtils.property(thatLocator, "key", rhsKey), lhsKey, rhsKey, (this.key!= null), (that.key!= null))) {
return false;
}
}
{
org.hl7.fhir.String lhsRequirements;
lhsRequirements = this.getRequirements();
org.hl7.fhir.String rhsRequirements;
rhsRequirements = that.getRequirements();
if (!strategy.equals(LocatorUtils.property(thisLocator, "requirements", lhsRequirements), LocatorUtils.property(thatLocator, "requirements", rhsRequirements), lhsRequirements, rhsRequirements, (this.requirements!= null), (that.requirements!= null))) {
return false;
}
}
{
ConstraintSeverity lhsSeverity;
lhsSeverity = this.getSeverity();
ConstraintSeverity rhsSeverity;
rhsSeverity = that.getSeverity();
if (!strategy.equals(LocatorUtils.property(thisLocator, "severity", lhsSeverity), LocatorUtils.property(thatLocator, "severity", rhsSeverity), lhsSeverity, rhsSeverity, (this.severity!= null), (that.severity!= null))) {
return false;
}
}
{
org.hl7.fhir.String lhsHuman;
lhsHuman = this.getHuman();
org.hl7.fhir.String rhsHuman;
rhsHuman = that.getHuman();
if (!strategy.equals(LocatorUtils.property(thisLocator, "human", lhsHuman), LocatorUtils.property(thatLocator, "human", rhsHuman), lhsHuman, rhsHuman, (this.human!= null), (that.human!= null))) {
return false;
}
}
{
org.hl7.fhir.String lhsExpression;
lhsExpression = this.getExpression();
org.hl7.fhir.String rhsExpression;
rhsExpression = that.getExpression();
if (!strategy.equals(LocatorUtils.property(thisLocator, "expression", lhsExpression), LocatorUtils.property(thatLocator, "expression", rhsExpression), lhsExpression, rhsExpression, (this.expression!= null), (that.expression!= null))) {
return false;
}
}
{
org.hl7.fhir.String lhsXpath;
lhsXpath = this.getXpath();
org.hl7.fhir.String rhsXpath;
rhsXpath = that.getXpath();
if (!strategy.equals(LocatorUtils.property(thisLocator, "xpath", lhsXpath), LocatorUtils.property(thatLocator, "xpath", rhsXpath), lhsXpath, rhsXpath, (this.xpath!= null), (that.xpath!= null))) {
return false;
}
}
return true;
}
@Override
public boolean equals(Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.getInstance();
return equals(null, null, object, strategy);
}
@Override
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) {
int currentHashCode = super.hashCode(locator, strategy);
{
Id theKey;
theKey = this.getKey();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "key", theKey), currentHashCode, theKey, (this.key!= null));
}
{
org.hl7.fhir.String theRequirements;
theRequirements = this.getRequirements();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "requirements", theRequirements), currentHashCode, theRequirements, (this.requirements!= null));
}
{
ConstraintSeverity theSeverity;
theSeverity = this.getSeverity();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "severity", theSeverity), currentHashCode, theSeverity, (this.severity!= null));
}
{
org.hl7.fhir.String theHuman;
theHuman = this.getHuman();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "human", theHuman), currentHashCode, theHuman, (this.human!= null));
}
{
org.hl7.fhir.String theExpression;
theExpression = this.getExpression();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "expression", theExpression), currentHashCode, theExpression, (this.expression!= null));
}
{
org.hl7.fhir.String theXpath;
theXpath = this.getXpath();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "xpath", theXpath), currentHashCode, theXpath, (this.xpath!= null));
}
return currentHashCode;
}
@Override
public int hashCode() {
final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.getInstance();
return this.hashCode(null, strategy);
}
@Override
public java.lang.String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.getInstance();
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
@Override
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
@Override
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
super.appendFields(locator, buffer, strategy);
{
Id theKey;
theKey = this.getKey();
strategy.appendField(locator, this, "key", buffer, theKey, (this.key!= null));
}
{
org.hl7.fhir.String theRequirements;
theRequirements = this.getRequirements();
strategy.appendField(locator, this, "requirements", buffer, theRequirements, (this.requirements!= null));
}
{
ConstraintSeverity theSeverity;
theSeverity = this.getSeverity();
strategy.appendField(locator, this, "severity", buffer, theSeverity, (this.severity!= null));
}
{
org.hl7.fhir.String theHuman;
theHuman = this.getHuman();
strategy.appendField(locator, this, "human", buffer, theHuman, (this.human!= null));
}
{
org.hl7.fhir.String theExpression;
theExpression = this.getExpression();
strategy.appendField(locator, this, "expression", buffer, theExpression, (this.expression!= null));
}
{
org.hl7.fhir.String theXpath;
theXpath = this.getXpath();
strategy.appendField(locator, this, "xpath", buffer, theXpath, (this.xpath!= null));
}
return buffer;
}
}