Package ubic.basecode.ontology.model
Class OntologyTermSimple
- java.lang.Object
-
- ubic.basecode.ontology.model.OntologyTermSimple
-
- All Implemented Interfaces:
Serializable
,Comparable<OntologyResource>
,OntologyResource
,OntologyTerm
public class OntologyTermSimple extends Object implements OntologyTerm, Serializable
A light-weight version of OntologyTerms. Only supports a subset of the functionality of OntologyTermImpl (namely, it is missing the inference components)- Author:
- Paul
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OntologyTermSimple(String uri, String term)
OntologyTermSimple(String uri, String term, String description, boolean isObsolete)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(OntologyResource other)
boolean
equals(Object obj)
Collection<String>
getAlternativeIds()
Collection<AnnotationProperty>
getAnnotations()
Collection<OntologyTerm>
getChildren(boolean direct, boolean includeAdditionalProperties, boolean keepObsoletes)
Obtain the children of this term via subclass relationships and possibly some additional properties.String
getComment()
Collection<OntologyIndividual>
getIndividuals(boolean direct)
String
getLabel()
A label, if known, otherwise null.String
getLocalName()
Object
getModel()
Collection<OntologyTerm>
getParents(boolean direct, boolean includeAdditionalProperties, boolean keepObsoletes)
Collection<OntologyRestriction>
getRestrictions()
Double
getScore()
If this is result from a free-text search, a corresponding score, otherwise null.String
getTerm()
String
getUri()
A URI if known, otherwise null.int
hashCode()
boolean
isObsolete()
Whether the resource is marked as obsolete.boolean
isRoot()
boolean
isTermObsolete()
check to see if the term is obsolete, if it is it should not be used-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ubic.basecode.ontology.model.OntologyTerm
getChildren, getChildren, getIndividuals, getParents, getParents
-
-
-
-
Method Detail
-
getAlternativeIds
public Collection<String> getAlternativeIds()
- Specified by:
getAlternativeIds
in interfaceOntologyTerm
-
getAnnotations
public Collection<AnnotationProperty> getAnnotations()
- Specified by:
getAnnotations
in interfaceOntologyTerm
-
getChildren
public Collection<OntologyTerm> getChildren(boolean direct, boolean includeAdditionalProperties, boolean keepObsoletes)
Description copied from interface:OntologyTerm
Obtain the children of this term via subclass relationships and possibly some additional properties.- Specified by:
getChildren
in interfaceOntologyTerm
- Parameters:
direct
- return only the immediate children; if false, return all of them down to the leaves.includeAdditionalProperties
- include terms matched via additional properties
-
getComment
public String getComment()
- Specified by:
getComment
in interfaceOntologyTerm
-
getIndividuals
public Collection<OntologyIndividual> getIndividuals(boolean direct)
- Specified by:
getIndividuals
in interfaceOntologyTerm
-
getLabel
public String getLabel()
Description copied from interface:OntologyResource
A label, if known, otherwise null.- Specified by:
getLabel
in interfaceOntologyResource
-
getLocalName
public String getLocalName()
- Specified by:
getLocalName
in interfaceOntologyTerm
-
getModel
public Object getModel()
- Specified by:
getModel
in interfaceOntologyTerm
-
getParents
public Collection<OntologyTerm> getParents(boolean direct, boolean includeAdditionalProperties, boolean keepObsoletes)
- Specified by:
getParents
in interfaceOntologyTerm
-
getRestrictions
public Collection<OntologyRestriction> getRestrictions()
- Specified by:
getRestrictions
in interfaceOntologyTerm
-
isRoot
public boolean isRoot()
- Specified by:
isRoot
in interfaceOntologyTerm
-
isTermObsolete
public boolean isTermObsolete()
Description copied from interface:OntologyTerm
check to see if the term is obsolete, if it is it should not be used- Specified by:
isTermObsolete
in interfaceOntologyTerm
-
getTerm
public String getTerm()
- Specified by:
getTerm
in interfaceOntologyTerm
-
getUri
public String getUri()
Description copied from interface:OntologyResource
A URI if known, otherwise null.- Specified by:
getUri
in interfaceOntologyResource
-
isObsolete
public boolean isObsolete()
Description copied from interface:OntologyResource
Whether the resource is marked as obsolete.- Specified by:
isObsolete
in interfaceOntologyResource
-
getScore
@Nullable public Double getScore()
Description copied from interface:OntologyResource
If this is result from a free-text search, a corresponding score, otherwise null.- Specified by:
getScore
in interfaceOntologyResource
-
compareTo
public int compareTo(OntologyResource other)
- Specified by:
compareTo
in interfaceComparable<OntologyResource>
-
-