You are on page 1of 22

FP6-511678 ORCHESTRA Open Architecture and Spatial Data Infrastructure for Risk Management

Integrated Project

Priority 2.3.2.9 Improving Risk Management

WP3.4 OA Service Specifications

Specification of the Format Conversion Service

Revision

[1.7 / 2.2.2]

1/22

Specification of the Format Conversion Service Document Control Page

Document Control Page


Title Creator Subject Description Publisher Contributor Specification of the Format Conversion Service Fischer, Julian Environmental Informatics Group

WP3.4 OA Service Specifications This document defines an abstract and platform independent formal specification of the Format Conversion Service. ORCHESTRA consortium Berlinghoff, Thomas Dih, Pascal Fischer, Julian Hofmann, Thomas Iosifescu-Enescu, Ionut Ma, Wenjie Environmental Informatics Group Environmental Informatics Group Environmental Informatics Group Environmental Informatics Group ETH Zurich Environmental Informatics Group

Date Type Format Identifier Source Language Relation Coverage Rights Deliverable number Work-Package contributing to the Deliverable Contractual Date of Delivery Actual Date of Delivery Audience

2006-07-26 Text application/msword http://portal.opengeospatial.org/files/?artifact_id=12098 Not applicable en-GB. none ORCHESTRA Consortium and restricted audience

D3.4.3 WP3.4 2006-06-30 2006-07-28 public restricted internal

Version number Date Modified by Comments

1.7 / 2.2.2 2007-10-08 Ma, Wenjie Environmental Informatics Group

Intended for incorporation in deliverable 3.4.4

2/22

Specification of the Format Conversion Service Document Control Page

Status

Draft WP leader accepted SP leader accepted Technical supervisor accepted Quality checked Project coordinator accepted

Action requested

to be revised by partners involved in the preparation of the deliverable for approval of the WP leader for approval of the SP leader for approval of the Technical Supervisor for approval of the Quality Manager for approval of the Project Coordinator Deadline for action: 2006-07-28

3/22

Specification of the Format Conversion Service Revision History

Revision History
Revision 1.0 1.1 1.1.1 1.2 / 1.7 Date 2005-09-02 2005-09-24 2006-01-05 2006-02-06 Sections changed all all all all
st

Description 1 intermediate release updated to new template structure Minor updates Add Document Control Page, section Conformance and Annex D: Abstract test suite, changes on headline in some sections. Final version after ETHZ review Update of class diagrams Operation getConversionCapabilities deleted Adoption to template 2.0.5, completion of missing sections. Removal of chapter 6 Appendix A: Service Implementation Recommendation Comments resolved; update to template 2.0.6 updated to new template structure

1.3 / 1.7 1.3.1 / 1.7 1.4 / 1.7 1.5 / 2.0.5

2006-02-09 2006-02-21 2006-02-23 2006-06-26

all 1.2, 5.1 all all

1.6 /2.0.6 1.7 / 2.2.2

2006-08-08 2007-10-08

some all

4/22

Specification of the Format Conversion Service Table of Contents

Table of Contents
1 2 Foreword..................................................................................................................................................... 8 Conventions ................................................................................................................................................ 9 2.1 2.2 2.3 2.4 Abbreviations ....................................................................................................................................... 9 Terms and definitions .......................................................................................................................... 9 UML Notation....................................................................................................................................... 9 Conformance ....................................................................................................................................... 9 Conformance to the OMM ............................................................................................................ 9 Conformance of Implementation Specifications........................................................................... 9

2.4.1 2.4.2 3

Overview and Architecture Outline ........................................................................................................... 10 3.1 3.2 Role and Scope of the Format Conversion Service .......................................................................... 10 Service Interface Specification Summary.......................................................................................... 10

Context of the Format Conversion Service............................................................................................... 11 4.1 4.2 4.3 4.4 Relations to Standards ...................................................................................................................... 11 Relations to ongoing Initiatives and related Projects ........................................................................ 11 Relations to ORCHESTRA Application Schemas ............................................................................. 11 Relations to other ORCHESTRA Service Specifications .................................................................. 12

Requirements ........................................................................................................................................... 13 5.1 5.2 Security Requirements ...................................................................................................................... 13 Reliability Requirements.................................................................................................................... 13

Specification of the Format Conversion Interface..................................................................................... 13 6.1 6.2 Specification of an OAS Profile of Parameter Types used by the Format Conversion Interface...... 14 Specification of the Operations ......................................................................................................... 15 Specification of the convert Operation ....................................................................................... 15

