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

au.csiro.ontology.importer.rf2.VersionRows Maven / Gradle / Ivy

There is a newer version: 4.1.0
Show newest version
/**
 * Copyright CSIRO Australian e-Health Research Centre (http://aehrc.com).
 * All rights reserved. Use is subject to license terms and conditions.
 */
package au.csiro.ontology.importer.rf2;

import java.util.ArrayList;
import java.util.Collection;

import au.csiro.ontology.snomed.refset.rf2.RefsetRow;

/**
 * This class represents a collection of rows from the RF2 concepts,
 * descriptions, and relationships tables that correspond to a logical version.
 * 
 * @author Alejandro Metke
 * 
 */
public class VersionRows {

    /**
     * The concept rows in this version.
     */
    protected final Collection conceptRows;

    /**
     * The relationship rows in this version.
     */
    protected final Collection relationshipRows;
    
    /**
     * The concrete domains reference set rows in this version.
     */
    protected final Collection concreteDomainRows;

    /**
     * Builds a new VersionRows.
     */
    public VersionRows() {
        this(new ArrayList(), new ArrayList(), new ArrayList());
    }
    
    public VersionRows(Collection conceptRows, Collection relationshipRows, 
            Collection concreteDomainRows) {
        this.conceptRows = conceptRows;
        this.relationshipRows = relationshipRows;
        this.concreteDomainRows = concreteDomainRows;
    }

    /**
     * @return the conceptRows
     */
    public Collection getConceptRows() {
        return conceptRows;
    }

    /**
     * @return the relationshipRows
     */
    public Collection getRelationshipRows() {
        return relationshipRows;
    }
    
    /**
     * Merges another {@link VersionRows} into this.
     * 
     * @param other
     */
    public void merge(VersionRows other) {
        conceptRows.addAll(other.conceptRows);
        relationshipRows.addAll(other.relationshipRows);
        concreteDomainRows.addAll(other.getConcreteDomainRows());
    }
    
    /**
    *
    * @return the refsetRows (includes current inactive rows)
    */
   public Collection getConcreteDomainRows() {
       return concreteDomainRows;
   }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy