Libraries allow you to work with resources in a way that is easy to share
among multiple interactive workbench sessions
. Libraries can exist in two states, or versions. Libraries that
are editable in the editor and part of an interactive workbench session
are called local libraries.
While working with in an interactive workbench session
, you may make a lot of changes in the Vegetables
library, for example. If your changes could be useful with other data, you can make these resources
available by creating a public library version of the Vegetables library. A public
library, as the name implies, is available to any other resources in any
interactive workbench session.
You can see the public libraries in the Manage Libraries dialog box. Once this
public library version exists, you can add it to the resources in other contexts so that these
custom linguistic resources can be shared.
The shipped libraries are initially public libraries. It is possible to edit
the resources in these libraries and then create a new public version. Those new versions would then
be accessible in other interactive workbench sessions.
As you continue to work with your libraries and make changes, your library
versions will become desynchronized. In some cases, a local version might be more recent than the
public version, and in other cases, the public version might be more recent than the local version.
It is also possible for both the public and local versions to contain changes that the other does
not if the public version was updated from within another interactive workbench
session. If your library versions become
desynchronized, you can synchronize them again. Synchronizing library versions consists of
republishing and/or updating local libraries.
Whenever you launch an interactive workbench session or
close one
, you will be prompted to synchronize any
libraries that need updating or republishing. Additionally, you can easily identify the
synchronization state of your local library by the icon appearing beside the library name in the
tree view or by viewing the Library Properties dialog box. You can also choose to do so at any time
through menu selections. The following table describes the five possible states and their associated
icons.
Table 1. Local library synchronization states
| Icon |
Local library status description |
|
|
Unpublished—The local library has never been published. |
|
|
Synchronized—The local and public library versions are identical. This also applies to the
Local Library, which cannot be published because it is intended to contain only session
-specific resources. |
|
|
Out of date—The public library version is more recent than the local version. You can update
your local version with the changes. |
|
|
Newer—The local library version is more recent than the public version. You can republish
your local version to the public version. |
|
|
Out of sync—Both the local and public libraries contain changes that the other does not. You
must decide whether to update or publish your local library. If you update, you will lose the
changes that you made since the last time you updated or published. If you choose to publish, you
will overwrite the changes in the public version. |
Note: If you always update your libraries when you launch an interactive
workbench session or publish when you close one, you are less likely to have libraries that are out of synchronization.
You can republish a library any time you think that the changes in the library
would benefit other streams
that may also contain this library. Then, if your changes would
benefit other streams,
you can update the local versions in those streams. In this way, you can create streams
for each context or domain that applies to your data by creating
new libraries and/or adding any number of public libraries to your resources.
If a public version of a library is shared, there is a greater chance that
differences between local and public versions will arise. Whenever you launch or
close and publish from an interactive workbench session or open or close a template from the Template Editor
, a message is displayed to
enable you to publish and/or update any libraries whose versions are not in sync with those in the
Manage Libraries dialog box. If the public library version is more recent than the local version, a
dialog box asking whether you would like to update opens. You can choose whether to keep the local
version as is instead of updating with the public version or merge the updates into the local
library.