public class StructureEnricher
extends java.lang.Object
Constructor and Description |
---|
StructureEnricher() |
Modifier and Type | Method and Description |
---|---|
static java.util.HashMap<java.lang.String,ConsumerAgentGroup> |
attachConsumerAgentGroupNames(java.util.Set<ConsumerAgentGroup> consumerAgentGroups)
Method to attach the name of ConsumerAgentGroups to a set of ConsumerAgentGroups.
|
static java.util.Map<java.lang.String,Distribution> |
attachDistributionNames(java.util.Set<Distribution> distributions)
Method to attach the the name of a set of distributions to them.
|
static java.util.HashMap<java.lang.String,FixedProductDescription> |
attachFixedProductDescriptionNames(java.util.Set<FixedProductDescription> fixedProductDescriptions)
Method to attach the name of fixedProductDescriptions to a set of fixedProductDescriptions.
|
static java.util.Map<java.lang.String,Need> |
attachNeedNames(java.util.Set<Need> needs)
Method to attach the name of Needs to a set of Needs.
|
static java.util.HashMap<Value,Preference> |
attachPreferenceValues(java.util.Set<Preference> preferences)
Method to attach the value of Preferences to a set of Preferences.
|
static java.util.Map<ProductGroup,java.util.Map<java.lang.String,ProductGroupAttribute>> |
attachProductGroupAttributeNames(java.util.Set<ProductGroupAttribute> productGroupAttributes,
java.util.Set<ProductGroup> productGroups)
Method to associate a set of productGroupAttribute with their names and their product group.
|
static java.util.Map<java.lang.String,ProductGroupAttribute> |
attachProductGroupAttributeNamesForProductGroup(java.util.Set<ProductGroupAttribute> productGroupAttributes)
Method to attach the name of ProductGroupAttribute to a set of ProductGroupAttributes.
|
static java.util.Map<ProductGroupAttribute,java.util.Set<ProductGroupAttributeValueMapping>> |
attachProductGroupAttributesToProductGroupAttributeValueMappings(java.util.Set<ProductGroupAttributeValueMapping> productGroupAttributePreferenceMapping)
Method to attach the corresponding ProductGroupAttribute of ProductGroupAttributeValueMappings to a set of ProductGroupAttributeValueMappings.
|
static java.util.Map<java.lang.String,ProductGroup> |
attachProductGroupNames(java.util.Set<ProductGroup> productGroups)
Method to attach the the name of a set of productGroups to them.
|
static java.util.Map<java.lang.String,Product> |
attachProductNamesProducts(java.util.Set<Product> products)
Method to attach the name of the products to a given set of products
|
static java.util.HashMap<java.lang.String,Value> |
attachValueNames(java.util.Set<Value> values)
Method to attach the name of Values to a set of Values.
|
static java.util.Map<SNNode,ConsumerAgent> |
consumerAgentByNode(java.util.Set<ConsumerAgent> consumerAgents)
Method to make consumer agents accessible by node by adding them to a map
|
static java.util.Map<ConsumerAgentGroup,java.util.Set<SNNode>> |
deriveNodeByCAG(java.util.Set<ConsumerAgentGroup> consumerAgentGroups,
java.util.Map<SNNode,ConsumerAgent> nodeConsumerAgentMap)
Method to order nodes by the given ConsumerAgentGroup the respective ConsumerAgent belongs to
|
static java.util.Set<Value> |
getValuesUsed(java.util.Set<ConsumerAgentGroup> consumerAgentGroups)
Method to derive the values that a group of consumer agent groups use.
|
static java.util.List<MarketIntroductionEvent> |
sortMarketIntroductionEventSetToListAscending(java.util.Set<MarketIntroductionEvent> marketIntroductionEvents)
Method to convert a set of MarketIntroductionEvents to a sorted list of MarketIntroductionEvent in ascending order.
|
static java.util.List<ProductDiscontinuationEvent> |
sortProductDiscontinuationEventSetToListAscending(java.util.Set<ProductDiscontinuationEvent> productDiscontinuationEvents)
Method to convert a set of ProductDiscontinuationEvents to a sorted list of ProductDiscontinuationEvents in ascending order.
|
public static java.util.Map<ProductGroup,java.util.Map<java.lang.String,ProductGroupAttribute>> attachProductGroupAttributeNames(java.util.Set<ProductGroupAttribute> productGroupAttributes, java.util.Set<ProductGroup> productGroups) throws java.lang.IllegalArgumentException
productGroupAttributes
- The productGroupAttributes that are to be associated with their names and product groupproductGroups
- The productGroups of the productGroupAttributes that should be associatedjava.lang.IllegalArgumentException
- Will be thrown when the set of productGroups or productGroupAttributes is empty, as well as when a productGroupAttribute does not have a namepublic static java.util.Map<java.lang.String,Distribution> attachDistributionNames(java.util.Set<Distribution> distributions) throws java.lang.IllegalArgumentException
distributions
- The distributions to attach the name tojava.lang.IllegalArgumentException
- Will be thrown when the set of distributions is empty or a distribution doesn't have a namepublic static java.util.Map<java.lang.String,ProductGroup> attachProductGroupNames(java.util.Set<ProductGroup> productGroups) throws java.lang.IllegalArgumentException
productGroups
- The productGroups to attach the name tojava.lang.IllegalArgumentException
- Will be thrown when the set of productGroups is empty or a productGroup doesn't have a namepublic static java.util.List<MarketIntroductionEvent> sortMarketIntroductionEventSetToListAscending(java.util.Set<MarketIntroductionEvent> marketIntroductionEvents) throws java.lang.IllegalArgumentException
marketIntroductionEvents
- The MarketIntroductionEvents to be sortedjava.lang.IllegalArgumentException
- Will be thrown if the set of MarketIntroductionEvents is emptypublic static java.util.List<ProductDiscontinuationEvent> sortProductDiscontinuationEventSetToListAscending(java.util.Set<ProductDiscontinuationEvent> productDiscontinuationEvents) throws java.lang.IllegalArgumentException
productDiscontinuationEvents
- The ProductDiscontinuationEvents to be sortedjava.lang.IllegalArgumentException
- Will be thrown if the set of ProductDiscontinuationEvents is emptypublic static java.util.HashMap<java.lang.String,FixedProductDescription> attachFixedProductDescriptionNames(java.util.Set<FixedProductDescription> fixedProductDescriptions) throws java.lang.IllegalArgumentException
fixedProductDescriptions
- The fixedProductDescriptions whose names should be attachedjava.lang.IllegalArgumentException
- Will be thrown if the set of fixedProductDescriptions is empty or one of them doesnt have a namepublic static java.util.HashMap<java.lang.String,Value> attachValueNames(java.util.Set<Value> values)
values
- The Values whose names should be attachedjava.lang.IllegalArgumentException
- Will be thrown if the set of Values is empty or one of them doesnt have a namepublic static java.util.HashMap<java.lang.String,ConsumerAgentGroup> attachConsumerAgentGroupNames(java.util.Set<ConsumerAgentGroup> consumerAgentGroups) throws java.lang.IllegalArgumentException
consumerAgentGroups
- The ConsumerAgentGroups whose names should be attachedjava.lang.IllegalArgumentException
- Will be thrown if the set of ConsumerAgentGroups is empty or one of them doesnt have a namepublic static java.util.HashMap<Value,Preference> attachPreferenceValues(java.util.Set<Preference> preferences) throws java.lang.IllegalArgumentException
preferences
- The Preferences whose values should be attachedjava.lang.IllegalArgumentException
- Will be thrown if the set of Preferences is empty or one of them doesnt have a valuepublic static java.util.Set<Value> getValuesUsed(java.util.Set<ConsumerAgentGroup> consumerAgentGroups) throws java.lang.IllegalArgumentException
consumerAgentGroups
- The consumerAgentGroups to derive the Values fromjava.lang.IllegalArgumentException
- Will be thrown if the set of consumerAgentGroups is emptypublic static java.util.Map<java.lang.String,Need> attachNeedNames(java.util.Set<Need> needs) throws java.lang.IllegalArgumentException
needs
- The Needs whose names should be attachedjava.lang.IllegalArgumentException
- Will be thrown if the set of Needs is empty or one of them doesnt have a namepublic static java.util.Map<java.lang.String,ProductGroupAttribute> attachProductGroupAttributeNamesForProductGroup(java.util.Set<ProductGroupAttribute> productGroupAttributes) throws java.lang.IllegalArgumentException
productGroupAttributes
- The ProductGroupAttributes whose names should be attachedjava.lang.IllegalArgumentException
- Will be thrown if the set of ProductGroupAttributes is empty, one of them doesnt have a name or two ProductGroupAttributes in the provided set share the same name (and thus can't be unambiguously be resolved).public static java.util.Map<ProductGroupAttribute,java.util.Set<ProductGroupAttributeValueMapping>> attachProductGroupAttributesToProductGroupAttributeValueMappings(java.util.Set<ProductGroupAttributeValueMapping> productGroupAttributePreferenceMapping) throws java.lang.IllegalArgumentException
productGroupAttributePreferenceMapping
- The ProductGroupAttributeValueMappings whose ProductGroupAttribute should be attachedjava.lang.IllegalArgumentException
- Will be thrown if the set of ProductGroupAttributeValueMappings is empty or one of them doesnt have a ProductGroupAttributepublic static java.util.Map<SNNode,ConsumerAgent> consumerAgentByNode(java.util.Set<ConsumerAgent> consumerAgents)
consumerAgents
- The agents to append to their respective nodepublic static java.util.Map<ConsumerAgentGroup,java.util.Set<SNNode>> deriveNodeByCAG(java.util.Set<ConsumerAgentGroup> consumerAgentGroups, java.util.Map<SNNode,ConsumerAgent> nodeConsumerAgentMap)
consumerAgentGroups
- The CAGs usednodeConsumerAgentMap
- The association of the nodes and their consumer agentpublic static java.util.Map<java.lang.String,Product> attachProductNamesProducts(java.util.Set<Product> products)
products
- The products to attach names to