LibreOffice LibreOffice 6.2 SDK API Reference

Public Member Functions | List of all members
XRelationshipAccess Interface Referencepublished

This interface allows to get access to relationship data. More...

`import"XRelationshipAccess.idl";`

Inheritance diagram for XRelationshipAccess:

## Public Member Functions
boolean | hasByID ([in] string sID) raises ( ::com::sun::star::io::IOException )
| allows to detect whether there is an entry with specified value of "ID" tag. More...
string | getTargetByID ([in] string sID) raises ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::io::IOException )
| retrieves the value of "Target" tag from the entry with specified "ID" tag. More...
string | getTypeByID ([in] string sID) raises ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::io::IOException )
| retrieves the value of "Type" tag from the entry with specified "ID" tag. More...
sequence< ::com::sun::star::beans::StringPair > | getRelationshipByID ([in] string sID) raises ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::io::IOException )
| retrieves the sequence containing all the tags from the entry with specified value of "ID" tag. More...
sequence< sequence< ::com::sun::star::beans::StringPair > > | getRelationshipsByType ([in] string sType) raises ( ::com::sun::star::io::IOException )
| retrieves the sequence containing all the entries which "Type" tag takes the specified value. More...
sequence< sequence< ::com::sun::star::beans::StringPair > > | getAllRelationships () raises ( ::com::sun::star::io::IOException )
| retrieves the sequence containing all the entries controlled by the object. More...
void | insertRelationshipByID ([in] string sID, [in] sequence< ::com::sun::star::beans::StringPair > aEntry, [in] boolean bReplace) raises ( ::com::sun::star::container::ElementExistException, ::com::sun::star::io::IOException )
| allows to insert an entry. More...
void | removeRelationshipByID ([in] string sID) raises ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::io::IOException )
| allows to remove an entry. More...
void | insertRelationships ([in] sequence< sequence< ::com::sun::star::beans::StringPair > > aEntries, [in] boolean bReplace) raises ( ::com::sun::star::container::ElementExistException, ::com::sun::star::io::IOException )
| allows to insert a set of entries More...
void | clearRelationships () raises ( ::com::sun::star::io::IOException )
| allows to clear the set of entries. More...
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object. More...
void | acquire ()
| increases the reference counter by one. More...
void | release ()
| decreases the reference counter by one. More...

## Detailed Description

This interface allows to get access to relationship data.

The relationship data is organized as a set of entries. Each of entry is represented by a set of tags, where each tag has unique for this entry name and a string value. An entry must contain at least one tag named "ID", the value of this tag must be unique for the whole set of entries, this tag is used as a unique identifier of an entry.

## Member Function Documentation

## ◆ clearRelationships()

void clearRelationships | ( |  | ) |
raises | ( | ::com::sun::star::io::IOException
| ) |  |

allows to clear the set of entries.

Exceptions

  com::sun::star::io::IOException | in case there is a problem reading/writing the relations info

## ◆ getAllRelationships()

sequence< sequence< ::com::sun::star::beans::StringPair > > getAllRelationships | ( |  | ) |
raises | ( | ::com::sun::star::io::IOException
| ) |  |

retrieves the sequence containing all the entries controlled by the object.

Returns
  sequence of entries, each entry is represented by sequence, each element of the sequence represents tag, com::sun::star::beans::StringPair::First represents the tag name and com::sun::star::beans::StringPair::Second represents the tag value

Exceptions

  com::sun::star::io::IOException | in case there is a problem reading the relations info

## ◆ getRelationshipByID()

sequence< ::com::sun::star::beans::StringPair > getRelationshipByID | ( | [in] string | sID | ) |
raises | ( | ::com::sun::star::container::NoSuchElementException,
|  | ::com::sun::star::io::IOException
| ) |  |

retrieves the sequence containing all the tags from the entry with specified value of "ID" tag.

Parameters

  sID | the value of "ID" tag

Returns
  sequence, each element of the sequence represents tag, com::sun::star::beans::StringPair::First represents the tag name and com::sun::star::beans::StringPair::Second represents the tag value

Exceptions

  com::sun::star::container::NoSuchElementException | in case there is no entry with specified tag
  com::sun::star::io::IOException | in case there is a problem reading the relations info

## ◆ getRelationshipsByType()

sequence< sequence< ::com::sun::star::beans::StringPair > > getRelationshipsByType | ( | [in] string | sType | ) |
raises | ( | ::com::sun::star::io::IOException
| ) |  |

