Class SequenceExporter

  • All Implemented Interfaces:
    org.intermine.web.logic.export.Exporter

    public class SequenceExporter
    extends java.lang.Object
    implements org.intermine.web.logic.export.Exporter
    Export data in FASTA format. Select cell in each row that can be exported as a sequence and fetch associated sequence.
    • Field Summary

      • Fields inherited from interface org.intermine.web.logic.export.Exporter

        UNIX_SEPARATOR, WINDOWS_SEPARATOR
    • Constructor Summary

      Constructors 
      Constructor Description
      SequenceExporter​(org.intermine.objectstore.ObjectStore os, java.io.OutputStream outputStream, int featureIndex, java.util.Map<java.lang.String,​java.util.List<org.intermine.metadata.FieldDescriptor>> classKeys, int extension, java.lang.String translate)
      Constructor.
      SequenceExporter​(org.intermine.objectstore.ObjectStore os, java.io.OutputStream outputStream, int featureIndex, java.util.Map<java.lang.String,​java.util.List<org.intermine.metadata.FieldDescriptor>> classKeys, int extension, java.lang.String translate, java.util.List<org.intermine.pathquery.Path> paths)
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canExport​(java.util.List<java.lang.Class<?>> clazzes)
      static boolean canExportStatic​(java.util.List<java.lang.Class<?>> clazzes)  
      void export​(java.util.Iterator<? extends java.util.List<org.intermine.api.results.ResultElement>> resultIt)  
      void export​(java.util.Iterator<? extends java.util.List<org.intermine.api.results.ResultElement>> resultIt, java.util.Collection<org.intermine.pathquery.Path> unionPathCollection, java.util.Collection<org.intermine.pathquery.Path> newPathCollection)
      Lines are always separated with \n because third party tool writeFasta is used for writing sequence.
      int getWrittenResultsCount()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SequenceExporter

        public SequenceExporter​(org.intermine.objectstore.ObjectStore os,
                                java.io.OutputStream outputStream,
                                int featureIndex,
                                java.util.Map<java.lang.String,​java.util.List<org.intermine.metadata.FieldDescriptor>> classKeys,
                                int extension,
                                java.lang.String translate)
        Constructor.
        Parameters:
        os - object store used for fetching sequence for exported object
        outputStream - output stream
        featureIndex - index of cell in row that contains object to be exported
        classKeys - for the model
        extension - extension
        translate - if the translation is wanted (=y)
      • SequenceExporter

        public SequenceExporter​(org.intermine.objectstore.ObjectStore os,
                                java.io.OutputStream outputStream,
                                int featureIndex,
                                java.util.Map<java.lang.String,​java.util.List<org.intermine.metadata.FieldDescriptor>> classKeys,
                                int extension,
                                java.lang.String translate,
                                java.util.List<org.intermine.pathquery.Path> paths)
        Constructor.
        Parameters:
        os - object store used for fetching sequence for exported object
        outputStream - output stream
        featureIndex - index of cell in row that contains object to be exported
        classKeys - for the model
        extension - extension
        paths - paths to include
        translate - if the translation is wanted (=y)
    • Method Detail

      • getWrittenResultsCount

        public int getWrittenResultsCount()
        Specified by:
        getWrittenResultsCount in interface org.intermine.web.logic.export.Exporter
      • export

        public void export​(java.util.Iterator<? extends java.util.List<org.intermine.api.results.ResultElement>> resultIt)
        Specified by:
        export in interface org.intermine.web.logic.export.Exporter
      • export

        public void export​(java.util.Iterator<? extends java.util.List<org.intermine.api.results.ResultElement>> resultIt,
                           java.util.Collection<org.intermine.pathquery.Path> unionPathCollection,
                           java.util.Collection<org.intermine.pathquery.Path> newPathCollection)
        Lines are always separated with \n because third party tool writeFasta is used for writing sequence.
        Specified by:
        export in interface org.intermine.web.logic.export.Exporter
      • canExport

        public boolean canExport​(java.util.List<java.lang.Class<?>> clazzes)
        Specified by:
        canExport in interface org.intermine.web.logic.export.Exporter
      • canExportStatic

        public static boolean canExportStatic​(java.util.List<java.lang.Class<?>> clazzes)
        Parameters:
        clazzes - classes of result
        Returns:
        true if this exporter can export result composed of specified classes