Class PersistentDummyObjectHelper

    • Constructor Detail

      • PersistentDummyObjectHelper

        public PersistentDummyObjectHelper()
    • Method Detail

      • resetSeed

        public void resetSeed()
      • getTestNonPersistentBioSequence

        public BioSequence getTestNonPersistentBioSequence​(Taxon taxon)
      • getTestNonPersistentGeneProduct

        public GeneProduct getTestNonPersistentGeneProduct​(Gene gene)
      • getTestNonPersistentQuantitationType

        public QuantitationType getTestNonPersistentQuantitationType()
        Note that if you want a 'preferred' qt or other special properties you have to set it yourself.
        Returns:
        QT
      • getTestElementCollectionSize

        public int getTestElementCollectionSize()
      • setTestElementCollectionSize

        public void setTestElementCollectionSize​(int testElementCollectionSize)
        Override the number of elements made in collections. By default this is quite small, so you can increase it. But please call 'reset' afterwards.
        Parameters:
        testElementCollectionSize - new size
      • getTestExpressionExperimentWithAllDependencies

        public ExpressionExperiment getTestExpressionExperimentWithAllDependencies()
        Add an expressionExperiment to the database for testing purposes. Includes associations.
        Returns:
        EE
      • getTestExpressionExperimentWithAllDependencies

        public ExpressionExperiment getTestExpressionExperimentWithAllDependencies​(boolean doSequence)
        Add an expressionExperiment to the database for testing purposes. Includes associations
        Parameters:
        doSequence - Should the array design get all the sequence information filled in? (true = slower)
        Returns:
        EE
      • getTestExpressionExperimentWithAnalysisAndResults

        public ExpressionExperiment getTestExpressionExperimentWithAnalysisAndResults()
        Create a test EE with analysis results. The design is simple: two conditions: healthy and sick with 3 replicates Random statistics will be generated for all the probes defined in the provided ArrayDesign.
      • getTestPersistentGene

        public Gene getTestPersistentGene()
        Returns:
        with default taxon
      • getTestPersistentGene

        public Gene getTestPersistentGene​(Taxon t)
      • getTestPersistentArrayDesign

        public ArrayDesign getTestPersistentArrayDesign​(int numCompositeSequences,
                                                        boolean randomNames,
                                                        boolean doSequence)
        Convenience method to provide an ArrayDesign that can be used to fill non-nullable associations in test objects. The ArrayDesign is provided with some CompositeSequence DesignElements if desired. If composite sequences are created, they are each associated with a single generated Reporter.
        Parameters:
        numCompositeSequences - The number of CompositeSequences to populate the ArrayDesign with.
        randomNames - If true, probe names will be random strings; otherwise they will be 0_probe_at....N_probe_at
        doSequence - If true, biosequences and biosequence2GeneProduct associations are filled in (slower).
        Returns:
        ArrayDesign
      • getTestPersistentBasicExpressionExperiment

        public ExpressionExperiment getTestPersistentBasicExpressionExperiment()
      • getTestPersistentBasicExpressionExperiment

        public ExpressionExperiment getTestPersistentBasicExpressionExperiment​(ArrayDesign arrayDesign)
        Parameters:
        arrayDesign - AD
        Returns:
        A lighter-weight EE, with no data, and the ADs have no sequences.
      • getTestPersistentBioAssay

        public BioAssay getTestPersistentBioAssay​(ArrayDesign ad,
                                                  BioMaterial bm)
        Convenience method to provide a DatabaseEntry that can be used to fill non-nullable associations in test objects.
        Parameters:
        ad - AD
        bm - BM
        Returns:
        BA
      • getTestPersistentBioMaterial

        public BioMaterial getTestPersistentBioMaterial()
      • getTestPersistentBioMaterial

        public BioMaterial getTestPersistentBioMaterial​(Taxon tax)
      • getTestPersistentBioSequence

        public BioSequence getTestPersistentBioSequence()
      • getTestPersistentBioSequence

        public BioSequence getTestPersistentBioSequence​(Taxon taxon)
      • getTestPersistentBioSequence2GeneProducts

        public Set<BioSequence2GeneProduct> getTestPersistentBioSequence2GeneProducts​(BioSequence bioSequence)
        Parameters:
        bioSequence - bio sequence
        Returns:
        bio sequence to gene products
      • getTestPersistentContact

        public Contact getTestPersistentContact()
        Convenience method to provide a Contact that can be used to fill non-nullable associations in test objects.
        Returns:
        contact
      • getTestPersistentDatabaseEntry

        public DatabaseEntry getTestPersistentDatabaseEntry​(ExternalDatabase ed)
        Convenience method to provide a DatabaseEntry that can be used to fill non-nullable associations in test objects. The accession is set to a random string
        Parameters:
        ed - ED
        Returns:
        db entry
      • getTestPersistentDatabaseEntry

        public DatabaseEntry getTestPersistentDatabaseEntry​(String accession,
                                                            ExternalDatabase ed)
        Convenience method to provide a DatabaseEntry that can be used to fill non-nullable associations in test objects. The accession and ExternalDatabase name are set to random strings.
        Parameters:
        ed - ED
        accession - accession
        Returns:
        db entry
      • getTestPersistentDatabaseEntry

        public DatabaseEntry getTestPersistentDatabaseEntry​(String accession,
                                                            String databaseName)
        Parameters:
        databaseName - GEO or PubMed (others could be supported)
        accession - accession
        Returns:
        db entry
      • getTestPersistentExpressionExperiment

        public ExpressionExperiment getTestPersistentExpressionExperiment()
        Convenience method to provide an ExpressionExperiment that can be used to fill non-nullable associations in test objects. This implementation does NOT fill in associations of the created object.
        Returns:
        EE
      • getTestPersistentExpressionExperiment

        public ExpressionExperiment getTestPersistentExpressionExperiment​(Taxon taxon)
        Convenience method to provide an ExpressionExperiment that can be used to fill non-nullable associations in test objects. This implementation does NOT fill in associations of the created object except for the creation of persistent BioMaterials and BioAssays so that database taxon lookups for this experiment will work.
        Parameters:
        taxon - the experiment will have this taxon
        Returns:
        EE
      • getTestPersistentGeneProduct

        public GeneProduct getTestPersistentGeneProduct​(Gene gene)
      • getTestPersistentQuantitationType

        public QuantitationType getTestPersistentQuantitationType()
        Convenience method to provide a QuantitationType that can be used to fill non-nullable associations in test objects.
        Returns:
        QT
      • getTestPersistentTaxon

        public Taxon getTestPersistentTaxon()
      • resetTestElementCollectionSize

        public void resetTestElementCollectionSize()