6.2.1 6.3

Specification of Parameter Types ..................................................................................................... 16 OA_UnknownMimeTypeException ............................................................................................ 16 OA_InvalidInputFileException .................................................................................................... 16 OA_ConversionNotSupportedException.................................................................................... 16

6.3.1 6.3.2 6.3.3 7 8

Specification of extended Service Capabilities......................................................................................... 17 Known Issues and Limitations .................................................................................................................. 19 8.1.1 Support for streamed I/O............................................................................................................ 19

5/22

Specification of the Format Conversion Service Table of Contents 8.1.2 9 Cooperation and Cascading between Service Instances .......................................................... 19

Appendix A: Abstract Test Suite (normative)............................................................................................ 21

10 Appendix B: UML Models (normative) ...................................................................................................... 22 10.1 XMI Model ...................................................................................................................................... 22

6/22

Specification of the Format Conversion Service Tables and Diagrams

Tables
Table 1: Summary of operation........................................................................................................................ 13 Table 2: Referenced OA Types ....................................................................................................................... 15 Table 3: Specification of the convert Operation............................................................................................... 16 Table 4: Sections of the service specific capabilities....................................................................................... 17 Table 5 Attributes of the service specific capabilities of section availableOrdinaryConversions .................... 18

Diagrams
Diagram 1: Class Diagram of the Format Conversion Service ........................................................................ 10 Diagram 2: Class Diagram of the Format Conversion Interface...................................................................... 13 Diagram 3 Format Conversion Service specific capabilities............................................................................ 17

7/22

Specification of the Format Conversion Service Foreword

Foreword
This document is an abstract specification of the Format Conversion Service and is based on the Template for the abstract Specification of ORCHESTRA Services version 2.2.2. It updates the specification version 2.0.6. An update was required to accommodate the changes of the new service templates. This document includes two annexes: Appendix A: Abstract Test Suite (normative) is mandatory and Appendix B: UML Models (normative) is optional.

8/22

Specification of the Format Conversion Service Conventions

2 2.1

Conventions Abbreviations
The abbreviations used in this document are defined in chapter 3.1 of the Reference Model for the ORCHESTRA Architecture Version 2.0 (RM-OA).

2.2

Terms and definitions


Terms and definitions necessary for understanding this document are defined in chapter 3.2 of the RMOA Glossary.

2.3

UML Notation
All diagrams that appear in this specification are presented using the Unified Modelling Language (UML) version 2.0 as the conceptual schema language.

2.4
2.4.1

Conformance
Conformance to the OMM This abstract service specification is specified according to the rules of the ORCHESTRA Service Metamodel (OMM-Service) and follows the rules for ORCHESTRA Services as described in chapter 9.2 of the RM-OA. The extended service capabilities are be modelled according to the RM-OA rules for OAS-MI.

2.4.2

Conformance of Implementation Specifications Conformance of Implementation Specifications to this Abstract Specification shall be checked using all the relevant tests and rules specified or referenced in Appendix A: Abstract Test Suite (normative).

9/22

Specification of the Format Conversion Service Overview and Architecture Outline

3 3.1

Overview and Architecture Outline Role and Scope of the Format Conversion Service
The Format Conversion Service allows the conversion of data given in one format to the corresponding data given in another format. Each conversion between a pair of formats requires a conversion algorithm. The problem we face is how two organisations are able to exchange their documents without caring about the format the other side uses. This is the reason why the Format Conversion Service is needed. It allows the conversion from one document type (MS-Word, OpenDocument, pdf, ) to another one in order to easily exchange documents between different organisations. Data could be text based, like a word document or a pdf, or it could be binary data like JPEG or WMF.

3.2

Service Interface Specification Summary


This service type specification of the Format Conversion Service is comprised of the following interface that is defined in separate interface type specification: The Service Capabilities Interface Type

The following interface is specified as integral part of this service in chapter 6: The Format Conversion Interface Type

cd Format Conv ersion Serv ice - Ov erv iew interface ServiceCapabilities + getCapabilities(OA_GetCapabilitiesRequest) : OA_GetCapabilitiesResponse

FormatConversionInterface interface FormatConversionService + + convert(OA_MimeType, OA_MimeType, OA_File) : OA_File getCapabilities(OA_GetCapabilitiesRequest) : OA_CapabilitiesDocument

Diagram 1: Class Diagram of the Format Conversion Service

10/22

Specification of the Format Conversion Service Context of the Format Conversion Service

4 4.1

Context of the Format Conversion Service Relations to Standards


