Package org.pathvisio.libgpml.model
Interface Referenceable.Annotatable
- All Superinterfaces:
Referenceable
- All Known Implementing Classes:
DataNode
,DataNode.State
,GraphicalLine
,Group
,Interaction
,Label
,LineElement
,Pathway
,PathwayElement
,PathwayElement.CitationRef
,Shape
,ShapedElement
- Enclosing interface:
- Referenceable
public static interface Referenceable.Annotatable extends Referenceable
Interface for classes which can hold a
List
of PathwayElement.AnnotationRef
.
These classes include PathwayElement
, and PathwayElement.CitationRef
.- Author:
- finterly
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.pathvisio.libgpml.model.Referenceable
Referenceable.Annotatable, Referenceable.Citable, Referenceable.Evidenceable
-
Method Summary
Modifier and Type Method Description PathwayElement.AnnotationRef
addAnnotation(java.lang.String elementId, java.lang.String value, AnnotationType type, org.bridgedb.Xref xref, java.lang.String urlLink)
Creates a annotation with given properties, and adds annotation to pathway model.PathwayElement.AnnotationRef
addAnnotation(java.lang.String value, AnnotationType type, org.bridgedb.Xref xref, java.lang.String urlLink)
Creates a annotation with given properties, and adds annotation to pathway model.PathwayElement.AnnotationRef
addAnnotation(Annotation annotation)
Creates and adds an annotationRef to annotationRefs list.java.util.List<PathwayElement.AnnotationRef>
getAnnotationRefs()
Returns the list of annotation references.boolean
hasAnnotationRef(PathwayElement.AnnotationRef annotationRef)
Check whether this annotatable has the given annotationRef.void
removeAnnotationRef(PathwayElement.AnnotationRef annotationRef)
Removes given annotationRef from annotationRefs list.void
removeAnnotationRefs()
Removes all annotationRefs from annotationRefs list.
-
Method Details
-
getAnnotationRefs
java.util.List<PathwayElement.AnnotationRef> getAnnotationRefs()Returns the list of annotation references.- Returns:
- annotationRefs the list of annotation references, an empty list if no properties are defined.
-
hasAnnotationRef
Check whether this annotatable has the given annotationRef.- Parameters:
annotationRef
- the annotationRef to look for.- Returns:
- true if has annotationRef, false otherwise.
-
addAnnotation
Creates and adds an annotationRef to annotationRefs list.- Parameters:
annotation
- the annotation added.- Returns:
- the annotationRef for the annotation added.
-
addAnnotation
PathwayElement.AnnotationRef addAnnotation(java.lang.String value, AnnotationType type, org.bridgedb.Xref xref, java.lang.String urlLink)Creates a annotation with given properties, and adds annotation to pathway model. Creates a annotationRef for annotation, and adds to annotationRefs list for this annotatable. CallsaddAnnotation(Annotation annotation)
.- Parameters:
value
- the name, term, or text of the annotation.type
- the type of the annotation, e.g. ontology.xref
- the annotation xref.urlLink
- the url link of the annotation.- Returns:
- the annotationRef for the annotation added.
-
addAnnotation
PathwayElement.AnnotationRef addAnnotation(java.lang.String elementId, java.lang.String value, AnnotationType type, org.bridgedb.Xref xref, java.lang.String urlLink)Creates a annotation with given properties, and adds annotation to pathway model. Creates a annotationRef for annotation, and adds to annotationRefs list for this annotatable. Sets elementId for annotation. This method is used when reading gpml. CallsaddAnnotation(Annotation annotation)
.- Parameters:
elementId
- the elementId to set.value
- the name, term, or text of the annotation.type
- the type of the annotation, e.g. ontology.xref
- the annotation xref.urlLink
- the url link of the annotation.- Returns:
- the annotationRef for the annotation added.
-
removeAnnotationRef
Removes given annotationRef from annotationRefs list.- Parameters:
annotationRef
- the annotationRef to be removed.
-
removeAnnotationRefs
void removeAnnotationRefs()Removes all annotationRefs from annotationRefs list.
-