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
  • 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

      boolean hasAnnotationRef​(PathwayElement.AnnotationRef annotationRef)
      Check whether this annotatable has the given annotationRef.
      Parameters:
      annotationRef - the annotationRef to look for.
      Returns:
      true if has annotationRef, false otherwise.
    • addAnnotation

      PathwayElement.AnnotationRef addAnnotation​(Annotation annotation)
      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. Calls addAnnotation(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. Calls addAnnotation(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

      void removeAnnotationRef​(PathwayElement.AnnotationRef annotationRef)
      Removes given annotationRef from annotationRefs list.
      Parameters:
      annotationRef - the annotationRef to be removed.
    • removeAnnotationRefs

      void removeAnnotationRefs()
      Removes all annotationRefs from annotationRefs list.