The way used to specify the format or type is established according to MIME (RFC 2387), a list of available types is maintained at IANA. The MIME-standard is available as RFC 2387 at: http://www.ietf.org/rfc/rfc2387.txt See for available types at: http://www.iana.org/assignments/media-types/ Depending on the requirements of actual applications, the resulting implementation of the Format Conversion Service can adopt different standards. These might be file formats for pictures, e.g.: Hints: a list of picture file formats may be found at: http://en.wikipedia.org/wiki/Graphics_file_format_summary a converter from ArcView Shapefile to SVG is available under the terms of the LGPL at: http://www.carto.net/papers/svg/utils/shp2svg/ Portable Network Graphics (PNG) [W3C-PNG: http://www.w3.org/TR/PNG/ and ISO/IEC 15948:2003] JPEG (lossy and lossless: ITU-T T.81, ISO/IEC IS 10918-1; extensions: ITU-T T.84) JPEG-LS (lossless: ITU-T T.87, ISO/IEC IS 14495-1) JBIG (black and white: ITU-T T.82, ISO/IEC IS 11544-1) JPEG-2000 (evolved from JPEG/JPEG-LS: ITU-T T.800, ISO/IEC IS 15444-1; extensions: ITUT T.801) Scalable Vector Graphics (SVG) [http://www.w3.org/Graphics/SVG/] ArcView Shapefile

Standard file formats for textual documents might be: RTF (various Microsoft specifications) OpenDocument (OASIS Open Document Format for Office Applications; ISO/IEC DIS 26300) Microsoft Word documents

The Format Conversion Service currently does not qualify for the contribution to a standard.

4.2

Relations to ongoing Initiatives and related Projects


The Format Conversion Service has no immediate relation to ongoing projects.

4.3

Relations to ORCHESTRA Application Schemas


The Format Conversion Interface Type Specification that is specified as integral part of this Service Type Specification uses Basic and OA Types that are defined in the package OAS/Basic Types, OAS/OA Types and OAS-MI/OA-MI Types of the Information Viewpoint.

11/22

Specification of the Format Conversion Service Context of the Format Conversion Service The Format Conversion Interface Type Specification that is specified as integral part of this Service Type Specification defines new parameter types. These parameter types are defined the in the package OAS/OA Types/Application Schema Format Conversion Service Exceptions, OAS/OA Types/ Application Schema Format Conversion Service Types of the Information Viewpoint.

4.4

Relations to other ORCHESTRA Service Specifications


The interaction with the Document Access Service is a possible relation to the OA Service. The mode of interaction is to be defined in the respective services specification.

12/22

Specification of the Format Conversion Service Requirements

5 5.1

Requirements Security Requirements


The Format Conversion Service has no requirements beyond the scope of the Authentication and Authorisation Service.

5.2

Reliability Requirements
The question about the technical possibility of a certain conversion will be answerable using the getCapabilities operation. If a certain possible conversion will deliver the expected result is a different question. Consider the conversion of a document given in the format with the mime-type text/html that has to be converted to text/plain. Sloppy spoken the conversion includes parsing the htmldocument, stripping the html-tags and finally produce a reasonable formatted text-file. But finding an algorithm which performs reasonable formatting for an arbitrary html-document is quite hard. Consider the following algorithm: Replace every html-tag with a single space. This will satisfy our requirement converting from text/html to text/plain but will lead to a huge and hardly readable text. Of course there are many better approaches to do that conversion but the basic problem becomes clear. Two text/html to text/plain conversion-adapters may be fairly different. Their use has to be considered in the context of their purpose to really ensure a meaningful outcome.

Specification of the Format Conversion Interface

cd Format Conv ersion Interface interface FormatConversionInterface + convert(OA_MimeType, OA_MimeType, OA_File) : OA_File

Diagram 2: Class Diagram of the Format Conversion Interface The Format Conversion Interface defines the following operation:

Operation Name convert

Description Performs the conversion given by input and output mime type. Table 1: Summary of operation

13/22

Specification of the Format Conversion Service Conformance of Implementation Specifications

6.1

Specification of an OAS Profile of Parameter Types used by the Format Conversion Interface
The following non basic types are used within this specification:

Name OA_File OA_MimeType OA_CapabilitiesDocument OA_UnknownMimeTypeException OA_InvalidInputFileException OA_ConversionNotSupportedException OA_GetCapabilitiesRequest OA_OperationRequest OA_NotificationCallback OA_OperationResponse OA_Notification OA_OperationResult OA_InvokeID OA_VersionNegotiationFailed OA_UnsupportedSchema OA_InvalidParameterValue OA_MissingParameterValue OA_NoApplicableCode OA_InternalError OA_VersionNegotiationFailed

