File: property-functions.texi

package info (click to toggle)
libgnurdf 0.3.0-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,108 kB
  • ctags: 233
  • sloc: sh: 8,929; ansic: 1,222; makefile: 280
file content (122 lines) | stat: -rw-r--r-- 2,831 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
@node Property Functions, Element Functions, Attribute Functions, Functions
@chapter Property Functions

@itemize @bullet
@item
Function: int rdfGetProperty(RdfElement *parent, const char *property,
RdfNamespace *ns, char **value, RdfElement **element)
@findex rdfGetProperty

Returns the element or its value with the specified name in a
description or container.

To return only the property's value, pass a pointer to a string for
value and NULL for element.

Likewise, you can retrieve only the element by passing a pointer to a
pointer of an RdfElement for element and NULL for value.

If you wish to retrieve both the value and the element, pass a pointer
to a string for value and a pointer to a pointer of an RdfElement to
element.

If the property found is a Bag container, RDF_BAG is returned.
If it's a Sequence container, RDF_SEQ is returned.
If it's an Alternate container, RDF_ALT is returned.
If it's an RDF description, RDF_DESC is returned.
If the property is a normal property, 0 is returned.
If the property was not found, -1 is returned.

@itemize @minus
@item
parent: The description containing the property.

@item
property: The name of the property to retrieve.

@item
ns: The namespace of the property.

@item
value: The returned value, unless NULL is passed.

@item
element: The returned element, unless NULL is passed.
@end itemize

@item
Function: RdfElement *rdfSetProperty(RdfElement *parent,
const char *property, RdfNamespace *ns, const char *value)
@findex rdfSetProperty

Sets the value of a property in a description or container.

The new element is returned.

@itemize @minus
@item
parent: The description or container which will hold the property.

@item
property: The name of the property.

@item
ns: The namespace of the property.

@item
value: The property's value.
@end itemize

@item
Function: RdfElement *rdfSetElement(RdfElement *parent,
const char *property, RdfNamespace *ns, RdfElement *element)
@findex rdfSetElement

Sets the element of a property in a description or container.

The element is returned.

@itemize @minus
@item
parent: The description or container which will hold the property.

@item
property: The name of the property.

@item
ns: The namespace of the property.

@item
element: The property's element.
@end itemize

@item
Function: void rdfRemoveProperty(RdfElement *parent,
const char *property, RdfNamespace *ns)
@findex rdfRemoveProperty

Removes a property from a description or container.

@itemize @minus
@item
parent: The description or container which holds the property.

@item
property: The property's name.

@item
ns: The property's namespace.
@end itemize

@item
Function: void rdfRemoveElement(RdfElement *element)

Removes an element from a description or container.

@itemize @minus
@item
element: The element to remove.
@end itemize

@end itemize