Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
rdf.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
5/* Authors:
6 * Kees Cook <kees@outflux.net>
7 * Jon A. Cruz <jon@joncruz.org>
8 *
9 * Copyright (C) 2004 Authors
10 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
11 */
12#ifndef SEEN_RDF_H
13#define SEEN_RDF_H
14
15#include <glibmm/i18n.h>
16
17class SPDocument;
18
19inline constexpr auto PREFS_METADATA = "/metadata/rdf/";
20
21// yeah, it's not a triple yet...
26 char const *name;
27 char const *resource;
28};
29
34 char const *name; /* localized name of this license */
35 char const *uri; /* URL for the RDF/Work/license element */
36 struct rdf_double_t *details; /* the license details */
37// char const *fragment; /* XML contents for the RDF/License tag */
38};
39
41
45enum RDFType {
46 RDF_CONTENT, // direct between-XML-tags content
47 RDF_AGENT, // requires the "Agent" hierarchy before doing content
48 RDF_RESOURCE, // stored in "rdf:resource" element
49 RDF_XML, // literal XML
50 RDF_BAG // rdf:Bag resources
51};
52
57 RDF_FORMAT_LINE, // uses single line data (GtkEntry)
58 RDF_FORMAT_MULTILINE, // uses multiline data (GtkTextView)
59 RDF_FORMAT_SPECIAL // uses some other edit methods
60};
61
63 RDF_EDIT_GENERIC, // editable via generic widgets
64 RDF_EDIT_SPECIAL, // special widgets are needed
65 RDF_EDIT_HARDCODED // isn't editable
66};
67
72 char const *name; /* unique name of this entity for internal reference */
73 char const *title; /* localized title of this entity for data entry */
74 char const *tag; /* namespace tag for the RDF/Work element */
75 RDFType datatype; /* how to extract/inject the RDF information */
76 char const *tip; /* tool tip to explain the meaning of the entity */
77 RDF_Format format; /* in what format is this data edited? */
78 RDF_Editable editable;/* in what way is the data editable? */
79};
80
82
98
99struct rdf_work_entity_t * rdf_find_entity(char const * name);
100
107const gchar * rdf_get_work_entity(SPDocument const * doc,
108 struct rdf_work_entity_t * entity);
109
117 struct rdf_work_entity_t * entity,
118 const char * text);
119
125struct rdf_license_t * rdf_get_license(SPDocument *doc, bool read_only);
126
133void rdf_set_license(SPDocument * doc,
134 struct rdf_license_t const * license);
135
136void rdf_set_defaults ( SPDocument * doc );
137
139
140#endif // SEEN_RDF_H
141
142/*
143 Local Variables:
144 mode:c++
145 c-file-style:"stroustrup"
146 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
147 indent-tabs-mode:nil
148 fill-column:99
149 End:
150*/
151// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
Typed SVG document implementation.
Definition document.h:101
rdf_license_t rdf_licenses[]
Definition rdf.cpp:179
rdf_work_entity_t rdf_work_entities[]
Definition rdf.cpp:240
void rdf_add_from_preferences(SPDocument *doc)
Definition rdf.cpp:1205
constexpr auto PREFS_METADATA
Definition rdf.h:19
RDF_Format
Describes how a given RDF entity should be edited.
Definition rdf.h:56
@ RDF_FORMAT_MULTILINE
Definition rdf.h:58
@ RDF_FORMAT_LINE
Definition rdf.h:57
@ RDF_FORMAT_SPECIAL
Definition rdf.h:59
void rdf_set_license(SPDocument *doc, struct rdf_license_t const *license)
Stores an RDF/License XML in the document XML.
Definition rdf.cpp:1146
RDFType
Describes how a given RDF entity is stored in XML.
Definition rdf.h:45
@ RDF_CONTENT
Definition rdf.h:46
@ RDF_RESOURCE
Definition rdf.h:48
@ RDF_XML
Definition rdf.h:49
@ RDF_BAG
Definition rdf.h:50
@ RDF_AGENT
Definition rdf.h:47
void rdf_set_defaults(SPDocument *doc)
Definition rdf.cpp:1187
RDF_Editable
Definition rdf.h:62
@ RDF_EDIT_HARDCODED
Definition rdf.h:65
@ RDF_EDIT_GENERIC
Definition rdf.h:63
@ RDF_EDIT_SPECIAL
Definition rdf.h:64
struct rdf_work_entity_t * rdf_find_entity(char const *name)
unsigned int rdf_set_work_entity(SPDocument *doc, struct rdf_work_entity_t *entity, const char *text)
Stores a string into a named RDF/Work entity in the document XML.
struct rdf_license_t * rdf_get_license(SPDocument *doc, bool read_only)
Attempts to match and retrieve a known RDF/License from the document XML.
Definition rdf.cpp:1047
const gchar * rdf_get_work_entity(SPDocument const *doc, struct rdf_work_entity_t *entity)
Retrieves a known RDF/Work entity's contents from the document XML by name.
Definition rdf.cpp:885
Holds license name/resource doubles for rdf_license_t entries.
Definition rdf.h:25
char const * resource
Definition rdf.h:27
char const * name
Definition rdf.h:26
Holds license name and RDF information.
Definition rdf.h:33
char const * uri
Definition rdf.h:35
char const * name
Definition rdf.h:34
struct rdf_double_t * details
Definition rdf.h:36
Generic collection of RDF information for the RDF debug function.
Definition rdf.h:86
char * work_description
Definition rdf.h:95
struct rdf_license_t * license
Definition rdf.h:96
char * work_source
Definition rdf.h:93
char * work_owner
Definition rdf.h:90
char * work_publisher
Definition rdf.h:91
char * work_creator
Definition rdf.h:89
char * work_subject
Definition rdf.h:94
char * work_type
Definition rdf.h:92
char * work_date
Definition rdf.h:88
char * work_title
Definition rdf.h:87
Holds known RDF/Work tags.
Definition rdf.h:71
char const * tip
Definition rdf.h:76
RDF_Editable editable
Definition rdf.h:78
RDF_Format format
Definition rdf.h:77
char const * name
Definition rdf.h:72
RDFType datatype
Definition rdf.h:75
char const * title
Definition rdf.h:73
char const * tag
Definition rdf.h:74
Glib::ustring name
Definition toolbars.cpp:55