org.eclipse.ohf.stem.internal.data
Class ModelRecordFactory
java.lang.Object
org.eclipse.ohf.stem.internal.data.ModelRecordFactory
public class ModelRecordFactory
- extends java.lang.Object
This class is a factory that creates ModelRecord
s.
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 |
INSTANCE
public static final ModelRecordFactory INSTANCE
- A static instance of the factory.
ModelRecordFactory
public ModelRecordFactory()
createGeographicModelCountryRecords
public java.util.List<ModelRecord.GeographicCountryModelRecord> createGeographicModelCountryRecords(java.util.List<ModelRecord.CountryModelRecord> countryModels,
DataSetRecordHolder dataSetRecords)
- Parameters:
countryModels
- the "node only" country modelsdataSetRecords
- the colleciton of DataSetRecord
s
- 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.CountryModelRecord
s 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 modelsendDate
- the end date of the date range of the contents of the modelspopulationIds
- an array of the identifiers of populations that should be
included in the modelcountryGeographicModelRecords
- the geographic model records of the countriesdataSetRecords
- the DataSetRecord
s containing the labels and
edges,etc.
- Returns:
- a list of
ModelRecord.FullCountryModelRecord
s 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 modelsendDate
- the end date of the date range of the contents of the modelspopulationIds
- an array of the identifiers of populations that should be
included in the modelearthModel
- the model of the Earth "country" (ZZZ) (admin level -1) with
just one node.fullCountryModelRecords
- the full country model records of the countriesdataSetRecords
- the DataSetRecord
s containing the labels and
edges,etc.
- Returns:
- a
ModelRecord.FullCountryModelRecord
s 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
ModelRecord
s, 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
ModelRecord
s, 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 Node
s 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.