Elements for use in .pluginmap files

<document>

Needs to be present in each .pluginmap file as the root-node (exactly once). Attributes:

base_prefix

Filenames specified in the .pluginmap file are assumed to be relative to the directory of the .pluginmap file + the prefix you specify here. Useful, esp., if all your components are located below a single subdirectory.

namespace

A namespace for the component ids. When looking up components for embedding, the components will be retrievable via a string "namespace::component_id". Set to "rkward" for now.

id

An optional identifier string for this .pluginmap. Specifying this allows third authors to refer to and load your .pluginmap from theirs (see chapter on handling dependencies).

priority

One of "hidden", "low", "medium", or "high". .pluginmaps with priority "medium" or "high" are activated, automatically, when RKWard first finds them. Use priority="hidden" for .pluginmaps that are not meant to be activated, directory (only meant for inclusion). In the current implementation this does not actually hide the .pluginmap, however. (Optional, defaults to "medium").

<dependencies>

This element, specifying dependencies, is allowed as a direct child of the <document> element (once), and as a child of <component> elements (once for each <component> element). Specifies the dependencies that must be met in order to use the plugin(s). See the chapter on dependencies for an overview. Attributes:

rkward_min_version, rkward_max_version

Minimum and maximum allowed version of RKWard. Version specifications may include non-numeric suffixes, like "0.5.7z-devel1". If a specified dependency is not met, the plugin(s) it applies to will be ignored. More information. Optional; if not specified, no minimum / maximum version of RKWard will be required.

R_min_version, R_max_version

Minimum and maximum allowed version of R. Version specifications may not include non-numeric suffixes, like "0.5.7z-devel1". The R version dependency will be shown on the plugins' help pages, but does not have any direct effect, as of RKWard 0.6.1. More information. Optional; if not specified, no minimum / maximum version of R will be required.

Child elements:

<package>

Adds a dependency on a specific R package. Attributes:

name

Package name (required).

min_version, max_version

Minimum / maximum allowed version (optional).

repository

Repository where the package can be found. Optional, but highly recommended, if the package is not available on CRAN.

<pluginmap>

Adds a dependency on a specific RKWard .pluginmap. Attributes:

name

Id string of the required .pluginmap (required).

min_version, max_version

Minimum / maximum allowed version (optional).

url

URL where the .pluginmap can be found. Required.

<about>

May be present exactly once as a direct child of the <document> element. Contains meta information on the .pluginmap (or plugin). See the chapter on 'about' information for an overview. Attributes:

name

User visible name. Optional. Does not have to be the same as the "id".

version

Version number. Optional. The format is not restricted, but to be on the safe side, please follow common versioning schemes such as "x.y.z".

releasedate

Release date specification. Optional in format "YYYY-MM-DD".

shortinfo

A short description of the plugin / .pluginmap. Optional.

url

URL where more information can be found. Optional, but recommended.

copyright

Copyright specification, e.g. "2012-2013 by John Doe". Optional, but recommended.

licence

License specification, e.g. "GPL" or "BSD". Please make sure to accompany your files with a complete copy of the relevant licence. Optional, but recommended.

category

Category of plugin(s), e.g. "Item response theory". As of RKWard 0.6.1, no categories are predefined. Optional.

Child elements:

<author>

Adds information on an author. Attributes:

name, given, family

Either specify the full name for name, or specify both given and family, separately.

role

Author role description (optional).

email

E-mail address, where author can be contacted. Required. May be set to the rkward-devel mailing list, if you are subscribed, and your plugin is meant to be included in the official RKWard release.

url

URL with more information on the author, e.g. homepage (optional).

<components>

Needs to be present exactly once as a direct child of the <document> element. Contains the individual <component>-elements described below. No attributes.

<component>

One or more <component> elements should be given as direct children of the <components> element (and only there). Registers a component/plugin with rkward. Attributes:

type

For future extension: The type of component/plugin. Always set to "standard" for now (the only type currently supported).

id

The ID by which this component can be retrieved (for placing it in the menu (see below), or for embedding). See <document>-namespace above.

file

Required at least for components of type="standard": The filename of the XML file describing the GUI.

label

The label for this component, when placed in the menu hierarchy.

<attribute>

Defines an attribute of a component. Only meaningful for import plugins so far. Only allowed as a direct child of <component>. Attributes:

id

Id of the attribute

value

Value of the attribute

labels

Label associated with the attribute

<hierarchy>

Needs to be present exactly once as a direct child of the <document> element. Describes where the components declared above should be placed in the menu hierarchy. Accepts only <menu> elements as direct children. No attributes.

<menu>

One or more <menu> elements should be given as direct children of the <hierarchy> element. Declares a new (sub-)menu. If a menu by the given ID (see below) already exists, the two menus are merged. The <menu> element is allowed either as a direct child of the <hierarchy> element (top level menu), or as the direct child on any other <menu> element (sub-menu). Conversely, the <menu> element accepts other <menu> elements or <entry> elements as children. Attributes:

id

An identifier string of the menu. Useful, when menu definitions are read from several .pluginmap files, to make sure plugins can be placed in the same menu(s). Some menu-ids such as "file" refer to predefined menus (in this case the "File" menu). Be sure to check with existing .pluginmap files to use consistent ids.

label

A label for the menu.

group

Allows to control ordering of menu entries. See menu item ordering. Optional.

<entry>

A menu entry, i.e. a menu option to invoke a plugin. May be used only as a direct child of a <menu> element, accepts no child elements. Attributes:

component

The ID of the component that should be invoked, when this menu entry is activated.

group

Allows to control ordering of menu entries. See menu item ordering. Optional.

<group>

Declares a group of items in the menu. See menu item ordering. Attributes:

id

The name of this group.

separated

Optional. If set to "true" the item in this group will be visually separated from surrounding items.

group

The name of the group to append this group to (optional).

<context>

Declares the entries in a context. Only allowed as a direct child of the <document> tag. Accepts only <menu> tags as direct children. Attributes:

id

The ID of the context. Only two contexts are implemented so far: "x11" and "import".

<require>

Include another .pluginmap file. This .pluginmap file is only loaded once, even if it is <require>d from several other files. The most important use case is to include a pluginmap file, which declares some components, which are embedded by components declared in this .pluginmap. <require>-elements are only allowed as direct children of the <document>-node. Attributes:

file

The filename of the .pluginmap to include. This is seen relative to the directory of the current .pluginmap file + the base_prefix (see above, <document>-element). If you do not know the relative path to the .pluginmap to be included, use the map attribute to refer to it by id, instead.

map

To include a .pluginmap file from a different package (or an RKWard .pluginmap from your external .pluginmap), you can refer to it by its namespacename::id, as specified in the required .pluginmaps <document> element. Inclusion will fail, if no .pluginmap by that id is known (e.g. not installed on the user's system). You should use this method for including .pluginmaps outside your package, only. For maps inside your package, specifying a relative path (file attribute) is faster, and more reliable.