org.eclipse.ohf.stem.internal.data
Class ModelRecordFactory

java.lang.Object
  extended by org.eclipse.ohf.stem.internal.data.ModelRecordFactory

public class ModelRecordFactory
extends java.lang.Object

This class is a factory that creates ModelRecords.


Field Summary
static ModelRecordFactory INSTANCE
          A static instance of the factory.
 
Constructor Summary
ModelRecordFactory()
           
 
Method Summary
 java.util.List<ModelRecord.CountryModelRecord> createAllLevelsCountryModelRecords(java.util.List<ModelRecord.CountryModelRecord> countryModelRecords)
           
 ModelRecord.CountryModelRecord createCountryModelRecord(CountryGraphRecord countryGraphRecord)
           
 java.util.List<ModelRecord.FullCountryDiseaseModelRecord> createEarthFullCountryAggregatingDiseaseModelRecords(java.util.List<ModelRecord.FullCountryDiseaseModelRecord> withDiseases, DataSetRecordHolder dataSetRecords)
           
 java.util.List<ModelRecord.FullCountryDiseaseModelRecord> createEarthFullCountryDiseaseModelRecords(ModelRecord.FullCountryModelRecord fullEarthModelRecord, DataSetRecordHolder dataSetRecords)
           
 ModelRecord.FullCountryModelRecord createEarthFullCountryModelRecord(java.util.Date startDate, java.util.Date endDate, java.lang.String[] populationIds, ModelRecord.CountryModelRecord earthModel, java.util.List<ModelRecord.FullCountryModelRecord> fullCountryModelRecords, DataSetRecordHolder dataSetRecords)
           
 java.util.List<ModelRecord.FullCountryModelRecord> createFullModelCountryRecords(java.util.Date startDate, java.util.Date endDate, java.lang.String[] populationIds, java.util.List<ModelRecord.GeographicCountryModelRecord> countryGeographicModelRecords, DataSetRecordHolder dataSetRecords)
           
 java.util.List<ModelRecord.GeographicCountryModelRecord> createGeographicModelCountryRecords(java.util.List<ModelRecord.CountryModelRecord> countryModels, DataSetRecordHolder dataSetRecords)
           
static java.util.List<RelationshipGraphRecord> getAllLevelEdgesForCountryModel(java.util.Map<java.lang.String,java.util.Map<ISOKey,java.util.Map<IdentifiableRecord.AdminLevel,java.util.Map<ISOKey,java.util.Map<IdentifiableRecord.AdminLevel,RelationshipGraphRecord>>>>> edgeGraphRecords, java.lang.String edgeName, ModelRecord.CountryModelRecord countryModelRecord)
           
static java.util.List<RelationshipGraphRecord> getAllLevelEdgesForCountryModel2(java.util.Map<java.lang.String,java.util.Map<ISOKey,java.util.Map<IdentifiableRecord.AdminLevel,java.util.Map<ISOKey,java.util.Map<IdentifiableRecord.AdminLevel,RelationshipGraphRecord>>>>> edgeGraphRecords, java.lang.String edgeName, ModelRecord.CountryModelRecord countryModelRecord)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final ModelRecordFactory INSTANCE
A static instance of the factory.

Constructor Detail

ModelRecordFactory

public ModelRecordFactory()
Method Detail

createGeographicModelCountryRecords

public java.util.List<ModelRecord.GeographicCountryModelRecord> createGeographicModelCountryRecords(java.util.List<ModelRecord.CountryModelRecord> countryModels,
                                                                                                    DataSetRecordHolder dataSetRecords)
Parameters:
countryModels - the "node only" country models
dataSetRecords - the colleciton of DataSetRecords
Returns:
a List of country models that have all geographic features and relationship for the country

createAllLevelsCountryModelRecords

public java.util.List<ModelRecord.CountryModelRecord> createAllLevelsCountryModelRecords(java.util.List<ModelRecord.CountryModelRecord> countryModelRecords)
Parameters:
countryModelRecords -
Returns:
a list of ModelRecord.CountryModelRecords that represent all combinations of models based on sequential administration levels

createFullModelCountryRecords

public java.util.List<ModelRecord.FullCountryModelRecord> createFullModelCountryRecords(java.util.Date startDate,
                                                                                        java.util.Date endDate,
                                                                                        java.lang.String[] populationIds,
                                                                                        java.util.List<ModelRecord.GeographicCountryModelRecord> countryGeographicModelRecords,
                                                                                        DataSetRecordHolder dataSetRecords)
Parameters:
startDate - the start date of the date range of the contents of the models
endDate - the end date of the date range of the contents of the models
populationIds - an array of the identifiers of populations that should be included in the model
countryGeographicModelRecords - the geographic model records of the countries
dataSetRecords - the DataSetRecords containing the labels and edges,etc.
Returns:
a list of ModelRecord.FullCountryModelRecords with labels and edges approprite for the date range and population id's

createEarthFullCountryModelRecord

public ModelRecord.FullCountryModelRecord createEarthFullCountryModelRecord(java.util.Date startDate,
                                                                            java.util.Date endDate,
                                                                            java.lang.String[] populationIds,
                                                                            ModelRecord.CountryModelRecord earthModel,
                                                                            java.util.List<ModelRecord.FullCountryModelRecord> fullCountryModelRecords,
                                                                            DataSetRecordHolder dataSetRecords)
Parameters:
startDate - the start date of the date range of the contents of the models
endDate - the end date of the date range of the contents of the models
populationIds - an array of the identifiers of populations that should be included in the model
earthModel - the model of the Earth "country" (ZZZ) (admin level -1) with just one node.
fullCountryModelRecords - the full country model records of the countries
dataSetRecords - the DataSetRecords containing the labels and edges,etc.
Returns:
a ModelRecord.FullCountryModelRecords with the Earth (ZZZ) represented and having containment relationships with the other full country models with labels and edges approprite for the date range and population id's

createEarthFullCountryDiseaseModelRecords

public java.util.List<ModelRecord.FullCountryDiseaseModelRecord> createEarthFullCountryDiseaseModelRecords(ModelRecord.FullCountryModelRecord fullEarthModelRecord,
                                                                                                           DataSetRecordHolder dataSetRecords)
Parameters:
fullEarthModelRecord -
dataSetRecords -
Returns:
a collection of ModelRecords, one for each disease model decorator in #dataSetRecords

createEarthFullCountryAggregatingDiseaseModelRecords

public java.util.List<ModelRecord.FullCountryDiseaseModelRecord> createEarthFullCountryAggregatingDiseaseModelRecords(java.util.List<ModelRecord.FullCountryDiseaseModelRecord> withDiseases,
                                                                                                                      DataSetRecordHolder dataSetRecords)
Parameters:
withDiseases -
dataSetRecords -
Returns:
a collection of ModelRecords, one for each disease model decorator in #dataSetRecords

createCountryModelRecord

public ModelRecord.CountryModelRecord createCountryModelRecord(CountryGraphRecord countryGraphRecord)
Parameters:
countryGraphRecord - a CountryGraphRecord with a Graph that defines the Nodes of a country.
Returns:
a ModelRecord for the country.

getAllLevelEdgesForCountryModel

public static java.util.List<RelationshipGraphRecord> getAllLevelEdgesForCountryModel(java.util.Map<java.lang.String,java.util.Map<ISOKey,java.util.Map<IdentifiableRecord.AdminLevel,java.util.Map<ISOKey,java.util.Map<IdentifiableRecord.AdminLevel,RelationshipGraphRecord>>>>> edgeGraphRecords,
                                                                                      java.lang.String edgeName,
                                                                                      ModelRecord.CountryModelRecord countryModelRecord)
Parameters:
edgeGraphRecords -
edgeName -
countryModelRecord -
Returns:
a list of all of the edges within the country for all administration levels.

getAllLevelEdgesForCountryModel2

public static java.util.List<RelationshipGraphRecord> getAllLevelEdgesForCountryModel2(java.util.Map<java.lang.String,java.util.Map<ISOKey,java.util.Map<IdentifiableRecord.AdminLevel,java.util.Map<ISOKey,java.util.Map<IdentifiableRecord.AdminLevel,RelationshipGraphRecord>>>>> edgeGraphRecords,
                                                                                       java.lang.String edgeName,
                                                                                       ModelRecord.CountryModelRecord countryModelRecord)
Parameters:
edgeGraphRecords -
edgeName -
countryModelRecord -
Returns:
a list of all of the edges within and without the country for all administration levels.