org.hl7.fhir.Meta Maven / Gradle / Ivy
Show all versions of quick Show documentation
//
// 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.08.16 at 09:36:55 AM MDT
//
package org.hl7.fhir;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
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 Meta complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Meta">
* <complexContent>
* <extension base="{http://hl7.org/fhir}Element">
* <sequence>
* <element name="versionId" type="{http://hl7.org/fhir}id" minOccurs="0"/>
* <element name="lastUpdated" type="{http://hl7.org/fhir}instant" minOccurs="0"/>
* <element name="profile" type="{http://hl7.org/fhir}uri" maxOccurs="unbounded" minOccurs="0"/>
* <element name="security" type="{http://hl7.org/fhir}Coding" maxOccurs="unbounded" minOccurs="0"/>
* <element name="tag" type="{http://hl7.org/fhir}Coding" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Meta", propOrder = {
"versionId",
"lastUpdated",
"profile",
"security",
"tag"
})
public class Meta
extends Element
implements Equals2, HashCode2, ToString2
{
protected Id versionId;
protected Instant lastUpdated;
protected List profile;
protected List security;
protected List tag;
/**
* Gets the value of the versionId property.
*
* @return
* possible object is
* {@link Id }
*
*/
public Id getVersionId() {
return versionId;
}
/**
* Sets the value of the versionId property.
*
* @param value
* allowed object is
* {@link Id }
*
*/
public void setVersionId(Id value) {
this.versionId = value;
}
/**
* Gets the value of the lastUpdated property.
*
* @return
* possible object is
* {@link Instant }
*
*/
public Instant getLastUpdated() {
return lastUpdated;
}
/**
* Sets the value of the lastUpdated property.
*
* @param value
* allowed object is
* {@link Instant }
*
*/
public void setLastUpdated(Instant value) {
this.lastUpdated = value;
}
/**
* Gets the value of the profile property.
*
*
* 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 Jakarta XML Binding object.
* This is why there is not a set
method for the profile property.
*
*
* For example, to add a new item, do as follows:
*
* getProfile().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Uri }
*
*
*/
public List getProfile() {
if (profile == null) {
profile = new ArrayList();
}
return this.profile;
}
/**
* Gets the value of the security property.
*
*
* 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 Jakarta XML Binding object.
* This is why there is not a set
method for the security property.
*
*
* For example, to add a new item, do as follows:
*
* getSecurity().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Coding }
*
*
*/
public List getSecurity() {
if (security == null) {
security = new ArrayList();
}
return this.security;
}
/**
* Gets the value of the tag property.
*
*
* 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 Jakarta XML Binding object.
* This is why there is not a set
method for the tag property.
*
*
* For example, to add a new item, do as follows:
*
* getTag().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Coding }
*
*
*/
public List getTag() {
if (tag == null) {
tag = new ArrayList();
}
return this.tag;
}
public Meta withVersionId(Id value) {
setVersionId(value);
return this;
}
public Meta withLastUpdated(Instant value) {
setLastUpdated(value);
return this;
}
public Meta withProfile(Uri... values) {
if (values!= null) {
for (Uri value: values) {
getProfile().add(value);
}
}
return this;
}
public Meta withProfile(Collection values) {
if (values!= null) {
getProfile().addAll(values);
}
return this;
}
public Meta withSecurity(Coding... values) {
if (values!= null) {
for (Coding value: values) {
getSecurity().add(value);
}
}
return this;
}
public Meta withSecurity(Collection values) {
if (values!= null) {
getSecurity().addAll(values);
}
return this;
}
public Meta withTag(Coding... values) {
if (values!= null) {
for (Coding value: values) {
getTag().add(value);
}
}
return this;
}
public Meta withTag(Collection values) {
if (values!= null) {
getTag().addAll(values);
}
return this;
}
@Override
public Meta withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public Meta withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public Meta 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 Meta that = ((Meta) object);
{
Id lhsVersionId;
lhsVersionId = this.getVersionId();
Id rhsVersionId;
rhsVersionId = that.getVersionId();
if (!strategy.equals(LocatorUtils.property(thisLocator, "versionId", lhsVersionId), LocatorUtils.property(thatLocator, "versionId", rhsVersionId), lhsVersionId, rhsVersionId, (this.versionId!= null), (that.versionId!= null))) {
return false;
}
}
{
Instant lhsLastUpdated;
lhsLastUpdated = this.getLastUpdated();
Instant rhsLastUpdated;
rhsLastUpdated = that.getLastUpdated();
if (!strategy.equals(LocatorUtils.property(thisLocator, "lastUpdated", lhsLastUpdated), LocatorUtils.property(thatLocator, "lastUpdated", rhsLastUpdated), lhsLastUpdated, rhsLastUpdated, (this.lastUpdated!= null), (that.lastUpdated!= null))) {
return false;
}
}
{
List lhsProfile;
lhsProfile = (((this.profile!= null)&&(!this.profile.isEmpty()))?this.getProfile():null);
List rhsProfile;
rhsProfile = (((that.profile!= null)&&(!that.profile.isEmpty()))?that.getProfile():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "profile", lhsProfile), LocatorUtils.property(thatLocator, "profile", rhsProfile), lhsProfile, rhsProfile, ((this.profile!= null)&&(!this.profile.isEmpty())), ((that.profile!= null)&&(!that.profile.isEmpty())))) {
return false;
}
}
{
List lhsSecurity;
lhsSecurity = (((this.security!= null)&&(!this.security.isEmpty()))?this.getSecurity():null);
List rhsSecurity;
rhsSecurity = (((that.security!= null)&&(!that.security.isEmpty()))?that.getSecurity():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "security", lhsSecurity), LocatorUtils.property(thatLocator, "security", rhsSecurity), lhsSecurity, rhsSecurity, ((this.security!= null)&&(!this.security.isEmpty())), ((that.security!= null)&&(!that.security.isEmpty())))) {
return false;
}
}
{
List lhsTag;
lhsTag = (((this.tag!= null)&&(!this.tag.isEmpty()))?this.getTag():null);
List rhsTag;
rhsTag = (((that.tag!= null)&&(!that.tag.isEmpty()))?that.getTag():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "tag", lhsTag), LocatorUtils.property(thatLocator, "tag", rhsTag), lhsTag, rhsTag, ((this.tag!= null)&&(!this.tag.isEmpty())), ((that.tag!= null)&&(!that.tag.isEmpty())))) {
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 theVersionId;
theVersionId = this.getVersionId();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "versionId", theVersionId), currentHashCode, theVersionId, (this.versionId!= null));
}
{
Instant theLastUpdated;
theLastUpdated = this.getLastUpdated();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "lastUpdated", theLastUpdated), currentHashCode, theLastUpdated, (this.lastUpdated!= null));
}
{
List theProfile;
theProfile = (((this.profile!= null)&&(!this.profile.isEmpty()))?this.getProfile():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "profile", theProfile), currentHashCode, theProfile, ((this.profile!= null)&&(!this.profile.isEmpty())));
}
{
List theSecurity;
theSecurity = (((this.security!= null)&&(!this.security.isEmpty()))?this.getSecurity():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "security", theSecurity), currentHashCode, theSecurity, ((this.security!= null)&&(!this.security.isEmpty())));
}
{
List theTag;
theTag = (((this.tag!= null)&&(!this.tag.isEmpty()))?this.getTag():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "tag", theTag), currentHashCode, theTag, ((this.tag!= null)&&(!this.tag.isEmpty())));
}
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 theVersionId;
theVersionId = this.getVersionId();
strategy.appendField(locator, this, "versionId", buffer, theVersionId, (this.versionId!= null));
}
{
Instant theLastUpdated;
theLastUpdated = this.getLastUpdated();
strategy.appendField(locator, this, "lastUpdated", buffer, theLastUpdated, (this.lastUpdated!= null));
}
{
List theProfile;
theProfile = (((this.profile!= null)&&(!this.profile.isEmpty()))?this.getProfile():null);
strategy.appendField(locator, this, "profile", buffer, theProfile, ((this.profile!= null)&&(!this.profile.isEmpty())));
}
{
List theSecurity;
theSecurity = (((this.security!= null)&&(!this.security.isEmpty()))?this.getSecurity():null);
strategy.appendField(locator, this, "security", buffer, theSecurity, ((this.security!= null)&&(!this.security.isEmpty())));
}
{
List theTag;
theTag = (((this.tag!= null)&&(!this.tag.isEmpty()))?this.getTag():null);
strategy.appendField(locator, this, "tag", buffer, theTag, ((this.tag!= null)&&(!this.tag.isEmpty())));
}
return buffer;
}
public void setProfile(List value) {
this.profile = value;
}
public void setSecurity(List value) {
this.security = value;
}
public void setTag(List value) {
this.tag = value;
}
}