org.jembi.sdmxhd.dsd
Class DSD

java.lang.Object
  extended by org.jembi.sdmxhd.dsd.DSD

public class DSD
extends java.lang.Object

Author:
Ryan Crichton This object represents a SDMX-HD DataSet Definition or DSD

Constructor Summary
DSD()
           
 
Method Summary
 java.util.List<Attribute> getAllAttributes()
          Convenience method to return a list of all the attributes in this DSD.
 java.util.List<java.util.List<DimensionWrapper>> getAllCombinationOfDimensions(java.lang.String keyFamilyId)
           
 java.util.List<java.util.List<DimensionWrapper>> getAllCombinationOfDimensions(java.lang.String keyFamilyId, java.util.List<Dimension> restrictToTheseDimensions)
           
 java.util.List<java.util.List<DimensionWrapper>> getAllCombinationofDimensionsForIndicator(java.lang.String indicatorName, java.lang.String keyFamilyId)
          This finds all the combinations of this dimension hierarchy and their codes for a specific Indicator.
 java.util.List<Dimension> getAllDimensions()
          Convenience method to return a list of all the dimensions in this DSD.
 java.util.List<Dimension> getAllDimensionsForIndicator(java.lang.String sdmxhdIndicatorName, java.lang.String keyFamilyId)
          Convenience method to return a list of all the dimensions in this DSD that are user specified.
 java.util.List<Dimension> getAllIndicatorDimensions(java.lang.String keyFamilyId)
          Convenience method to return a list of all the dimensions in this DSD for a particular keyFamily that are related to indicators.
 java.util.List<Dimension> getAllNonStanadrdDimensions()
          Convenience method to return a list of all the dimensions in this DSD that are user specified.
 java.util.List<Dimension> getAllNonStanadrdDimensions(java.lang.String keyFamilyId)
          Convenience method to return a list of all the dimensions in this DSD that are user specified.
 java.util.List<Attribute> getAttributes(java.lang.String attachementLevel, java.lang.String assignmentStatus)
          Convenience method to return a list of all the attributes in this DSD with the supplied attachementLevel and assignmentStatus.
 java.util.List<Attribute> getAttributes(java.lang.String keyFamilyId, java.lang.String attachementLevel, java.lang.String assignmentStatus)
          Convenience method to return a list of all the attributes in this DSD in the specified keyFamily and with the supplied attachementLevel and assignmentStatus.
 CodeList getCodeList(java.lang.String id)
          Gets a codelist this the specified id.
 CodeList getCodeListByAlias(java.lang.String alias)
          Gets the codelist that has the specified alias defined in a SDMX-HD hierarchical codelist.
 java.util.List<CodeList> getCodeLists()
           
 java.util.List<ConceptScheme> getConceptSchemes()
           
 Dimension getDimension(CodeList codeList)
          Gets the dimension that relates to the given codelist
 Dimension getDimension(java.lang.String conceptRef)
          Gets the dimension that with the given conceptRef
 Dimension getDimension(java.lang.String conceptRef, java.lang.String keyFamilyId)
          Gets the dimension that with the given conceptRef for a paticular keyFamily
 java.util.List<DimensionWrapper> getDimensionHierarchy(java.lang.String indicatorName, java.lang.String keyFamilyId)
          Convenience method to return a list of disaggregation dimensions for a particular keyFamily using the given indicator name.
 Header getHeader()
           
 HierarchicalCodelist getHierarchicalCodeList(java.lang.String hierarchicalCodelistId)
           
 java.util.List<HierarchicalCodelist> getHierarchicalCodelists()
           
 java.util.Set<LocalizedString> getIndicatorNames(java.lang.String keyFamilyId)
          Convenience method to return a list of all the names of the indicators in this DSD for the given keyFamily.
 Dimension getIndicatorOrDataElementDimension(java.lang.String keyFamilyId)
           
 java.util.List<KeyFamily> getKeyFamilies()
           
 KeyFamily getKeyFamily(java.lang.String keyFamilyID)
          Gets the KeyFamily in this DSD that has the specified ID.
 java.util.List<OrganisationScheme> getOrganisationSchemes()
           
 void setCodeLists(java.util.List<CodeList> codeLists)
           
 void setConceptSchemes(java.util.List<ConceptScheme> conceptSchemes)
           
 void setHeader(Header header)
           
 void setHierarchicalCodelists(java.util.List<HierarchicalCodelist> hierarchicalCodelists)
           
 void setKeyFamilies(java.util.List<KeyFamily> keyFamilies)
           
 void setOrganisationSchemes(java.util.List<OrganisationScheme> organisationSchemes)
           
 java.lang.String toXML()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DSD

