Versions Compared

Key

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

...

As mentioned, the EIInstance only represents RDF statements that eagle-i users need. So a DNA sequencer would have the type "DNA sequencer", but it would also have a type of "Instrument." In an EIInstance, it would not have the type "Continuant" or "Thing" even though there will certainly be an inferred or inferrable statement in the repository to that effect. What types can be retrieved for (and cached in) an EIInstance depend on annotations in the application ontology; if the type is annotated as ClassGroup_DataModelCreate, it's included in the type hierarchy of the EIInstance. Every EIInstance must also have a label and (of course) a URI; these are encapsulated in its EIEntity. 

An EIInstance also contains all the other relevant statements, grouped into types of properties. Properties have two relevant dimensions: whether they come from the eagle-i ontology or not, and whether their values are references to other subjects in the repository (or ontology) or are complete in themselves. Bear in mind that (almost) all properties can legitimately have multiple distinct values for the same property, so the EIInstance keeps them as multimaps. Since the values are all distinct and have no intrinsic ordering, the EIInstance keeps the values of a particular property as a Set.

...

The EIInstanceMinimal is the core representation for listing resources in the webapps (both SWEET and search frontendsfront ends). As the name suggests, it contains only the minimal information required to list the relevant instances.This includes:

...

The repository provides a mechanism for controlling which users can edit which resources. Details can be found in the Repository Workflow Design Guide. It has four core notions: ownership, workflow state, transitions between states, and roles assigned to users (or types of users), which determine which transitions are legal for each user type. All workflow privileges are based on the URI of the user in the repository; therefore, all datatools operations (listing resources, editing them, making workflow transitions, etc.) require a repository username and password.

...

Three classes implement ApplicationStateChangeListener: the MainController, the LeftListPanel, and the {{BreadcrumbWidget.

BreadCrumbWidget
The BreadcrumbWidget displays a trail of resource provider (if any) and resource type selected (if any), with an initial link back to the workbench always.  

LeftListPanel
The LeftListPanel is responsible for displaying the current resource providing organization (lab, division, etc), and a list of available resource types.The LeftListPanel has two modes: when a lab or other resource provider is selected, and when the user is instead browsing people and resources. Its two modes are shown below.

...

  • WORKBENCH: shows a landing page with a number of standard options. For other application domains, it will probably make sense to create a new Workbench class for this mode to invoke.

Image Modified

Editing/Viewing single resources contains three modes:

...

For any of the modes that involve listing resources, the MainController clears its panel, fetches any relevant resources in the form of a list of EIInstanceMinimal, and draws a ResourcesGrid.  For For the edit, view, and duplicate modes, it clears its panel and invokes the FormsPanelFactory to fetch the appropriate resource (and possibly ontology model information) and draw the page.

...

For any mode in the listing resources group, the MainController retrieves a list of EIInstanceMinimals, and then draws a ResourcesGrid. The ResourcesGrid is responsible for drawing lists of resources, of whatever sort.  The The ResourcesGrid has a FilterPanel at the top, which allows filtering the list by any combination of subtype, current owner (claimed by user, or all), and workflow state.  It It also has two PaginationWidgets (one at the top and one at the bottom), which determine how many resources to show per page and which page to view.Note that no total counts are available (and page sizes may be slightly off) because a single resource may be returned multiple times from the repository, but is filtered out at the front end.

...

The job of an OntologyPropertiesRenderer is to draw the properties specified for the instance by its type in the domain ontology.  It It draws them in an order specified by the application ontology. Specific subclasses are responsible for picking exactly how to draw the properties--as labels, as links, or as widgets for editing.

The NonOntologyPropertiesRenderer draws properties found on the given instance but not specified in the domain ontology. VImportant Important examples are the workflow owner and workflow state, creation and modification dates, and the like. VThe The eagle-i application ontology also specifies comments and curator notes for each resource; these are also non-ontology properties.

The OntologyPropViewRenderer is the ontology renderer for viewing resources in a datatools context.  It It creates a LabelValuesWidget for each property that actually has a value on the instance.

The OntologyPropEditRenderer is the ontology renderer for editing resources in a datatools context.  Since Since it needs to present all possible properties, it loads the properties from the EIOntModel as well as the values that currently exist on the instance (if any). The OntologyPropEditRenderer draws widgets that are subclasses of EditWidget (usually wrapped in EditWidgetCollections).

...

  • TextWidget: a simple widget for datatype values; property value goes in a text box
  • TextAreaWidget: a widget for longer datatype values; property value goes in a text area
  • TermWidget: a widget for displaying and selecting domain ontology terms; values are constrained to valid values from the domain ontology (usually subtypes of a specified type)
  • ResourceListWidget: a selection widget for legal values from the repository. Also allows a "create new" option. Selecting the "create new" option inserts a StubWidget under the ResourceListWidget. By default, a ResourceListWidget is populated only with resources of the appropriate type from the current lab; the "See choices from all organizations" link queries for all the resources of that type in the repository.
  • StubWidget: a widget with label and type fields.  Only Only drawn when the user has selected "create new" from a ResourceListWidget. Creates a new stub instance with the specified label and type; all stubs are saved as part of saving the main instance. (First the stubs are saved; once the first save has succeeded, the main instance is saved.)
  • ObjectWidget: a complex widget to allow the user to select a value properly among several allowed ranges (essentially, types).See below.
  • EmbeddedResourceEditWidget: a widget to draw any embedded instances in the current EIInstance.

...

A more complex case is the Topic of a Protocol. It can be an Organism or Virus, a Disease, or a Biological Process. The Biological Process and Disease ranges are both types from the domain ontology; when the user selects one of them, they need to see a TermWidget. An Organism or Virus range, however, is an instance range--the user needs to see a ResourceListWidget with all the relevant organisms and viruses.