Class DemographicData
java.lang.Object
org.episteme.social.sociology.DemographicData
- All Implemented Interfaces:
Serializable, UniversalDataModel
Data model for demographic population structures.
Supports representation via individual age-SociologicalGroup cohorts or aggregation from social groups.
Provides consolidated segments for population pyramid visualizations.
- Since:
- 1.0
- Version:
- 1.1
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a single age-cohort segment within a demographic structure. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGroup(int min, int max, long male, long female) Manually adds an age cohort to the model.voidaddGroup(SociologicalGroup SociologicalGroup) Adds a social SociologicalGroup to the model for automated aggregation.getConsolidatedGroups(int bucketSize) Consolidates all data into a list of AgeGroup segments for visualization.Returns a unique identifier for the type of data model.Returns the name of the population being modeled.Returns the primary physical values associated with this model.longReturns the total population count across all specified segments and groups.voidsetPopulationName(String name) Sets the name of the population.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface UniversalDataModel
getMetadata, validate
-
Constructor Details
-
DemographicData
public DemographicData()
-
-
Method Details
-
getModelType
Description copied from interface:UniversalDataModelReturns a unique identifier for the type of data model. Examples: "SPATIAL_GEOMETRY", "ECONOMIC_PORTFOLIO", "ARCHITECTURAL_PLAN".- Specified by:
getModelTypein interfaceUniversalDataModel
-
addGroup
public void addGroup(int min, int max, long male, long female) Manually adds an age cohort to the model.- Parameters:
min- minimum age in yearsmax- maximum age in yearsmale- number of malesfemale- number of females
-
addGroup
Adds a social SociologicalGroup to the model for automated aggregation.- Parameters:
SociologicalGroup- the SociologicalGroup to add
-
getPopulationName
Returns the name of the population being modeled.- Returns:
- the name
-
setPopulationName
Sets the name of the population.- Parameters:
name- the name to set
-
getConsolidatedGroups
Consolidates all data into a list of AgeGroup segments for visualization.- Parameters:
bucketSize- the cohort size in years (e.g., 5 for 5-year chunks)- Returns:
- a sorted list of age cohorts
-
getTotalPopulation
public long getTotalPopulation()Returns the total population count across all specified segments and groups.- Returns:
- total count
-
getQuantities
Description copied from interface:UniversalDataModelReturns the primary physical values associated with this model. This allows generic tools to extract and convert measurements.- Specified by:
getQuantitiesin interfaceUniversalDataModel
-