public DSD()
Method Detail

toXML

public java.lang.String toXML()
                       throws java.lang.Exception
Throws:
java.lang.Exception

getIndicatorNames

public java.util.Set<LocalizedString> getIndicatorNames(java.lang.String keyFamilyId)
Convenience method to return a list of all the names of the indicators in this DSD for the given keyFamily.

Returns:
the list of the Indicators names

getAllDimensions

public java.util.List<Dimension> getAllDimensions()
Convenience method to return a list of all the dimensions in this DSD.

Returns:
the list of all dimensions contained in this DSD

getAllIndicatorDimensions

public java.util.List<Dimension> getAllIndicatorDimensions(java.lang.String keyFamilyId)
Convenience method to return a list of all the dimensions in this DSD for a particular keyFamily that are related to indicators. This means that there are referenced in the INDICATOR_DISAGGREGATION_HIERARCHY by an indicator.

Returns:
the list of all dimensions contained in this DSD that are related to indicators

getAllDimensionsForIndicator

public java.util.List<Dimension> getAllDimensionsForIndicator(java.lang.String sdmxhdIndicatorName,
                                                              java.lang.String keyFamilyId)
Convenience method to return a list of all the dimensions in this DSD that are user specified.

Returns:
the list of all dimensions contained in this DSD that are non-standard.

getAllNonStanadrdDimensions

public java.util.List<Dimension> getAllNonStanadrdDimensions()
Convenience method to return a list of all the dimensions in this DSD that are user specified.

Returns:
the list of all dimensions contained in this DSD that are non-standard.

getAllNonStanadrdDimensions

public java.util.List<Dimension> getAllNonStanadrdDimensions(java.lang.String keyFamilyId)
Convenience method to return a list of all the dimensions in this DSD that are user specified.

Returns:
the list of all dimensions contained in this DSD that are non-standard.

getAllAttributes

public java.util.List<Attribute> getAllAttributes()
Convenience method to return a list of all the attributes in this DSD.

Returns:
the list all attributes contained in this DSD

getAttributes

public java.util.List<Attribute> getAttributes(java.lang.String attachementLevel,
                                               java.lang.String assignmentStatus)
Convenience method to return a list of all the attributes in this DSD with the supplied attachementLevel and assignmentStatus. Both parameters are nullable.

Parameters:
attachementLevel - one of "DataSet", "Group", "Series" or "Observation"
assignmentStatus - one of "Mandatory" or "Conditional"
Returns:
list of attributes

getAttributes

public java.util.List<Attribute> getAttributes(java.lang.String keyFamilyId,
                                               java.lang.String attachementLevel,
                                               java.lang.String assignmentStatus)
Convenience method to return a list of all the attributes in this DSD in the specified keyFamily and with the supplied attachementLevel and assignmentStatus. Both parameters are nullable.

Parameters:
attachementLevel - one of "DataSet", "Group", "Series" or "Observation"
assignmentStatus - one of "Mandatory" or "Conditional"
Returns:
list of attributes

getDimensionHierarchy

