new NamePart( [json])
A part of a name.
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
json |
Object |
<optional> |
- See:
Extends
Methods
-
addField(field)
-
Add a field
Parameters:
Name Type Description field
Field - Inherited From:
Returns:
this- Type
- ExtensibleData
-
addLink(link)
-
Add a link
Parameters:
Name Type Description link
Link - Inherited From:
Returns:
this- Type
- ExtensibleData
-
addQualifier(qualifier)
-
Add a qualifier
Parameters:
Name Type Description qualifier
Qualifier | Object Returns:
This instance- Type
- NamePart
-
getFields()
-
Get the fields
- Inherited From:
Returns:
- Type
- Array.<Field>
-
getId()
-
Get the object's id.
- Inherited From:
Returns:
Id- Type
- String
-
getLink(rel)
-
Get a link
Parameters:
Name Type Description rel
String - Inherited From:
Returns:
- Type
- Link
-
getLinks()
-
Get the links
- Inherited From:
Returns:
- Type
- Array.<Link>
-
getQualifiers()
-
Get qualifiers
Returns:
- Type
- Array.<Qualifer>
-
getType()
-
Get the type
Returns:
type- Type
- String
-
getValue()
-
Get the value
Returns:
- Type
- String
-
init(json)
-
Initialize from JSON
Parameters:
Name Type Description json
Object - Overrides:
Returns:
this- Type
- NamePart
-
<static> isInstance(obj)
-
Check whether the given object is an instance of this class.
Parameters:
Name Type Description obj
Object Returns:
- Type
- Boolean
-
setFields(fields)
-
Set the fields
Parameters:
Name Type Description fields
Array.<Field> - Inherited From:
Returns:
this- Type
- ExtensibleData
-
setId(id)
-
Set the object's id.
Parameters:
Name Type Description id
String - Inherited From:
Returns:
This object, for chaining.- Type
- ExtensibleData
-
setLinks(links)
-
Set the links
Parameters:
Name Type Description links
Links - Inherited From:
Returns:
this- Type
- ExtensibleData
-
setQualifiers(qualifiers)
-
Set the qualifiers
Parameters:
Name Type Description qualifiers
Array.<Qualifer> | Array.<Object> Returns:
This instance- Type
- NamePart
-
setType(type)
-
Set the type
Parameters:
Name Type Description type
String Returns:
This instance- Type
- NamePart
-
setValue(value)
-
Set the value
Parameters:
Name Type Description value
String Returns:
This instance- Type
- NamePart
-
toJSON()
-
Export the object as JSON
- Overrides:
Returns:
JSON object- Type
- Object