Package ubic.gemma.core.ontology
Class FactorValueOntologyUtils
- java.lang.Object
-
- ubic.gemma.core.ontology.FactorValueOntologyUtils
-
public class FactorValueOntologyUtils extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FactorValueOntologyUtils.Annotation
static class
FactorValueOntologyUtils.AnnotationIds
static interface
FactorValueOntologyUtils.StatementVisitor<U,E extends Throwable>
-
Constructor Summary
Constructors Constructor Description FactorValueOntologyUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<String,FactorValueOntologyUtils.Annotation>
getAnnotationsById(FactorValue fv)
Create a mapping of annotation IDs to annotations for a FactorValue.static String
getUri(Long factorValueId)
Obtain a suitable ontology ID for a given factor value ID.static String
getUri(FactorValue factorValue)
Obtain a suitable ontology ID for a given factor value.static boolean
isAnnotationUri(String uri)
Check if a URI refers to an annotation of a factor value.static Long
parseUri(String uri)
Extract a factor value ID from a factor value URI.static <E extends Throwable>
voidvisitCharacteristics(Long factorValueId, Collection<StatementValueObject> statements, FactorValueOntologyUtils.StatementVisitor<String,E> visitor)
Visit the characteristics of a FactorValue and generate their annotation IDs.static <E extends Throwable>
voidvisitStatements(Long factorValueId, Collection<StatementValueObject> statements, FactorValueOntologyUtils.StatementVisitor<FactorValueOntologyUtils.AnnotationIds,E> visitor)
Visit the statements of a FactorValue and generate their annotation IDs.
-
-
-
Method Detail
-
getUri
public static String getUri(Long factorValueId)
Obtain a suitable ontology ID for a given factor value ID.
-
getUri
public static String getUri(FactorValue factorValue)
Obtain a suitable ontology ID for a given factor value.
-
parseUri
@Nullable public static Long parseUri(String uri)
Extract a factor value ID from a factor value URI.
-
isAnnotationUri
public static boolean isAnnotationUri(String uri)
Check if a URI refers to an annotation of a factor value.
-
visitCharacteristics
public static <E extends Throwable> void visitCharacteristics(Long factorValueId, Collection<StatementValueObject> statements, FactorValueOntologyUtils.StatementVisitor<String,E> visitor) throws E extends Throwable
Visit the characteristics of a FactorValue and generate their annotation IDs.Characteristics also include subject-only statements.
- Throws:
E extends Throwable
-
visitStatements
public static <E extends Throwable> void visitStatements(Long factorValueId, Collection<StatementValueObject> statements, FactorValueOntologyUtils.StatementVisitor<FactorValueOntologyUtils.AnnotationIds,E> visitor) throws E extends Throwable
Visit the statements of a FactorValue and generate their annotation IDs.- Throws:
E extends Throwable
-
getAnnotationsById
public static Map<String,FactorValueOntologyUtils.Annotation> getAnnotationsById(FactorValue fv)
Create a mapping of annotation IDs to annotations for a FactorValue.
-
-