Class MIWriterOptionFactory


  • public class MIWriterOptionFactory
    extends Object
    The factory to get options for the InteractionWriter
    Since:
    03/07/13
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Method Detail

      • getDefaultMitabOptions

        public Map<String,​Object> getDefaultMitabOptions​(File outputFile)
        Create the options for a MITAB interaction writer.
        Parameters:
        outputFile - : the file where to write the interactions
        Returns:
        the options for the MITAB InteractionWriter
      • getMitabOptions

        public Map<String,​Object> getMitabOptions​(InteractionCategory objectCategory,
                                                        ComplexType complexType,
                                                        File outputFile)
        Create the options for a MITAB interaction writer.
        Parameters:
        objectCategory - : the interaction object type to write
        complexType - : the kind of complex to write : n-ary or binary
        outputFile - : the file where to write the interactions
        Returns:
        the options for the MITAB InteractionWriter
      • getMitabOptions

        public Map<String,​Object> getMitabOptions​(boolean writeHeader,
                                                        MitabVersion version,
                                                        File outputFile)
        Create the options for a MITAB interaction writer.
        Parameters:
        writeHeader - : true if we want to write the header
        version - : the MITAB version
        outputFile - : the file where to write the interactions
        Returns:
        the options for a MITAB interaction writer.
      • getDefaultMitabOptions

        public Map<String,​Object> getDefaultMitabOptions​(OutputStream output)
        Create the options for a MITAB interaction writer.
        Parameters:
        output - : the output
        Returns:
        the options for the MITAB InteractionWriter
      • getMitabOptions

        public Map<String,​Object> getMitabOptions​(InteractionCategory objectCategory,
                                                        ComplexType complexType,
                                                        OutputStream output)
        Create the options for a MITAB interaction writer.
        Parameters:
        objectCategory - : the interaction object type to write
        complexType - : the kind of complex to write : n-ary or binary
        output - : the output
        Returns:
        the options for the MITAB InteractionWriter
      • getMitabOptions

        public Map<String,​Object> getMitabOptions​(boolean writeHeader,
                                                        MitabVersion version,
                                                        OutputStream output)
        Create the options for a MITAB interaction writer.
        Parameters:
        writeHeader - : true if we want to write the header
        version - : the MITAB version
        output - : the outputstream
        Returns:
        the options for a MITAB interaction writer.
      • getDefaultMitabOptions

        public Map<String,​Object> getDefaultMitabOptions​(Writer writer)
        Create the options for a MITAB interaction writer.
        Parameters:
        writer - : the writer
        Returns:
        the options for the MITAB InteractionWriter
      • getMitabOptions

        public Map<String,​Object> getMitabOptions​(InteractionCategory objectCategory,
                                                        ComplexType complexType,
                                                        Writer writer)
        Create the options for a MITAB interaction writer.
        Parameters:
        objectCategory - : the interaction object type to write
        complexType - : the kind of complex to write : n-ary or binary
        writer - : the writer
        Returns:
        the options for the MITAB InteractionWriter
      • getMitabOptions

        public Map<String,​Object> getMitabOptions​(boolean writeHeader,
                                                        MitabVersion version,
                                                        Writer writer)
        Create the options for a MITAB interaction writer.
        Parameters:
        writeHeader - : true if we want to write the header
        version - : the MITAB version
        writer - : the writer
        Returns:
        the options for a MITAB interaction writer.
      • getMitabOptions

        public Map<String,​Object> getMitabOptions​(Object output,
                                                        InteractionCategory objectCategory,
                                                        ComplexType complexType,
                                                        ComplexExpansionMethod expansion,
                                                        boolean writeHeader,
                                                        MitabVersion version,
                                                        boolean extended)
        Create the options for the MITAB InteractionWriter.
        Parameters:
        objectCategory - : the interaction object type to write
        complexType - : the kind of complex to write : n-ary or binary
        expansion - : the complex expansion method to use if we have n-ary interactions
        writeHeader - : true if we want to write the header
        version - : the MITAB version
        extended - : true if all the aliases, features and confidences are pure mitab objects
        output - a Object object.
        Returns:
        the options for the MITAB InteractionWriter
      • getDefaultXmlOptions

        public Map<String,​Object> getDefaultXmlOptions​(File file)

        getDefaultXmlOptions.

        Parameters:
        file - : the output file
        Returns:
        a Map object.
      • getDefaultXmlOptions

        public Map<String,​Object> getDefaultXmlOptions​(OutputStream output)

        getDefaultXmlOptions.

        Parameters:
        output - : the output stream
        Returns:
        a Map object.
      • getDefaultXmlOptions

        public Map<String,​Object> getDefaultXmlOptions​(Writer writer)

        getDefaultXmlOptions.

        Parameters:
        writer - : the output writer
        Returns:
        a Map object.
      • getDefaultXmlOptions

        public Map<String,​Object> getDefaultXmlOptions​(Object output,
                                                             InteractionCategory objectCategory,
                                                             ComplexType complexType,
                                                             PsiXmlType type,
                                                             PsiXmlVersion version)

        getDefaultXmlOptions.

        Parameters:
        output - the output (file, outputfile, writer)
        objectCategory - : type of objects to write. It is mixed by default
        complexType - : the kind of complex to write : n-ary or binary
        type - : compact or expanded. It is expanded by default
        version - a PsiXmlVersion object.
        Returns:
        a Map object.
      • getDefaultExpandedXmlOptions

        public Map<String,​Object> getDefaultExpandedXmlOptions​(Object output,
                                                                     InteractionCategory objectCategory,
                                                                     ComplexType complexType,
                                                                     PsiXmlVersion version)
        Create the options for the default expanded PSI-XML InteractionWriter. The writer will not write extended XML objects and it will be based on an identity cache for generating ids All sub complexes will be written as interactions.
        Parameters:
        output - the output (file, outputfile, writer)
        objectCategory - : the interaction object type to write
        complexType - : the kind of complex to write : n-ary or binary
        version - a PsiXmlVersion object.
        Returns:
        the options for the PSI-XML InteractionWriter
      • getDefaultCompactXmlOptions

        public Map<String,​Object> getDefaultCompactXmlOptions​(Object output,
                                                                    InteractionCategory objectCategory,
                                                                    ComplexType complexType,
                                                                    PsiXmlVersion version)
        Create the default options for the compact PSI-XML InteractionWriter. This writer will write an empty source with just a release date and no attributes attached to the entry All complexes will be written as interactions. It will not write PsiXml extended object features It will use an identity cache to generate ids for the different interactions/experiments/interactors/participants/features
        Parameters:
        output - the output (file, outputfile, writer)
        objectCategory - : the interaction object type to write
        complexType - : the kind of complex to write : n-ary or binary
        version - : Psi xml version
        Returns:
        the options for the PSI-XM InteractionWriter
      • getExpandedXmlOptions

        public Map<String,​Object> getExpandedXmlOptions​(Object output,
                                                              InteractionCategory objectCategory,
                                                              ComplexType complexType,
                                                              Source defaultSource,
                                                              XMLGregorianCalendar defaultReleaseDate,
                                                              Collection<Annotation> defaultEntryAnnotations,
                                                              PsiXmlVersion version)
        Create the options for the expanded PSI-XML InteractionWriter. The writer will not write extended XML objects and it will be based on an identity cache for generating ids All sub complexes will be written as interactions.
        Parameters:
        output - the output (file, outputfile, writer)
        objectCategory - : the interaction object type to write
        complexType - : the kind of complex to write : n-ary or binary
        defaultSource - : default source if no source provided
        defaultReleaseDate - : default release date in the entry source
        defaultEntryAnnotations - : annotations to write in the entry
        version - : Psi xml version
        Returns:
        the options for the PSI-XML InteractionWriter
      • getCompactXmlOptions

        public Map<String,​Object> getCompactXmlOptions​(Object output,
                                                             InteractionCategory objectCategory,
                                                             ComplexType complexType,
                                                             Source defaultSource,
                                                             XMLGregorianCalendar defaultReleaseDate,
                                                             Collection<Annotation> defaultEntryAnnotations,
                                                             PsiXmlVersion version)
        Create the options for the compact PSI-XML InteractionWriter. The writer will not write extended XML objects and it will be based on an identity cache for generating ids
        Parameters:
        output - the output (file, outputfile, writer)
        objectCategory - : the interaction object type to write
        complexType - : the kind of complex to write : n-ary or binary
        defaultSource - : default source if no source provided
        defaultReleaseDate - : default release date in the entry source
        defaultEntryAnnotations - : annotations to write in the entry
        version - : Psi xml version
        Returns:
        the options for the PSI-XML InteractionWriter
      • getExpandedXmlOptions

        public Map<String,​Object> getExpandedXmlOptions​(Object output,
                                                              InteractionCategory objectCategory,
                                                              ComplexType complexType,
                                                              PsiXmlObjectCache elementCache,
                                                              Set<Interaction> interactionSet,
                                                              boolean writeComplexAsInteractors,
                                                              boolean extended,
                                                              PsiXmlVersion version)
        Create the options for the expanded PSI-XML InteractionWriter. This writer will write an empty source with just a release date and no attributes attached to the entry.
        Parameters:
        output - the output (file, outputfile, writer)
        objectCategory - : the interaction object type to write
        complexType - : the kind of complex to write : n-ary or binary
        elementCache - : the cache of objects necessary to assign ids to the different MI elements
        interactionSet - : the instance of set for the interactions that we want to use in compact and expanded mode
        version - : Psi xml version
        writeComplexAsInteractors - a boolean.
        extended - a boolean.
        Returns:
        the options for the PSI-XML InteractionWriter
      • getCompactXmlOptions

        public Map<String,​Object> getCompactXmlOptions​(Object output,
                                                             InteractionCategory objectCategory,
                                                             ComplexType complexType,
                                                             PsiXmlObjectCache elementCache,
                                                             Set<Experiment> experimentSet,
                                                             Set<Interactor> interactorSet,
                                                             Set<String> availabilitySet,
                                                             Set<Interaction> interactionSet,
                                                             boolean writeComplexAsInteractors,
                                                             boolean extended,
                                                             PsiXmlVersion version)
        Create the options for the compact PSI-XML InteractionWriter. This writer will write an empty source with just a release date and no attributes attached to the entry.
        Parameters:
        output - the output (file, outputfile, writer)
        objectCategory - : the interaction object type to write
        complexType - : the kind of complex to write : n-ary or binary
        elementCache - : the cache of objects necessary to assign ids to the different MI elements
        experimentSet - : the instance of set for the experiments that we want to use in compact mode
        interactorSet - : the instance of set for the interactors that we want to use in compact mode
        availabilitySet - : the instance of set for the availability that we want to use in compact mode
        interactionSet - : the instance of set for the interactions that we want to use in compact and expanded mode
        writeComplexAsInteractors - : true if we want to write all sub complexes as interactors instead of interactions
        extended - : true if all the interactions, participants, source, experiment, organism, cv terms and xrefs are pure xml objects
        version - : Psi xml version
        Returns:
        the options for the PSI-XML InteractionWriter
      • getExpandedXmlOptions

        public Map<String,​Object> getExpandedXmlOptions​(Object output,
                                                              InteractionCategory objectCategory,
                                                              ComplexType complexType,
                                                              PsiXmlObjectCache elementCache,
                                                              Set<Interaction> interactionSet,
                                                              Source defaultSource,
                                                              XMLGregorianCalendar defaultReleaseDate,
                                                              Collection<Annotation> defaultEntryAnnotations,
                                                              boolean writeComplexAsInteractors,
                                                              boolean extended,
                                                              PsiXmlVersion version)
        Create the options for the compact PSI-XML InteractionWriter. This writer will write an empty source with just a release date and no attributes attached to the entry. All sub complexes will be written as interactions.
        Parameters:
        output - the output (file, outputfile, writer)
        objectCategory - : the interaction object type to write
        complexType - : the kind of complex to write : n-ary or binary
        elementCache - : the cache of objects necessary to assign ids to the different MI elements
        interactionSet - : the instance of set for the interactions that we want to use in compact and expanded mode
        defaultSource - : default source if no source provided
        defaultReleaseDate - : default release date in the entry source
        defaultEntryAnnotations - : annotations to write in the entry
        writeComplexAsInteractors - : true if we want to write all sub complexes as interactors instead of interactions
        extended - : true if all the interactions, participants, source, experiment, organism, cv terms and xrefs are pure xml objects
        version - : Psi xml version
        Returns:
        the options for the PSI-XML InteractionWriter
      • getCompactXmlOptions

        public Map<String,​Object> getCompactXmlOptions​(Object output,
                                                             InteractionCategory objectCategory,
                                                             ComplexType complexType,
                                                             PsiXmlObjectCache elementCache,
                                                             Set<Experiment> experimentSet,
                                                             Set<Interactor> interactorSet,
                                                             Set<String> availabilitySet,
                                                             Set<Interaction> interactionSet,
                                                             Source defaultSource,
                                                             XMLGregorianCalendar defaultReleaseDate,
                                                             Collection<Annotation> defaultEntryAnnotations,
                                                             boolean writeComplexAsInteractors,
                                                             boolean extended,
                                                             PsiXmlVersion version)
        Create the options for the compact PSI-XML InteractionWriter.
        Parameters:
        output - the output (file, outputfile, writer)
        objectCategory - : the interaction object type to write
        complexType - : the kind of complex to write : n-ary or binary
        elementCache - : the cache of objects necessary to assign ids to the different MI elements
        experimentSet - : the instance of set for the experiments that we want to use in compact mode
        interactorSet - : the instance of set for the interactors that we want to use in compact mode
        availabilitySet - : the instance of set for the availability that we want to use in compact mode
        interactionSet - : the instance of set for the interactions that we want to use in compact and expanded mode
        defaultSource - : default source if no source provided
        defaultReleaseDate - : default release date in the entry source
        defaultEntryAnnotations - : annotations to write in the entry
        writeComplexAsInteractors - : true if we want to write all sub complexes as interactors instead of interactions
        extended - : true if all the interactions, participants, source, experiment, organism, cv terms and xrefs are pure xml objects
        version - : Psi xml version
        Returns:
        the options for the PSI-XML InteractionWriter
      • getXmlOptions

        public Map<String,​Object> getXmlOptions​(Object output,
                                                      InteractionCategory objectCategory,
                                                      ComplexType complexType,
                                                      PsiXmlType xmlType,
                                                      PsiXmlObjectCache elementCache,
                                                      Set<Experiment> experimentSet,
                                                      Set<Interactor> interactorSet,
                                                      Set<String> availabilitySet,
                                                      Set<Interaction> interactionSet,
                                                      Source defaultSource,
                                                      XMLGregorianCalendar defaultReleaseDate,
                                                      Collection<Annotation> defaultEntryAnnotations,
                                                      boolean writeComplexAsInteractors,
                                                      boolean extended,
                                                      PsiXmlVersion version)
        Create the options for the PSI-XML InteractionWriter.
        Parameters:
        output - the output (file, outputfile, writer)
        objectCategory - : the interaction object type to write
        complexType - : the kind of complex to write : n-ary or binary
        xmlType - : the type of xml (compact or expanded). The default type is expanded
        elementCache - : the cache of objects necessary to assign ids to the different MI elements
        experimentSet - : the instance of set for the experiments that we want to use in compact mode
        interactorSet - : the instance of set for the interactors that we want to use in compact mode
        availabilitySet - : the instance of set for the availability that we want to use in compact mode
        interactionSet - : the instance of set for the interactions that we want to use in compact and expanded mode
        defaultSource - : default source if no source provided
        defaultReleaseDate - : default release date in the entry source
        defaultEntryAnnotations - : annotations to write in the entry
        writeComplexAsInteractors - : true if we want to write all sub complexes as interactors instead of interactions
        extended - : true if all the interactions, participants, source, experiment, organism, cv terms and xrefs are pure xml objects
        version - : Psi xml version
        Returns:
        the options for the PSI-XML InteractionWriter