All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nedap.archie.rm.demographic.Capability Maven / Gradle / Ivy

There is a newer version: 3.11.0
Show newest version
package com.nedap.archie.rm.demographic;

import com.nedap.archie.rm.archetyped.Locatable;
import com.nedap.archie.rm.datastructures.ItemStructure;
import com.nedap.archie.rm.datavalues.quantity.DvInterval;
import com.nedap.archie.rm.datavalues.quantity.datetime.DvDate;

import javax.annotation.Nullable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import java.util.Objects;

/**
 * Created by pieter.bos on 08/07/16.
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name="CAPABILITY")
public class Capability extends Locatable {

    private ItemStructure credentials;
    @Nullable
    @XmlElement(name="time_validity")
    private DvInterval timeValidity;

    public ItemStructure getCredentials() {
        return credentials;
    }

    public void setCredentials(ItemStructure credentials) {
        this.credentials = credentials;
        this.setThisAsParent(credentials, "credentials");
    }

    @Nullable
    public DvInterval getTimeValidity() {
        return timeValidity;
    }

    public void setTimeValidity(@Nullable DvInterval timeValidity) {
        this.timeValidity = timeValidity;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        Capability that = (Capability) o;
        return Objects.equals(credentials, that.credentials) &&
                Objects.equals(timeValidity, that.timeValidity);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), credentials, timeValidity);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy