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 boolean
equals(Object obj)
Collection<String>
getAlternativeIds()
Obtain alternative IDs for this term.AnnotationProperty
getAnnotation(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.String
getComment()
A comment for the resource, if available, otherwise null.Collection<OntologyIndividual>
getIndividuals(boolean direct)
String
getLabel()
A label, if known, otherwise null.String
getLocalName()
A local name for this resource.Collection<OntologyTerm>
getParents(boolean direct, boolean includeAdditionalProperties, boolean keepObsoletes)
Collection<OntologyRestriction>
getRestrictions()
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()
Description copied from interface:OntologyTerm
Obtain alternative IDs for this term.- Specified by:
getAlternativeIds
in interfaceOntologyTerm
-
getAnnotations
public Collection<AnnotationProperty> getAnnotations()
Description copied from interface:OntologyTerm
Obtain all annotations for this term.- Specified by:
getAnnotations
in interfaceOntologyTerm
-
getAnnotations
public Collection<AnnotationProperty> getAnnotations(String propertyUri)
Description copied from interface:OntologyTerm
Obtain all the annotations for a given property URI.- Specified by:
getAnnotations
in interfaceOntologyTerm
-
getAnnotation
@Nullable public AnnotationProperty getAnnotation(String propertyUri)
Description copied from interface:OntologyTerm
Obtain an annotation by property URI.- Specified by:
getAnnotation
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()
Description copied from interface:OntologyResource
A comment for the resource, if available, otherwise null.- Specified by:
getComment
in interfaceOntologyResource
-
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()
Description copied from interface:OntologyResource
A local name for this resource.- Specified by:
getLocalName
in interfaceOntologyResource
-
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
-
-