new ConceptBean( [json])
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
json |
object |
<optional> |
The json to build this object from, if none supplied, default json will be created |
Extends
Methods
-
clone()
-
Return a copy of this structure
- Inherited From:
-
getAgencyId()
-
Returns the Id of the Agency that is responsible for maintaining this structure.
- Inherited From:
Returns:
the Agency ID
- Type
- string
-
getAnnotations()
-
Returns an array of bean.base.AnnotationBean for this structure, or an empty array if there are none
- Inherited From:
Returns:
Array of AnnotationBean's for this Object
- Type
- Array.<bean.base.AnnotationBean>
-
getAnnotationsWithTitle(title)
-
Returns an array of bean.base.AnnotationBean with the given title, or an empty array if none exist
Parameters:
Name Type Description title
string the title to of the Annotation
- Inherited From:
Returns:
Array of Annotation beans
- Type
- Array.<bean.base.AnnotationBean>
-
getAnnotationsWithType(type)
-
Returns an array of bean.base.AnnotationBean with the given type, or an empty array if none exist
Parameters:
Name Type Description type
string the type to of the Annotation
- Inherited From:
Returns:
Array of Annotation beans
- Type
- Array.<bean.base.AnnotationBean>
-
getChildIdentifiables()
-
Returns an Array of child IdentifiableBean belonging to this structure, for example if this structure is a CodelistBean, this call would return all the CodeBean structures
belonging to the CodelistBean- Inherited From:
Returns:
any IdentifiableBean
- Type
- Array.<bean.base.IdentifiableBean>
-
getClassType( [bean])
-
Get the name of the class of this object
Parameters:
Name Type Argument Default Description bean
boolean <optional>
false If true, the word "bean" will be omitted
- Inherited From:
Throws:
-
If the first argument is supplied but not a boolean
- Type
- TypeError
Returns:
Name of the class type (constructor)
- Type
- string
Example
let myCodelist = new CodelistBean(jsonFromServer); myCodelist.getClassType(); // returns 'CodelistBean' myCodelist.getClassType(true); // returns 'Codelist'
-
getCrossReferencingStructures()
-
Returns an array of IdentifiableBean structures that reference this structure
- Inherited From:
Returns:
bean.base.IdentifiableBean[] structures which reference this Identifiable
-
getDescription()
-
Get the Description of this structure.
The locale is determined by the language set in util.LocaleUtils.CURRENT_LANGUAGE
- Inherited From:
Returns:
an Object locale: {"locale":"locale", "value":"value"}
- Type
- object
-
getDescriptionByLocale(locale)
-
Get the Description by locale
Parameters:
Name Type Description locale
string The locale
- Inherited From:
Returns:
an Object locale: {"locale":"locale", "value":"value"}
- Type
- object
-
getDescriptions()
-
Get the descriptions for this Structure for each of the locales which hold a descriptions value
- Inherited From:
Returns:
Array of Object locals: {"locale":"locale", "value":"value"}
- Type
- Array.<object>
-
getEnumerationRef()
-
Returns the structure.CrossReferenceBean to a Codelist or Concept Scheme which contains the allowable content as an enumerated list of Items
Returns:
The reference to the Codelist or Concept Scheme which defines the enumeration of allowable content
-
getFullId()
-
Returns the full id of this structure, e.g if it is a cateogry it will be the id of the category and all the parent categories
- Inherited From:
Returns:
The full id
- Type
- string
-
getFullIdPath(includeDifferentTypes)
-
Returns a period separated id of this identifiable, starting from the non-maintainable top-level ancestor to this identifiable.
For example, if this is "Category A" as a child of "Category AA", then this method will return AA.A (note the category scheme id is not present in this identifier).
Returns null if this is a maintainable bean.
Parameters:
Name Type Description includeDifferentTypes
boolean if true will recurse all the way back up the tree regardless of ancestor types, up to the maintainable level.
If false, will stop at the first occurrence of an ancestor who's getClassType() is not equal to getClassType().- Inherited From:
Returns:
The full id
- Type
- string
-
getGuid()
-
Returns a non-editable unique Identifier for this bean, for client side only.
This GUID is generated automatically on the client on construction, the GUID is completely random and will not be the same for a structure with the same URN if the physical object differes.
- Inherited From:
Returns:
An immutable string containing the a unique identifier for this structure
- Type
- string
Example
var jsonCL = 'get JSON from server var codelist1 = new Codelist(jsonCL); var codelist2 = new Codelist(jsonCL); console.log(codelist1.getUrn() === codelist2.getUrn()); //outputs true console.log(codelist1._guid() === codelist2._guid()); //outputs false
-
getId()
-
Get the Id of this Structure
- Inherited From:
Returns:
The ID
- Type
- string
-
getIsoConceptReference()
-
Get the ISO concept Reference contained in this Concept
Returns:
A URN of the Concept Reference
- Type
- string
-
getItems()
-
Gets the child items of this item, note the bean.base.PseudoHierarchyItemScheme#buildHierarchy method must first have been called in order to arrange the
items into a hierarchy- Inherited From:
Returns:
An array of items that are contained in this item (the items my have items)
- Type
- Array.<bean.base.ItemBean>
-
getMaintainableParent()
-
Returns the bean.base.MaintainableBean to which which this structure belongs. All structures must either be a MaintainableBean or be contained within a MaintainableBean.
If this class is a MaintainableBean, then it will return itself as MaintainableBean is the outermost container for all structures
- Inherited From:
Returns:
This objects maintainable parent
Example
var annualCode = myCodeList.getItem("A"); annualCode.getMaintainableParent() // returns 'myCodeList'
-
getMetadata(callBack)
-
Retrieves all of the associated Metadata.ReferenceMetadata for this structure
Parameters:
Name Type Description callBack
IdentifiableBean~MetadatCallBack a callback for complete
- Inherited From:
-
getMetadataDefs()
-
Returns an array of @see Metadata.ReferenceMetadataLink, or an empty array if there are none
- Inherited From:
-
getName()
-
Get the name of this structure in a specific locale.
The locale is determined by the language which is set in util.LocaleUtils.CURRENT_LANGUAGE
- Inherited From:
Returns:
an Object locale: {"locale":"locale", "value":"value"}
- Type
- object
-
getNameByLocale(locale)
-
Get the name by locale provided
Parameters:
Name Type Description locale
string The locale
- Inherited From:
Returns:
an Object locale: {"locale":"locale", "value":"value"}
- Type
- object
-
getNames()
-
Get the names for this Structure for each of the locales which hold a name value
- Inherited From:
Returns:
Array of Object locals: {"locale":"locale", "value":"value"}
- Type
- Array.<object>
-
getParent( [clazz])
-
Get the parent structure for which this structure is contained
Parameters:
Name Type Argument Description clazz
object <optional>
If supplied will walk up the parent hierarchy until the parent is of this type
- Inherited From:
Returns:
The parent for this object
- Type
- bean.base.Bean
Example
var dsd = dimension.getParent(DataStructureBean); // note that 'DataStructureBean' is not a string but a Class
-
getParentItemId()
-
Get the Parent item id
- Inherited From:
Returns:
The id of the owning item
- Type
- string
-
getRepresentation()
-
get the Representation of this Concept
Returns:
The Representation
-
getUri()
-
Returns the URI for this component, returns null if there is no URI.
URI describes where additional information can be found for this structure.
This is relevant if bean.base.MaintainableBean#isStub is true as the URI will reference the full structure.
- Inherited From:
Returns:
The URI
- Type
- string
-
getUrn()
-
Returns the URN for this component.
The URN is unique to this instance and is a computable generated value based on other attributes set within the component.
- Inherited From:
Returns:
The URN
- Type
- string
-
hasAnnotations()
-
Returns true if there are at least one annotation on this bean
- Inherited From:
Returns:
- Type
- boolean
-
hasAnnotationsWithType(title)
-
Returns true if this has annotations with the given title
Parameters:
Name Type Description title
string the title to of the Annotation
- Inherited From:
Returns:
true if annotations exist with the given title
- Type
- boolean
-
hasChildren()
-
Returns true if this IdentifiableBean has any child IdentifiableBean
- Inherited From:
Returns:
true if this class has Child IdentifiableBean
- Type
- boolean
-
hasEnumeration()
-
returns true if this Concept has any Enumeration
Returns:
True if this Concept has an Enumeration
- Type
- boolean
-
hasMetadata()
-
Returns true if this structure has any Metadata.ReferenceMetadata associated with it, if so the #getMetadataDefs can be used to return the Definitions for each linked report, and #getMetadata
can be used to retrieve all the Metadata.ReferenceMetadata- Inherited From:
Returns:
true if has Reference Metadata
- Type
- boolean
-
toString()
-
Returns a string that represents this Bean.
If this Bean is an bean.base.IdentifiableBean then this will output the URN, otherwise the GUID will be returned
- Inherited From:
Returns:
The URN or GUID
- Type
- string
Example
let myCodelist = new CodelistBean(jsonFromServer); myCodelist.toString() // returns: 'urn:sdmx:org.sdmx.infomodel.codelist.Codelist=SDMX:CL_FREQ(1.0)'