@Configurable public class CrossReferenceResolverEngineImpl extends java.lang.Object implements CrossReferenceResolverEngine
Constructor and Description |
---|
CrossReferenceResolverEngineImpl()
Default Constructor
|
CrossReferenceResolverEngineImpl(SdmxBeans beans)
Constructor which pre-populates cache
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.util.Set<MaintainableBean>> |
getMissingAgencies(SdmxBeans beans,
IdentifiableRetrievalManager retrievalManager)
For the included beans, returns a map of agency URN to maintainable Bean that references the agency
|
java.util.Map<IdentifiableBean,java.util.Set<CrossReferenceBean>> |
getMissingCrossReferences(SdmxBeans beans,
int numberLevelsDeep,
IdentifiableRetrievalManager retrievalManager)
Returns a Map of Identifiable Beans alongside any cross references they declare that could not be found in the set of SdmxBeans provided, and the SdmxBeanRetrievalManager (if given).
|
IdentifiableBean |
resolveCrossReference(CrossReferenceBean crossReference,
IdentifiableRetrievalManager structRetrievalManager)
Resolves a reference from a cross reference bean
|
java.util.Set<IdentifiableBean> |
resolveReferences(MaintainableBean bean,
boolean resolveAgencies,
int numberLevelsDeep,
IdentifiableRetrievalManager retrievalManager)
Returns a set of IdentifiableBeans that the MaintainableBean cross references
|
java.util.Set<IdentifiableBean> |
resolveReferences(ProvisionAgreementBean provision,
IdentifiableRetrievalManager structRetrievalManager)
Returns a set of structures that are directly referenced from this provision
|
java.util.Set<IdentifiableBean> |
resolveReferences(RegistrationBean registation,
ProvisionBeanRetrievalManager provRetrievalManager)
Returns a set of IdentifiableBeans that are directly referenced from this registration
|
java.util.Map<IdentifiableBean,java.util.Set<IdentifiableBean>> |
resolveReferences(SdmxBeans beans,
boolean resolveAgencies,
int numberLevelsDeep,
IdentifiableRetrievalManager retrievalManager)
Resolves all references and returns a Map containing all the input beans and the beans that are cross referenced,
the Map's keyset contains the Identifiable that is the referencer and the Map's value collection contains the referenced artifacts.
|
public CrossReferenceResolverEngineImpl()
public CrossReferenceResolverEngineImpl(SdmxBeans beans)
public java.util.Map<IdentifiableBean,java.util.Set<CrossReferenceBean>> getMissingCrossReferences(SdmxBeans beans, int numberLevelsDeep, IdentifiableRetrievalManager retrievalManager)
CrossReferenceResolverEngine
getMissingCrossReferences
in interface CrossReferenceResolverEngine
beans
- - the beans to return the Map of missing references fornumberLevelsDeep
- - the number of times to recurse down the reference stack. An example is a dataflow directly references a DSD (numberLevelsDeep=1), the DSD
may in turn reference a Codelist (numberLevelsDeep=2). The numberLevelsDeep argument can be a positive integer specifying how deeply to resolve the
references, an argument of 0 (zero) implies there is no limit, and the resolver engine will continue recursing until it has found every directly and indirectly referencedpublic java.util.Set<IdentifiableBean> resolveReferences(ProvisionAgreementBean provision, IdentifiableRetrievalManager structRetrievalManager)
CrossReferenceResolverEngine
resolveReferences
in interface CrossReferenceResolverEngine
provision
- - the provision to resolve the references forstructRetrievalManager
- - must not be null as this will be used to resolve the referencespublic java.util.Map<java.lang.String,java.util.Set<MaintainableBean>> getMissingAgencies(SdmxBeans beans, IdentifiableRetrievalManager retrievalManager)
CrossReferenceResolverEngine
getMissingAgencies
in interface CrossReferenceResolverEngine
public java.util.Set<IdentifiableBean> resolveReferences(RegistrationBean registation, ProvisionBeanRetrievalManager provRetrievalManager)
CrossReferenceResolverEngine
resolveReferences
in interface CrossReferenceResolverEngine
registation
- - the registration to resolve the references forprovRetrievalManager
- - Used to resolve the provision references. Can be null if registration is not linked to a provisionpublic java.util.Map<IdentifiableBean,java.util.Set<IdentifiableBean>> resolveReferences(SdmxBeans beans, boolean resolveAgencies, int numberLevelsDeep, IdentifiableRetrievalManager retrievalManager) throws CrossReferenceException
CrossReferenceResolverEngine
resolveReferences
in interface CrossReferenceResolverEngine
beans
- - the SdmxBeans container, containing all the beans to check references forresolveAgencies
- - if true the resolver engine will also attempt to resolve referenced agenciesnumberLevelsDeep
- - the number of times to recurse down the reference stack. An example is a dataflow directly references a DSD (numberLevelsDeep=1), the DSD
may in turn reference a Codelist (numberLevelsDeep=2). The numberLevelsDeep argument can be a positive integer specifying how deeply to resolve the
references, an argument of 0 (zero) implies there is no limit, and the resolver engine will continue recursing until it has found every directly and indirectly referenced
artifact. Note that there is no risk of infinite recursion in calling this.CrossReferenceException
- - if any of the references could not be resolvedpublic java.util.Set<IdentifiableBean> resolveReferences(MaintainableBean bean, boolean resolveAgencies, int numberLevelsDeep, IdentifiableRetrievalManager retrievalManager) throws CrossReferenceException
CrossReferenceResolverEngine
resolveReferences
in interface CrossReferenceResolverEngine
resolveAgencies
- - if true will also resolve the agenciesnumberLevelsDeep
- - the number of times to recurse down the reference stack. An example is a dataflow directly references a DSD (numberLevelsDeep=1), the DSD
may in turn reference a Codelist (numberLevelsDeep=2). The numberLevelsDeep argument can be a positive integer specifying how deeply to resolve the
references, an argument of 0 (zero) implies there is no limit, and the resolver engine will continue recursing until it has found every directly and indirectly referenced
artifact. Note that there is no risk of infinite recursion in calling this.CrossReferenceException
- - if any of the references could not be resolvedpublic IdentifiableBean resolveCrossReference(CrossReferenceBean crossReference, IdentifiableRetrievalManager structRetrievalManager) throws CrossReferenceException
CrossReferenceResolverEngine
resolveCrossReference
in interface CrossReferenceResolverEngine
CrossReferenceException