PronomStubCode

From PreservWiki

Jump to: navigation, search

This small tool provides a stub which can be used to validate code which wants to use the as yet unreleased functionality in Pronom. It validates your POST request and INPUT document and feeds back the relavent result.

You can download the tool here. The tool is basically an http server which responds only to Pronom SOAP requests: By default it runs on port 4444 however this can be changed. To invoke the tool throw a POST request at it as shown below.

Contents

Pronom Documentation

Pronom is invoked by a series of SOAP calls and a nice way to find out how it works is to refer to the documentation for the bits which are available at the following locations:

http://nationalarchives.gov.uk/pronom/servive.asmx

http://nationalarchives.gov.uk/pronom/characterisation.asmx


Coming Soon is a new interface which this code provides a stub for:

http://nationalarchives.gov.uk/pronom/preservationplanning.asmx


The Preservation Planning interface will provide the following new features:

getFormatRisk

getFormatRisk returns the risk value for the file format. This is based upon the values that are selected for the inherent properties of the file format. Every File Format has the following inherent properties:

  • 1000 Ubiquity : The degree of adoption of the format
  • 1001 Support : The number of tools available which can access the format
  • 1002 Disclosure : The extent to which the format documentation id publicly disclosed
  • 1003 Document Quality : The completeness of the available documentation
  • 1004 Stability : The speed and backwards-compatability of version change
  • 1005 Ease of Identification : The ease with which the format can be identified
  • 1006 Ease of validation : The ease with which the format can be validated
  • 1007 Lossiness : Does the format use lossy compression
  • 1008 Intellectual property rights : Whether or not the format in encumbered by IPR
  • 1009 Complexity : The degree of content or behavioural complexity supported.

These can be further broken down for each inherant property. The TNA can then select an option they think best describes the file format. The options are:

  • Ubiquity
    • Format is most widely adopted of type
    • Format is one of the most widely adopted of type
    • Format is in occasional/specialised use
    • Format is no longer in current use
  • Support
    • Format is supported by 10+ tools
    • Format is supported by 6-10 tools
    • Format is supported by 1-5 tools
    • Format is supported by no tools
  • Disclosure
    • Documentation is freely available online
    • Documentation is not available online
    • Documentation available through NDA
    • Documentation is not available
  • Document Quality
    • Documentation is complete and of a high standard
    • Documentation is complete
    • Documentation is poor
    • Documentation is not usable
  • Stability
    • Format is very stable and is backwards compatible
    • Format changes but is backwards compatible
    • Format is not backwards compatible, but versions change infrequently
    • Format changes frequently and is not backwards compatible
  • Ease of Identification
    • Can be positively identified (specific)
    • Can be positively identified (generic)
    • Can be tentatively identified
    • Cannot be identified
  • Ease of Validation
    • Validation tools available
    • No Validation tools available
  • Lossiness
    • No Compression
    • Lossless Compression
    • Lossy Compression
  • Intellectual preperty rights
    • Format is not encumbered by IPR
    • Format is encumbered by IPR
  • Complexity
    • Low complexity format
    • Medium complexity format
    • High complexity format


The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /pronom/preservationplanning.asmx HTTP/1.1
Host: pronom.gsi.local
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://pp.pronom.nationalarchives.gov.uk/getFormatRiskIn"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
 <soap:Body>
   <PUID xmlns="http://pp.pronom.nationalarchives.gov.uk">
     <Value>PUID (see below)</Value>
   </PUID>
 </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
 <soap:Body>
   <FormatRisk xmlns="http://pp.pronom.nationalarchives.gov.uk">
     <risk>double (between 100 and 3000)</risk>
   </FormatRisk>
 </soap:Body>
</soap:Envelope>

getFormatPropertyRisk

Returns the inherent property risk for a given format's property value

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values. The risk value will be returned for the inherent property for the file format specified in the PUID. If no option is selected for the inherent property for the file format, 0 will be returned. Otherwise, with the current values in the registry, values from 10 to 300 will be returned.

POST /pronom/preservationplanning.asmx HTTP/1.1
Host: pronom.gsi.local
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://pp.pronom.nationalarchives.gov.uk/getFormatPropertyRiskIn"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
 <soap:Body>
   <FormatPropertyPair xmlns="http://pp.pronom.nationalarchives.gov.uk">
     <propertyID>int value (see property list in previous section)</propertyID>
     <PUID>string (see below)</PUID>
   </FormatPropertyPair>
 </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
 <soap:Body>
   <FormatPropertyRisk xmlns="http://pp.pronom.nationalarchives.gov.uk">
     <risk>double (between 10 and 300)</risk>
   </FormatPropertyRisk>
 </soap:Body>
</soap:Envelope>

Valid PUID Strings

An example of valid entries for the PUID is fmt/10 or x-chr/1 or sfw/3. The format is PUID_CODE/PUID_NUMBER where PUID_CODE is one of:

fmt       
x-fmt     
sfw       
x-sfw     
hdw       
x-hdw     
chr       
x-chr     
cmp       
x-cmp     

and the PUID_NUMBER is an integer identifying an individual item.

Personal tools