Package ubic.basecode.ontology.model
Class OntologyTermSimple
- java.lang.Object
-
- ubic.basecode.ontology.model.OntologyTermSimple
-
- All Implemented Interfaces:
Serializable,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 booleanequals(Object obj)Collection<String>getAlternativeIds()Obtain alternative IDs for this term.AnnotationPropertygetAnnotation(String propertyUri)Obtain an annotation by property URI.Collection<AnnotationProperty>getAnnotations()Obtain all annotations for this term.Collection<AnnotationProperty>getAnnotations(String propertyUri)Obtain all the annotations for a given property URI.Collection<OntologyTerm>getChildren(boolean direct, boolean includeAdditionalProperties, boolean keepObsoletes)Obtain the children of this term via subclass relationships and possibly some additional properties.StringgetComment()A comment for the resource, if available, otherwise null.Collection<OntologyIndividual>getIndividuals(boolean direct)StringgetLabel()A label, if known, otherwise null.StringgetLocalName()A local name for this resource.Collection<OntologyTerm>getParents(boolean direct, boolean includeAdditionalProperties, boolean keepObsoletes)Collection<OntologyRestriction>getRestrictions()StringgetTerm()StringgetUri()A URI if known, otherwise null.inthashCode()booleanisObsolete()Whether the resource is marked as obsolete.booleanisRoot()booleanisTermObsolete()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()
Description copied from interface:OntologyTermObtain alternative IDs for this term.- Specified by:
getAlternativeIdsin interfaceOntologyTerm
-
getAnnotations
public Collection<AnnotationProperty> getAnnotations()
Description copied from interface:OntologyTermObtain all annotations for this term.- Specified by:
getAnnotationsin interfaceOntologyTerm
-
getAnnotations
public Collection<AnnotationProperty> getAnnotations(String propertyUri)
Description copied from interface:OntologyTermObtain all the annotations for a given property URI.- Specified by:
getAnnotationsin interfaceOntologyTerm
-
getAnnotation
@Nullable public AnnotationProperty getAnnotation(String propertyUri)
Description copied from interface:OntologyTermObtain an annotation by property URI.- Specified by:
getAnnotationin interfaceOntologyTerm
-
getChildren
public Collection<OntologyTerm> getChildren(boolean direct, boolean includeAdditionalProperties, boolean keepObsoletes)
Description copied from interface:OntologyTermObtain the children of this term via subclass relationships and possibly some additional properties.- Specified by:
getChildrenin 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()
Description copied from interface:OntologyResourceA comment for the resource, if available, otherwise null.- Specified by:
getCommentin interfaceOntologyResource
-
getIndividuals
public Collection<OntologyIndividual> getIndividuals(boolean direct)
- Specified by:
getIndividualsin interfaceOntologyTerm
-
getLabel
public String getLabel()
Description copied from interface:OntologyResourceA label, if known, otherwise null.- Specified by:
getLabelin interfaceOntologyResource
-
getLocalName
public String getLocalName()
Description copied from interface:OntologyResourceA local name for this resource.- Specified by:
getLocalNamein interfaceOntologyResource
-
getParents
public Collection<OntologyTerm> getParents(boolean direct, boolean includeAdditionalProperties, boolean keepObsoletes)
- Specified by:
getParentsin interfaceOntologyTerm
-
getRestrictions
public Collection<OntologyRestriction> getRestrictions()
- Specified by:
getRestrictionsin interfaceOntologyTerm
-
isRoot
public boolean isRoot()
- Specified by:
isRootin interfaceOntologyTerm
-
isTermObsolete
public boolean isTermObsolete()
Description copied from interface:OntologyTermcheck to see if the term is obsolete, if it is it should not be used- Specified by:
isTermObsoletein interfaceOntologyTerm
-
getTerm
public String getTerm()
- Specified by:
getTermin interfaceOntologyTerm
-
getUri
public String getUri()
Description copied from interface:OntologyResourceA URI if known, otherwise null.- Specified by:
getUriin interfaceOntologyResource
-
isObsolete
public boolean isObsolete()
Description copied from interface:OntologyResourceWhether the resource is marked as obsolete.- Specified by:
isObsoletein interfaceOntologyResource
-
-