Usage I, O I, O O E E E I I I O I O O E E E E E E E

from OAS OA Types OA Types OA Types OA Types/Exception Types OA Types/Exception Types OA Types/Exception Types OA Types OA Types OA Types OA Types OA Types OA Types OA Types OA Types/Exception Types OA Types/Exception Types OA Types/Exception Types OA Types/Exception Types OA Types/Exception Types OA Types/Exception Types OA Types/Exception Types

New No No No Yes Yes Yes No No No No No No No No No No No No No No

14/22

Specification of the Format Conversion Service Specification of the convert Operation

OA_UnsupportedSchema OA_SyncOperationUnsupported OA_OperationFailure OA_AsyncOperationUnsupported OA_AbortNotPossible OA_InvalidStat

E E E E E E

OA Types/Exception Types OA Types/Exception Types OA Types/Exception Types OA Types/Exception Types OA Types/Exception Types OA Types/Exception Types

No No No No No No

Table 2: Referenced OA Types

6.2
6.2.1

Specification of the Operations


Specification of the convert Operation The mandatory convert operation converts data. This data is provided via an input-file, the format of the input-file is specified via a parameter, and the same applies for the output-file. The signatures of the operation is OA_File convert (OA_MimeType, OA_MimeType, OA_File) throws OA_InvalidParameterValue, OA_MissingParameterValue, OA_NoApplicableCode, OA_InternalError, OA_UnknownMimeTypeException, OA_InvalidInputFileException, OA_ConversionNotSupportedException

Overrides Preconditions Post conditions Use Receives

not applicable none none Mandatory Name outputFormat inputFormat inputFile OA_ OA_MimeType OA_File Type OA_File Type Use mandatory mandatory mandatory Description Mime-type the output-file shall have Mime-type the input-file has The reference to the inputfile Description The converted file Type Cause

Returns

Throws

15/22

Specification of the Format Conversion Service OA_UnknownMimeTypeException

OA_InvalidParameterValue

Operation request contains an invalid parameter value. Return the name of the parameter with invalid value. Operation request does not include a parameter value. Return the name of the missing parameter No other basic or service-specific exception type applies. A problem occurred in the runtime environment (e.g. out of memory) In case a format specified as one of the parameters is not known to this service instance. The specified input-file in not valid. Possible reasons are: not found, or the format does not comply to the specified one. The conversion between the specified input-format and the output-format is not supported.

OA_MissingParameterValue

OA_NoApplicableCode

OA_InternalError

OA_UnknownMimeTypeException

OA_InvalidInputFileException

OA_ConversionNotSupportedException

Table 3: Specification of the convert Operation

6.3

Specification of Parameter Types


This interface specification defines the OA Types These new OA Types will become part of the OAS OA Types. This interface specification does not define any new OT Types. This interface specification does not introduce any new non-ORCHESTRA Types.

6.3.1

OA_UnknownMimeTypeException In case a format specified as one of the parameters is not known to this service instance.

6.3.2

OA_InvalidInputFileException If the specified input-file in not valid, the possible reason are: not found, or the format does not comply with the specified one.

6.3.3

OA_ConversionNotSupportedException The conversion between the specified input-format and the output-format is not supported by this instance of the Format Conversion Service.

16/22

Specification of the Format Conversion Service Specification of Parameter Types

Specification of extended Service Capabilities


As part of ORCHESTRA D3.3.2 a meta-information schema for services is defined acting as a default OAS-MI for service capabilities. OA_MI_CapabilitiesDocument includes both the common capabilities and the service specific capabilities. While the common capabilities are defined in the specification of the Service Capabilities Interface, the specific capabilities have to be specialized in each service specification.

cd Format Conv ersion Serv ice Capabilities OA_MI_Service_SpecificCapabilities type OA_FormatConv ersionCapabilities list + availableOrdinaryConversions: OA_ConversionInformation

type OA_Conv ersionInformation + + input: OA_MimeType output: OA_MimeType

Specialisation/decoration with "isLossy", "isAdapterChain" and so on needs to be rethought. type OA_MI_FCS_SpecificCapabilities + isLossy: Boolean

Diagram 3 Format Conversion Service specific capabilities The schema for service specific capabilities defined here is explicitly divided into the following schema sections:

Section Name availableOrdinaryConversions

Section Contents List of conversions that can be done with using a single conversion algorithm. Each ConversionInformation object represents a single conversion by specifying an input and an output mime type.

Table 4: Sections of the service specific capabilities

17/22

Specification of the Format Conversion Service Specification of Parameter Types

Name Input output

Data Type OA_MimeType OA_MimeType

Description The input format of the data The output format of the data Since some conversions can degrade the quality of the given data, this operation indicates whether a conversion uses at least one lossy conversion adapter.

Multiplicity and Use 1 / mandatory 1 / mandatory

isLossy

Boolean

1 / mandatory

Table 5 Attributes of the service specific capabilities of section availableOrdinaryConversions

18/22

Specification of the Format Conversion Service

Known Issues and Limitations


Support for streamed I/O In the current specifications only files are considered. Maybe support is needed also for streamed input and output. e.g. one company has a video in one format (consider a very large file) and wants to convert in another format for immediate display. Considering the current specifications, at the beginning the video has to be uploaded to your service, then converted (in its entirety), and then to be sent back. This procedure can take a lot of time for huge file sizes. To improve the efficiency a streamed input and output may be considered. If streamed I/O is possible depends on the source- and target-format on the one hand and on the chosen target-platform.

8.1.1

8.1.2

Cooperation and Cascading between Service Instances In the context of the Format Conversion Service the following question has raised. Consider a service has multiple instances in an OSN. Instances of services can each have different capabilities. In the case of the Format Conversion Service, each instance can support different conversions. The question is now, what the capabilities of each service are? The capabilities supported by the current instance or the union of the capabilities of all instances? The same question can be asked for the conversion itself. In the first case another question raises. How does a user locate the correct service instance for his task? A possible solution could be to use a catalogue service to find an appropriate instance. In the second case service instances would have to cooperate. The service instance of the service request (getCapabilities, conversion) would figure out the correct service instance and delegate the request to an appropriate instance without any involvement of the service requestor. The service cooperation is not intended to make any catalogue service obsolete. This approach is based on the assumption that a communication between two service instances can be very effective since they know their own structure very well and thus additional meta-information is not required to delegate any request. Surely, there are more approaches to handle this scenario. In the following a few others will be drafted. Precondition: There are multiple service instances for a certain service. Requirement: The distribution of the service (multiple service instances) should be invisible to the service client. Examples: Services: Format Conversion Service (FCS) o What if the current service instance does not support the requested conversion but another instance does? Document Access Service (DAS) o What if there are multiple DAS instances? How to find a certain document? How to find the instance having a certain document?

Possible Solutions: 1. A service client has to contact the proper service having the needed capability. The problem of finding the correct instance is the service clients problem. Discussion:

19/22

Specification of the Format Conversion Service

Of course, this in not really a solution! Every client would have to solve this problem if it occurs. There would be no reusability at all. 2. A service client always contacts a catalogue service to determine services offering the formatconversion in question. Possible hits may be different Format Conversion Service instances and service-chains (possible defined and annotated by the Service Chain Access Service). 3. A service client may direct the request to any service instance. A broker locates all registered services, checks their capabilities and chooses a proper instance. It delegates the service request to the found instance and redirects the result to the service requestor. Such a broker would make use of Catalogue Services containing service-descriptions especially of Format Conversion Services and a Service Chain Access Service.

20/22

Specification of the Format Conversion Service Appendix A: Abstract Test Suite (normative)

Appendix A: Abstract Test Suite (normative)


When creating an implementation specification of the Format Conversion Service, the Rules for Implementation Specifications of ORCHESTRA Services defined in chapter 9.2.2.3 and the Rules for the Service Mapping to a given Platform of the RM-OA shall be obeyed. In addition, the following tests shall be performed to ensure conformance of an implementation specification to the platform-independent specification of the Format Conversion Service: 1. Syntactical Conformance Are all mandatory operations present? Are all mandatory parameters present? Are the operation signatures correct? Are there any new operations or parameters?

2. Semantical Conformance Is the behaviour of the operation still the same?

Additional conformance checks that are specifically to the Format Conversion Service are not required.

21/22

Specification of the Format Conversion Service Appendix B: UML Models (normative)

10

Appendix B: UML Models (normative)

10.1 XMI Model


The XMI Models of this interface specification can be downloaded from the OGC Portal under the following URL: https://portal.opengeospatial.org/index.php?m=projects&a=view&project_id=140&tab=2&artifact_id=222 38 The XMI Model contains all parameters required by this service including those data types and exceptions inherited or reused from other interface and service specifications.

22/22

You might also like