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

org.biopax.ols.impl.TermBean Maven / Gradle / Ivy

Go to download

OBO ontology access and handling (derived from EBI PSIDEV Ontology Manager and OLS)

There is a newer version: 6.0.0
Show newest version
package org.biopax.ols.impl;

/*
 *
 */


import java.util.Collection;

import org.biopax.ols.Annotation;
import org.biopax.ols.DbXref;
import org.biopax.ols.Ontology;
import org.biopax.ols.Term;
import org.biopax.ols.TermPath;
import org.biopax.ols.TermRelationship;
import org.biopax.ols.TermSynonym;


/**
 * @author R. Cote
 * @version $Id: TermBean.java,v 1.2 2006/11/24 13:41:27 rglcote Exp $
 */

public class TermBean implements Term {

    /**
     * 

Represents ...

*/ private String name = null; /** *

Represents ...

*/ private String definition = null; /** *

Represents ...

*/ private String termPk; /** *

Represents ...

*/ private boolean obsolete = false; /** *

Represents ...

*/ private boolean rootTerm = false; /** *

Represents ...

*/ private boolean leaf = false; /** *

Represents ...

*/ private boolean instance = false; /** *

Represents ...

*/ private long parentOntologyId; /** *

Represents ...

*/ private Ontology parentOntology = null; /** *

Represents ...

*/ private Collection synonyms = null; /** *

Represents ...

*/ private Collection paths = null; /** *

Represents ...

*/ private Collection relationships = null; /** *

Represents ...

*/ private Collection annotations = null; /** *

Represents ...

*/ private Collection xrefs = null; /** *

Represents ...

*/ private String identifier = null; /** *

Represents ...

*/ private String namespace = null; /** * @return */ public String getName() { return name; } /** * @param _name */ public void setName(final String _name) { name = _name; } /** * @return */ public String getDefinition() { return definition; } /** * @param _definition */ public void setDefinition(final String _definition) { definition = _definition; } /** * @return */ public boolean isObsolete() { return obsolete; } /** * @param _obsolete */ public void setObsolete(final boolean _obsolete) { obsolete = _obsolete; } /** * @return */ public boolean isRootTerm() { return rootTerm; } /** * @param _rootTerm */ public void setRootTerm(final boolean _rootTerm) { rootTerm = _rootTerm; } public boolean isLeaf() { return leaf; } public void setLeaf(final boolean _leaf) { leaf = _leaf; } public boolean isInstance() { return instance; } public void setInstance(final boolean _instance) { instance = _instance; } /** * @return */ public long getParentOntologyId() { return parentOntologyId; } /** * @param _parentOntologyId */ public void setParentOntologyId(final long _parentOntologyId) { parentOntologyId = _parentOntologyId; } /** * @return */ public Ontology getParentOntology() { return parentOntology; } /** * @param _parentOntology */ public void setParentOntology(final Ontology _parentOntology) { parentOntology = _parentOntology; } /** * @return */ public Collection getSynonyms() { return synonyms; } /** * @param _synonyms */ public void setSynonyms(final Collection _synonyms) { synonyms = _synonyms; } /** * @return */ public Collection getPaths() { return paths; } /** * @param _paths */ public void setPaths(final Collection _paths) { paths = _paths; } /** * @return */ public Collection getRelationships() { return relationships; } /** * @param _relationshipts */ public void setRelationships(final Collection _relationshipts) { relationships = _relationshipts; } /** * @return */ public Collection getAnnotations() { return annotations; } /** * @param _annotations */ public void setAnnotations(final Collection _annotations) { annotations = _annotations; } /** * @return */ public String getIdentifier() { return identifier; } /** * @param _identifier */ public void setIdentifier(final String _identifier) { identifier = _identifier; } /** * @return */ public Collection getXrefs() { return xrefs; } /** * @param _xrefs */ public void setXrefs(final Collection _xrefs) { xrefs = _xrefs; } public String toString() { return new StringBuffer() .append("TermBean{") .append("name='").append(name).append('\'') .append(", termPk=").append(termPk) .append(", identifier='").append(identifier).append('\'') .append(", namespace='").append(namespace).append('\'') .append('}').toString(); } @Override public boolean equals(Object o) { if (o instanceof TermBean) { String thatIdentifier = ((TermBean) o).getIdentifier(); if (xorNull(identifier, thatIdentifier)) { return false; } else { if (identifier != null) { return identifier.equals(thatIdentifier); } else { // if we're still here, identifier is null in both termbeans return true; } } } else { return false; } } public String getNamespace() { return namespace; } public void setNamespace(String namespace) { this.namespace = namespace; } public String getTermPk() { return termPk; } public void setTermPk(String termPk) { this.termPk = termPk; } private boolean xorNull(Object a, Object b) { return (a == null) ? (b != null) : (b == null) ; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy