Package psidev.psi.mi.jami.commons
Class MIWriterOptionFactory
- java.lang.Object
-
- psidev.psi.mi.jami.commons.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.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.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.Map<String,Object>
getDefaultCompactXmlOptions(Object output, InteractionCategory objectCategory, ComplexType complexType, PsiXmlVersion version)
Create the default options for the compact PSI-XML InteractionWriter.Map<String,Object>
getDefaultExpandedXmlOptions(Object output, InteractionCategory objectCategory, ComplexType complexType, PsiXmlVersion version)
Create the options for the default expanded PSI-XML InteractionWriter.Map<String,Object>
getDefaultMitabOptions(File outputFile)
Create the options for a MITAB interaction writer.Map<String,Object>
getDefaultMitabOptions(OutputStream output)
Create the options for a MITAB interaction writer.Map<String,Object>
getDefaultMitabOptions(Writer writer)
Create the options for a MITAB interaction writer.Map<String,Object>
getDefaultXmlOptions(File file)
getDefaultXmlOptions.Map<String,Object>
getDefaultXmlOptions(OutputStream output)
getDefaultXmlOptions.Map<String,Object>
getDefaultXmlOptions(Writer writer)
getDefaultXmlOptions.Map<String,Object>
getDefaultXmlOptions(Object output, InteractionCategory objectCategory, ComplexType complexType, PsiXmlType type, PsiXmlVersion version)
getDefaultXmlOptions.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.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.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.static MIWriterOptionFactory
getInstance()
Getter for the fieldinstance
.Map<String,Object>
getMitabOptions(boolean writeHeader, MitabVersion version, File outputFile)
Create the options for a MITAB interaction writer.Map<String,Object>
getMitabOptions(boolean writeHeader, MitabVersion version, OutputStream output)
Create the options for a MITAB interaction writer.Map<String,Object>
getMitabOptions(boolean writeHeader, MitabVersion version, Writer writer)
Create the options for a MITAB interaction writer.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.Map<String,Object>
getMitabOptions(InteractionCategory objectCategory, ComplexType complexType, File outputFile)
Create the options for a MITAB interaction writer.Map<String,Object>
getMitabOptions(InteractionCategory objectCategory, ComplexType complexType, OutputStream output)
Create the options for a MITAB interaction writer.Map<String,Object>
getMitabOptions(InteractionCategory objectCategory, ComplexType complexType, Writer writer)
Create the options for a MITAB interaction writer.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.
-
-
-
Method Detail
-
getInstance
public static MIWriterOptionFactory getInstance()
Getter for the field
instance
.- Returns:
- a
MIWriterOptionFactory
object.
-
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 writecomplexType
- : the kind of complex to write : n-ary or binaryoutputFile
- : 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 headerversion
- : the MITAB versionoutputFile
- : 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 writecomplexType
- : the kind of complex to write : n-ary or binaryoutput
- : 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 headerversion
- : the MITAB versionoutput
- : 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 writecomplexType
- : the kind of complex to write : n-ary or binarywriter
- : 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 headerversion
- : the MITAB versionwriter
- : 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 writecomplexType
- : the kind of complex to write : n-ary or binaryexpansion
- : the complex expansion method to use if we have n-ary interactionswriteHeader
- : true if we want to write the headerversion
- : the MITAB versionextended
- : true if all the aliases, features and confidences are pure mitab objectsoutput
- aObject
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 defaultcomplexType
- : the kind of complex to write : n-ary or binarytype
- : compact or expanded. It is expanded by defaultversion
- aPsiXmlVersion
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 writecomplexType
- : the kind of complex to write : n-ary or binaryversion
- aPsiXmlVersion
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 writecomplexType
- : the kind of complex to write : n-ary or binaryversion
- : 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 writecomplexType
- : the kind of complex to write : n-ary or binarydefaultSource
- : default source if no source provideddefaultReleaseDate
- : default release date in the entry sourcedefaultEntryAnnotations
- : annotations to write in the entryversion
- : 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 writecomplexType
- : the kind of complex to write : n-ary or binarydefaultSource
- : default source if no source provideddefaultReleaseDate
- : default release date in the entry sourcedefaultEntryAnnotations
- : annotations to write in the entryversion
- : 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 writecomplexType
- : the kind of complex to write : n-ary or binaryelementCache
- : the cache of objects necessary to assign ids to the different MI elementsinteractionSet
- : the instance of set for the interactions that we want to use in compact and expanded modeversion
- : Psi xml versionwriteComplexAsInteractors
- 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 writecomplexType
- : the kind of complex to write : n-ary or binaryelementCache
- : the cache of objects necessary to assign ids to the different MI elementsexperimentSet
- : the instance of set for the experiments that we want to use in compact modeinteractorSet
- : the instance of set for the interactors that we want to use in compact modeavailabilitySet
- : the instance of set for the availability that we want to use in compact modeinteractionSet
- : the instance of set for the interactions that we want to use in compact and expanded modewriteComplexAsInteractors
- : true if we want to write all sub complexes as interactors instead of interactionsextended
- : true if all the interactions, participants, source, experiment, organism, cv terms and xrefs are pure xml objectsversion
- : 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 writecomplexType
- : the kind of complex to write : n-ary or binaryelementCache
- : the cache of objects necessary to assign ids to the different MI elementsinteractionSet
- : the instance of set for the interactions that we want to use in compact and expanded modedefaultSource
- : default source if no source provideddefaultReleaseDate
- : default release date in the entry sourcedefaultEntryAnnotations
- : annotations to write in the entrywriteComplexAsInteractors
- : true if we want to write all sub complexes as interactors instead of interactionsextended
- : true if all the interactions, participants, source, experiment, organism, cv terms and xrefs are pure xml objectsversion
- : 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 writecomplexType
- : the kind of complex to write : n-ary or binaryelementCache
- : the cache of objects necessary to assign ids to the different MI elementsexperimentSet
- : the instance of set for the experiments that we want to use in compact modeinteractorSet
- : the instance of set for the interactors that we want to use in compact modeavailabilitySet
- : the instance of set for the availability that we want to use in compact modeinteractionSet
- : the instance of set for the interactions that we want to use in compact and expanded modedefaultSource
- : default source if no source provideddefaultReleaseDate
- : default release date in the entry sourcedefaultEntryAnnotations
- : annotations to write in the entrywriteComplexAsInteractors
- : true if we want to write all sub complexes as interactors instead of interactionsextended
- : true if all the interactions, participants, source, experiment, organism, cv terms and xrefs are pure xml objectsversion
- : 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 writecomplexType
- : the kind of complex to write : n-ary or binaryxmlType
- : the type of xml (compact or expanded). The default type is expandedelementCache
- : the cache of objects necessary to assign ids to the different MI elementsexperimentSet
- : the instance of set for the experiments that we want to use in compact modeinteractorSet
- : the instance of set for the interactors that we want to use in compact modeavailabilitySet
- : the instance of set for the availability that we want to use in compact modeinteractionSet
- : the instance of set for the interactions that we want to use in compact and expanded modedefaultSource
- : default source if no source provideddefaultReleaseDate
- : default release date in the entry sourcedefaultEntryAnnotations
- : annotations to write in the entrywriteComplexAsInteractors
- : true if we want to write all sub complexes as interactors instead of interactionsextended
- : true if all the interactions, participants, source, experiment, organism, cv terms and xrefs are pure xml objectsversion
- : Psi xml version- Returns:
- the options for the PSI-XML InteractionWriter
-
-