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

com.imsweb.layout.naaccrxml.NaaccrXmlField Maven / Gradle / Ivy

Go to download

Framework that allows defining file formats (layouts) and use them to read and write data files.

There is a newer version: 6.0
Show newest version
/*
 * Copyright (C) 2017 Information Management Services, Inc.
 */
package com.imsweb.layout.naaccrxml;

import java.util.List;
import java.util.Objects;

import com.imsweb.layout.Field;
import com.imsweb.naaccrxml.entity.dictionary.NaaccrDictionaryItem;

public class NaaccrXmlField extends Field {

    private NaaccrDictionaryItem _item;

    private List _subFields;

    public NaaccrXmlField(NaaccrDictionaryItem item) {
        super();
        _item = item;
        _name = item.getNaaccrId();
        _longLabel = item.getNaaccrName();
        _naaccrItemNum = item.getNaaccrNum();
        _length = item.getLength();
    }

    public NaaccrDictionaryItem getItem() {
        return _item;
    }

    public String getNaaccrId() {
        return _item.getNaaccrId();
    }

    public Integer getStartColumn() {
        return _item.getStartColumn();
    }

    public Integer getLength() {
        return _item.getLength();
    }

    public String getParentXmlElement() {
        return _item.getParentXmlElement();
    }

    public String getNaaccrName() {
        return _item.getNaaccrName();
    }

    public boolean isAllowUnlimitedText() {
        return _item.getAllowUnlimitedText() == null ? false : _item.getAllowUnlimitedText();
    }

    public String getRecordTypes() {
        return _item.getRecordTypes();
    }

    public String getDataType() {
        return _item.getDataType();
    }

    public String getPadding() {
        return _item.getPadding();
    }

    public String getTrimType() {
        return _item.getTrim();
    }

    public List getSubFields() {
        return _subFields;
    }

    public void setSubFields(List subFields) {
        _subFields = subFields;
    }

    @Override
    public String toString() {
        return _name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        NaaccrXmlField that = (NaaccrXmlField)o;
        return Objects.equals(_item, that._item);
    }

    @Override
    public int hashCode() {
        return Objects.hash(_item);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy