AppStream.Reference

g AppStream.Reference AppStream.Reference GObject.Object GObject.Object GObject.Object->AppStream.Reference

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

get_kind ()

get_registry_name ()

get_value ()

set_kind (kind)

set_registry_name (name)

set_value (value)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class AppStream.Reference(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

AppStream.ReferenceClass

classmethod new()
Returns:

a AppStream.Reference

Return type:

AppStream.Reference

Creates a new AppStream.Reference.

get_kind()
Returns:

the AppStream.ReferenceKind

Return type:

AppStream.ReferenceKind

Gets the reference kind.

New in version 1.0.0.

get_registry_name()
Returns:

the registry name.

Return type:

str or None

Gets the name of the registry this reference is for, if the reference is of type AppStream.ReferenceKind.REGISTRY. Otherwise return None.

get_value()
Returns:

the value of this reference.

Return type:

str

Gets the value of this reference, e.g. a DOI if the reference kind is AppStream.ReferenceKind.DOI or an URL for AppStream.ReferenceKind.CITATION_CFF.

set_kind(kind)
Parameters:

kind (AppStream.ReferenceKind) – the AppStream.ReferenceKind, e.g. AppStream.ReferenceKind.DOI.

Sets the reference kind.

New in version 1.0.0.

set_registry_name(name)
Parameters:

name (str) – name of an external registry.

Sets a name of a registry if this reference is of type AppStream.ReferenceKind.REGISTRY.

set_value(value)
Parameters:

value (str) – a value for this reference, e.g. “10.1000/182”

Sets a value for this reference.