• GData 0.0 »
  • Classes »
  • GData.Link
  • GData.Link
    • Methods
    • Virtual Methods
    • Properties
    • Signals
    • Fields
    • Class Details
      • GData.Link
        • GData.Link.new()
        • GData.Link.get_content_type()
        • GData.Link.get_language()
        • GData.Link.get_length()
        • GData.Link.get_relation_type()
        • GData.Link.get_title()
        • GData.Link.get_uri()
        • GData.Link.set_content_type()
        • GData.Link.set_language()
        • GData.Link.set_length()
        • GData.Link.set_relation_type()
        • GData.Link.set_title()
        • GData.Link.set_uri()
    • Property Details
      • GData.Link.props.content_type
      • GData.Link.props.language
      • GData.Link.props.length
      • GData.Link.props.relation_type
      • GData.Link.props.title
      • GData.Link.props.uri
  • GData 0.0 »
  • Classes »
  • GData.Link
  • GData.Link
    • Methods
    • Virtual Methods
    • Properties
    • Signals
    • Fields
    • Class Details
      • GData.Link
        • GData.Link.new()
        • GData.Link.get_content_type()
        • GData.Link.get_language()
        • GData.Link.get_length()
        • GData.Link.get_relation_type()
        • GData.Link.get_title()
        • GData.Link.get_uri()
        • GData.Link.set_content_type()
        • GData.Link.set_language()
        • GData.Link.set_length()
        • GData.Link.set_relation_type()
        • GData.Link.set_title()
        • GData.Link.set_uri()
    • Property Details
      • GData.Link.props.content_type
      • GData.Link.props.language
      • GData.Link.props.length
      • GData.Link.props.relation_type
      • GData.Link.props.title
      • GData.Link.props.uri

GData.Link¶

g GData.Comparable GData.Comparable GData.Link GData.Link GData.Comparable->GData.Link GData.Parsable GData.Parsable GData.Parsable->GData.Link GObject.GInterface GObject.GInterface GObject.GInterface->GData.Comparable GObject.Object GObject.Object GObject.Object->GData.Parsable

Subclasses:

None

Methods¶

Inherited:

GData.Parsable (5), GObject.Object (37), GData.Comparable (1)

Structs:

GObject.ObjectClass (5)

class

new (uri, relation_type)

get_content_type ()

get_language ()

get_length ()

get_relation_type ()

get_title ()

get_uri ()

set_content_type (content_type)

set_language (language)

set_length (length)

set_relation_type (relation_type)

set_title (title)

set_uri (uri)

Virtual Methods¶

Inherited:

GData.Parsable (9), GObject.Object (7), GData.Comparable (1)

Properties¶

Inherited:

GData.Parsable (1)

Name

Type

Flags

Short Description

content-type

str

r/w

An advisory media type.

language

str

r/w

Describes the language of the resource pointed to by the uri property.

length

int

r/w

Indicates an advisory length of the linked content in octets.

relation-type

str

r/w

The link relation type.

title

str

r/w

Conveys human-readable information about the link.

uri

str

r/w

The link’s IRI.

Signals¶

Inherited:

GObject.Object (1)

Fields¶

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GData.Parsable

r

Class Details¶

class GData.Link(**kwargs)¶
Bases:

GData.Parsable, GData.Comparable

Abstract:

No

Structure:

GData.LinkClass

All the fields in the GData.Link structure are private and should never be accessed directly.

classmethod new(uri, relation_type)¶
Parameters:
  • uri (str) – the link’s IRI

  • relation_type (str or None) – the relationship of the link to the current document, or None

Returns:

a new GData.Link, or None; unref with GObject.Object.unref()

Return type:

GData.Link

Creates a new GData.Link. More information is available in the Atom specification.

uri must be non-None and non-empty. relation_type must be None or non-empty.

get_content_type()¶
Returns:

the link’s content type, or None

Return type:

str or None

Gets the GData.Link :content-type property. If the content type is non-None, it will be non-empty.

New in version 0.4.0.

get_language()¶
Returns:

the link’s language, or None

Return type:

str or None

Gets the GData.Link :language property. If the language is non-None, it will be non-empty.

New in version 0.4.0.

get_length()¶
Returns:

the link’s length, or -1

Return type:

int

Gets the GData.Link :length property.

New in version 0.4.0.

get_relation_type()¶
Returns:

the link’s relation type

Return type:

str or None

Gets the GData.Link :relation-type property. If the relation type is non-None, it will be non-empty.

New in version 0.4.0.

get_title()¶
Returns:

the link’s title, or None

Return type:

str

Gets the GData.Link :title property.

New in version 0.4.0.

get_uri()¶
Returns:

the link’s URI

Return type:

str

Gets the GData.Link :uri property. The return value is guaranteed to be a valid IRI, as specified by the Atom protocol. Common relationship values such as alternate are returned as http://www.iana.org/assignments/relation/alternate.

For more information, see the Atom specification.

New in version 0.4.0.

set_content_type(content_type)¶
Parameters:

content_type (str or None) – the new content type for the link, or None

Sets the GData.Link :content-type property to content_type. content_type must be None or non-empty.

Set content_type to None to unset the property in the link.

New in version 0.4.0.

set_language(language)¶
Parameters:

language (str or None) – the new language for the link, or None

Sets the GData.Link :language property to language. language must be None or non-empty.

Set language to None to unset the property in the link.

New in version 0.4.0.

set_length(length)¶
Parameters:

length (int) – the new length for the link, or -1

Sets the GData.Link :length property to length.

Set length to -1 to unset the property in the link.

New in version 0.4.0.

set_relation_type(relation_type)¶
Parameters:

relation_type (str or None) – the new relation type for the link, or None

Sets the GData.Link :relation-type property to relation_type. If relation_type is one of the standard Atom relation types, use one of the defined relation type values, instead of a static string. e.g. GData.LINK_EDIT or GData.LINK_SELF.

Set relation_type to None to unset the property in the link.

New in version 0.4.0.

set_title(title)¶
Parameters:

title (str or None) – the new title for the link, or None

Sets the GData.Link :title property to title.

Set title to None to unset the property in the link.

New in version 0.4.0.

set_uri(uri)¶
Parameters:

uri (str) – the new URI for the link

Sets the GData.Link :uri property to uri. uri must be non-None and non-empty.

New in version 0.4.0.

Property Details¶

GData.Link.props.content_type¶
Name:

content-type

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

An advisory media type: it is a hint about the type of the representation that is expected to be returned when the value of the GData.Link :uri property is dereferenced.

For more information, see the

Atom specification.

New in version 0.4.0.

GData.Link.props.language¶
Name:

language

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Describes the language of the resource pointed to by the GData.Link :uri property.

For more information, see the

Atom specification.

New in version 0.4.0.

GData.Link.props.length¶
Name:

length

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE

Indicates an advisory length of the linked content in octets. -1 means the length is unspecified.

For more information, see the

Atom specification.

New in version 0.4.0.

GData.Link.props.relation_type¶
Name:

relation-type

Type:

str

Default Value:

'http://www.iana.org/assignments/relation/alternate'

Flags:

READABLE, WRITABLE

The link relation type.

For more information, see the

Atom specification.

New in version 0.4.0.

GData.Link.props.title¶
Name:

title

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Conveys human-readable information about the link.

For more information, see the

Atom specification.

New in version 0.4.0.

GData.Link.props.uri¶
Name:

uri

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The link’s IRI.

For more information, see the

Atom specification.

New in version 0.4.0.