Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: embed ::

interface XRelationshipAccess
Description
This interface allows to ge 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 uniqued for the whole set of entries, this tag is used as a uniqued identified of an entry.


Methods' Summary
hasByID allows to detect whether there is an entry with specified value of "ID" tag.  
getTargetByID retrieves the value of "Target" tag from the entry with specified "ID" tag.  
getTypeByID retrieves the value of "Type" tag from the entry with specified "ID" tag.  
getRelationshipByID retrieves the sequence containing all the tags from the entry with specified value of "ID" tag.  
getRelationshipsByType retrieves the sequence containing all the entries which "Type" tag takes the specified value.  
getAllRelationships retrieves the sequence containing all the entries controlled by the object.  
insertRelationshipByID allows to insert an entry.  
removeRelationshipByID allows to remove an entry.  
insertRelationships allows to insert a set of entries  
clearRelationships allows to clear the set of entries.  
Methods' Details
hasByID
boolean
hasByID( [in] string  sID )
raises( ::com::sun::star::io::IOException );

Description
allows to detect whether there is an entry with specified value of "ID" tag.
Parameter sID
the value of "ID" tag
Throws
::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 );

Description
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.

Parameter sID
the value of "ID" tag
Throws
::com::sun::star::container::NoSuchElementException in case there is no entry with specified tag
Throws
::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 );

Description
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.

Parameter sID
the value of "ID" tag
Throws
::com::sun::star::container::NoSuchElementException in case there is no entry with specified tag
Throws
::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 );

Description
retrieves the sequence containing all the tags from the entry with specified value of "ID" tag.
Parameter 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
Throws
::com::sun::star::container::NoSuchElementException in case there is no entry with specified tag
Throws
::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 );

Description
retrieves the sequence containing all the entries which "Type" tag takes the specified value.
Parameter 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.
Throws
::com::sun::star::io::IOException in case there is a problem reading the relations info
getAllRelationships
sequence< sequence< ::com::sun::star::beans::StringPair > >
getAllRelationships()
raises( ::com::sun::star::io::IOException );

Description
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
Throws
::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 );

Description
allows to insert an entry.
Parameter sID
the value of "ID" tag
Parameter 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.
Parameter bReplace
specifies whether the replacement of existing entry is allowed
Throws
::com::sun::star::io::IOException in case there is a problem reading/writing the relations info
Throws
::com::sun::star::container::ElementExistException in case an element with the specified "ID" tag exists already, and no replacement is allowed
removeRelationshipByID
void
removeRelationshipByID( [in] string  sID )
raises( ::com::sun::star::container::NoSuchElementException,
::com::sun::star::io::IOException );

Description
allows to remove an entry.
Parameter sID
the value of "ID" tag
Throws
::com::sun::star::container::NoSuchElementException in case there is no entry with specified tag
Throws
::com::sun::star::io::IOException in case there is a problem reading/writing the relations info
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 );

Description
allows to insert a set of entries
Parameter 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.
Parameter bReplace
specifies whether the replacement of existing entry is allowed
Throws
::com::sun::star::container::ElementExistException in case an element with the provided "ID" tag exists already, and no replacement is allowed
Throws
::com::sun::star::io::IOException in case there is a problem reading/writing the relations info
clearRelationships
void
clearRelationships()
raises( ::com::sun::star::io::IOException );

Description
allows to clear the set of entries.
Throws
::com::sun::star::io::IOException in case there is a problem reading/writing the relations info
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.