Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

VIVO is distributed with a dozens of custom entry form generators. You may want to modify these form generators, or add more of your own.

An example

Say you wish to establish that a particular person is a member of a particular academic department. This relationship can be expressed in a single RDF statement.

...

VIVO includes a custom form generator for this relationship. The custom entry form looks like this:

How is it created?

Note

The creation of custom entry forms is an arcane and eldritch art, for which little documentation is available.

Each form requires a Java class known as a EditConfigurationGenerator. The generator describes the data structure being created, lists the SPARQL queries used, and includes a reference to the Freemarker template that will render the form.

You can start by examining the existing generators in this directory
[VIVO]/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators

and the Freemarker templates found here
[VIVO]/productMods/templates/freemarker/edit/forms

  • Note: The directory structure has changed in version 1.9+.
    [VIVO]/src/... is now [VIVO]/api/src/main/java/...
    [VIVO]/productMods/... is now [VIVO]/webapp/src/main/webapp/...

 

There is also a short page of technical description called Implementing custom forms using N3 editing.

...