public java.util.List<DimensionWrapper> getDimensionHierarchy(java.lang.String indicatorName,
                                                              java.lang.String keyFamilyId)
Convenience method to return a list of disaggregation dimensions for a particular keyFamily using the given indicator name.

Parameters:
indicatorName -
Returns:
the list of dimensions for the indicator or an empty list if there is no disaggregation

getHierarchicalCodeList

public HierarchicalCodelist getHierarchicalCodeList(java.lang.String hierarchicalCodelistId)

getIndicatorOrDataElementDimension

public Dimension getIndicatorOrDataElementDimension(java.lang.String keyFamilyId)

getAllCombinationofDimensionsForIndicator

public java.util.List<java.util.List<DimensionWrapper>> getAllCombinationofDimensionsForIndicator(java.lang.String indicatorName,
                                                                                                  java.lang.String keyFamilyId)
This finds all the combinations of this dimension hierarchy and their codes for a specific Indicator. ie. It find all the path through the hierarchy and return the collection of paths. Each path is a list of DimensionWrappers.

Parameters:
indicatorName -
Returns:
a list of the possible paths through the hierarchy. Each path is a list of DimensionWrappers in the correct order.

getAllCombinationOfDimensions

public java.util.List<java.util.List<DimensionWrapper>> getAllCombinationOfDimensions(java.lang.String keyFamilyId)

getAllCombinationOfDimensions

public java.util.List<java.util.List<DimensionWrapper>> getAllCombinationOfDimensions(java.lang.String keyFamilyId,
                                                                                      java.util.List<Dimension> restrictToTheseDimensions)

getDimension

public Dimension getDimension(CodeList codeList)
Gets the dimension that relates to the given codelist

Parameters:
codeList -
Returns:
the dimension that relates to the given codelist

getDimension

public Dimension getDimension(java.lang.String conceptRef)
Gets the dimension that with the given conceptRef

Parameters:
conceptRef -
Returns:
the dimension with the given conceptRef

getDimension

public Dimension getDimension(java.lang.String conceptRef,
                              java.lang.String keyFamilyId)
Gets the dimension that with the given conceptRef for a paticular keyFamily

Parameters:
conceptRef -
Returns:
the dimension with the given conceptRef

getCodeList

public CodeList getCodeList(java.lang.String id)
Gets a codelist this the specified id.

Parameters:
id -
Returns:
the codelist with the specified id.

getCodeListByAlias

public CodeList getCodeListByAlias(java.lang.String alias)
Gets the codelist that has the specified alias defined in a SDMX-HD hierarchical codelist.

Parameters:
alias -
Returns:
the codelist with the specified alias

getKeyFamily

public KeyFamily getKeyFamily(java.lang.String keyFamilyID)
Gets the KeyFamily in this DSD that has the specified ID.

Parameters:
keyFamilyID -
Returns:
the keyfamily with the specified ID

getConceptSchemes

public java.util.List<ConceptScheme> getConceptSchemes()

setConceptSchemes

public void setConceptSchemes(java.util.List<ConceptScheme> conceptSchemes)

getCodeLists

public java.util.List<CodeList> getCodeLists()

setCodeLists

public void setCodeLists(java.util.List<CodeList> codeLists)

getKeyFamilies

public java.util.List<KeyFamily> getKeyFamilies()

setKeyFamilies

public void setKeyFamilies(java.util.List<KeyFamily> keyFamilies)

getHierarchicalCodelists

public java.util.List<HierarchicalCodelist> getHierarchicalCodelists()

setHierarchicalCodelists

public void setHierarchicalCodelists(java.util.List<HierarchicalCodelist> hierarchicalCodelists)

getHeader

public Header getHeader()

setHeader

public void setHeader(Header header)

getOrganisationSchemes

public java.util.List<OrganisationScheme> getOrganisationSchemes()

setOrganisationSchemes

public void setOrganisationSchemes(java.util.List<OrganisationScheme> organisationSchemes)