Class for parsing and representation of formal public identifiers.

Constructor

new FPI()

Name Description
is_invalid Flag indicating validation status.
owner_identifier Owner identifier FPI component.
public_text_class Public text class FPI component.
public_text_description Text description FPI component.
public_text_designating_sequence Public text designating sequence FPI component.
public_text_display_version Public text display version FPI component.
public_text_language Public text language FPI component.

Name Description
get Returns the space-normalized FPI held internally.
get_uri Returns internally-held FPI as pubid-URN according to RFC 3151.
reset Resets internal components and validation status.
set Sets internally-held FPI to `str`, triggering normalization and validation.
set_urn Sets internally-held FPI from a pubid-URN according to RFC 3151.

Member Details

get(): string

Returns the space-normalized FPI held internally.

Returns

string

internally-help FPI with leading and trailing spaces removed, and with any other sequence of spaces changed into a single space

get_uri()

Returns internally-held FPI as pubid-URN according to RFC 3151.

NOT IMPLEMENTED

is_invalid :string

Flag indicating validation status.

If this isn't empty after invoking set()/set_uri(), this means the FPI is invalid.

owner_identifier :string

Owner identifier FPI component.

public_text_class :string

Public text class FPI component.

public_text_description :string

Text description FPI component.

public_text_designating_sequence :string

Public text designating sequence FPI component.

public_text_display_version :string

Public text display version FPI component.

public_text_language :string

Public text language FPI component.

reset()

Resets internal components and validation status.

set(str): string

Sets internally-held FPI to str, triggering normalization and validation.

Parameters

Name Type Description
str string

the FPI to set/parse

Returns

string

true-ish if str could be parsed as FPI, false-y (empty string) otherwise

set_urn(urn)

Sets internally-held FPI from a pubid-URN according to RFC 3151. The argument string is first transcribed into a FPI (reverse RFC 3151 mapping) then checked using set() as a plain FPI.

The input should be a whitespace-normalized, valid URI.

Parameters

Name Type Description
urn string