new IdentifiableTargetBean( [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'
-
getConceptRef()
-
Get the reference to the bean.conceptscheme.ConceptBean from this Component
- Inherited From:
Returns:
-
getCrossReferencingStructures()
-
Returns an array of IdentifiableBean structures that reference this structure
- Inherited From:
Returns:
bean.base.IdentifiableBean[] structures which reference this Identifiable
-
getEnumerationRef()
-
Returns the structure.CrossReferenceBean to a Codelist or Concept Scheme which contains the allowable content as an enumerated list of Items
- Inherited From:
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
-
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:
-
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
-
getReferencedStructureType()
-
Get the Referenced Structure Type
Returns:
the Structure Type
- Type
- string
-
getRepresentation()
-
Get the representation for Component, this defines the allowable content
- Inherited From:
Returns:
defining the allowable content
-
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 the allowable content for this Component is defined by an enumerated list (Item Scheme)
- Inherited From:
Returns:
True if this component 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)'