ESciDoc Services ValidationService
Work in progress
ID (Label)[edit]
validation
Complete Name[edit]
Validation Service
Status[edit]
Implemented
Description[edit]
The validation service provides interfaces for validation of the item and container resources in accordance with defined set of rules. Validation rules are defined for a combination of a content model, validation schema, metadata schema version and a validation point. The validation rules are defined with Schematron
Operations Overview[edit]
Operation | Status | Input | Output | Description |
---|---|---|---|---|
validateItemXml | implemented | itemXml: String | String | Scope:Public Validates an item (as XML string) based on the content-model of the item and the validation schema defined in the context the item belongs to. The default validation point is used. |
validateItemXml | implemented | itemXml: String validationPoint: String |
String | Scope:Public Validates an item (as XML string) based on the content-model of the item and the validation schema defined in the context the item belongs to using the given validation point. |
validateItemXmlBySchema | implemented | itemXml: String validationPoint: String validationSchema: String |
String | Scope:Public Validates an item (as XML string) based on the content-model of the item and the given validation schema using the given validation point. |
validateItemObject | implemented | itemXml: String | String | Scope:Public Validates an item (as ValueObject) based on the content-model of the item and the validation schema defined in the context the item belongs to. The default validation point is used. |
validateItemObject | implemented | itemXml: String validationPoint: String |
String | Scope:Public Validates an item (as ValueObject) based on the content-model of the item and the validation schema defined in the context the item belongs to using the given validation point. |
validateItemObjectBySchema | implemented | itemXml: String validationPoint: String validationSchema: String |
String | Scope:Public Validates an item (as ValueObject) based on the content-model of the item and the given validation schema using the given validation point. |
refreshValidationSchemaCache | not implemented | Scope:Public Synchronizes the service's validation schema cache with the underlying validation schema store, i.e. the eSciDoc repository. |
Service interfaces[edit]
Validation service operations are offered via EJB, REST and SOAP interfaces.
For example, see Validation service in action
Download[edit]
- Validation service
- Service interfaces Service interfaces
How to describe which validation schema shall be used[edit]
The first and easiest way is to use "validateItem(Xml|Object)BySchema": Then, only the desired schema has to be named in the method call
e.g. validateItemXmlBySchema("<escidocItem:item/>", "default", "simple")
where "simple" is the validation schema.
The second way currently used in PubMan is to define the validation schema in the Admin-Descriptor defined in the Context. "An AdminDescriptor keeps settings from application. A Context may have multiple Admin-Descriptors as well as no one. The Admin-Descriptors are stored as data streams with unique names. Specifications for XML structure of Admin-Descriptors will not be done" (from the eSciDoc-core documentation). Here is the structure of PubMan's Admin-Descriptor (see http://coreservice.mpdl.mpg.de/ir/context/escidoc:persistent3 ):
<context:admin-descriptor name="pubman" xlink:type="simple" xlink:title="pubman admin descriptor." xlink:href="/ir/context/escidoc:persistent3/admin-descriptors/admin-descriptor/pubman"> <pubman-admin-descriptor> <allowed-genres> <allowed-genre>article</allowed-genre> <allowed-genre>book</allowed-genre> <allowed-genre>book-item</allowed-genre> <allowed-genre>proceedings</allowed-genre> <allowed-genre>conference-paper</allowed-genre> <allowed-genre>talk-at-event</allowed-genre> <allowed-genre>conference-report</allowed-genre> <allowed-genre>poster</allowed-genre> <allowed-genre>courseware-lecture</allowed-genre> <allowed-genre>thesis</allowed-genre> <allowed-genre>paper</allowed-genre> <allowed-genre>report</allowed-genre> <allowed-genre>journal</allowed-genre> <allowed-genre>issue</allowed-genre> <allowed-genre>series</allowed-genre> <allowed-genre>other</allowed-genre> </allowed-genres> <template-item>escidoc:123</template-item> <!-- Here it comes --> <validation-schema>publication</validation-schema> <workflow>standard</workflow> </pubman-admin-descriptor> </context:admin-descriptor>