retrieves the sequence containing all the entries which "Type" tag takes the specified value.

Parameters

  sType | specified value of "Type" tag, the parameter can contain an empty string, in this case all the entries that have empty "Type" tag or no such tag at all are returned

Returns
  sequence of entries, each entry is represented by sequence, each element of the sequence represents tag, com::sun::star::beans::StringPair::First represents the tag name and com::sun::star::beans::StringPair::Second represents the tag value. The sequence should contain the "ID" tag.

Exceptions

  com::sun::star::io::IOException | in case there is a problem reading the relations info

## ◆ getTargetByID()

string getTargetByID | ( | [in] string | sID | ) |
raises | ( | ::com::sun::star::container::NoSuchElementException,
|  | ::com::sun::star::io::IOException
| ) |  |

retrieves the value of "Target" tag from the entry with specified "ID" tag.

If the entry has no "Target" tag an empty string is returned.

Parameters

  sID | the value of "ID" tag

Exceptions

  com::sun::star::container::NoSuchElementException | in case there is no entry with specified tag
  com::sun::star::io::IOException | in case there is a problem reading the relations info

## ◆ getTypeByID()

string getTypeByID | ( | [in] string | sID | ) |
raises | ( | ::com::sun::star::container::NoSuchElementException,
|  | ::com::sun::star::io::IOException
| ) |  |

retrieves the value of "Type" tag from the entry with specified "ID" tag.

If the entry has no "Type" tag an empty string is returned.

Parameters

  sID | the value of "ID" tag

Exceptions

  com::sun::star::container::NoSuchElementException | in case there is no entry with specified tag
  com::sun::star::io::IOException | in case there is a problem reading the relations info

## ◆ hasByID()

boolean hasByID | ( | [in] string | sID | ) |
raises | ( | ::com::sun::star::io::IOException
| ) |  |

allows to detect whether there is an entry with specified value of "ID" tag.

Parameters

  sID | the value of "ID" tag

Exceptions

  com::sun::star::io::IOException | in case there is a problem reading the relations info

## ◆ insertRelationshipByID()

void insertRelationshipByID | ( | [in] string | sID,
|  | [in] sequence< ::com::sun::star::beans::StringPair > | aEntry,
|  | [in] boolean | bReplace
| ) |  |
raises | ( | ::com::sun::star::container::ElementExistException,
|  | ::com::sun::star::io::IOException
| ) |  |

allows to insert an entry.

Parameters

  sID | the value of "ID" tag
  aEntry | a sequence, each element of the sequence represents tag, com::sun::star::beans::StringPair::First represents the tag name and com::sun::star::beans::StringPair::Second represents the tag value. May not contain "ID" tag, that is already specified in previous parameter.
  bReplace | specifies whether the replacement of existing entry is allowed

Exceptions

  com::sun::star::io::IOException | in case there is a problem reading/writing the relations info
  com::sun::star::container::ElementExistException | in case an element with the specified "ID" tag exists already, and no replacement is allowed

## ◆ insertRelationships()

void insertRelationships | ( | [in] sequence< sequence< ::com::sun::star::beans::StringPair > > | aEntries,
|  | [in] boolean | bReplace
| ) |  |
raises | ( | ::com::sun::star::container::ElementExistException,
|  | ::com::sun::star::io::IOException
| ) |  |

allows to insert a set of entries

Parameters

  aEntries | sequence of entries, each entry is represented by sequence, each element of the sequence represents tag, com::sun::star::beans::StringPair::First represents the tag name and com::sun::star::beans::StringPair::Second represents the tag value. Each entry must contain "ID" tag.
  bReplace | specifies whether the replacement of existing entry is allowed

Exceptions

  com::sun::star::container::ElementExistException | in case an element with the provided "ID" tag exists already, and no replacement is allowed
  com::sun::star::io::IOException | in case there is a problem reading/writing the relations info

## ◆ removeRelationshipByID()

void removeRelationshipByID | ( | [in] string | sID | ) |
raises | ( | ::com::sun::star::container::NoSuchElementException,
|  | ::com::sun::star::io::IOException
| ) |  |

allows to remove an entry.

Parameters

  sID | the value of "ID" tag

Exceptions

  com::sun::star::container::NoSuchElementException | in case there is no entry with specified tag
  com::sun::star::io::IOException | in case there is a problem reading/writing the relations info

The documentation for this interface was generated from the following file:

- com/sun/star/embed/XRelationshipAccess.idl