Franca-2-ea is a tool that converts programming interfaces and data types specified with Franca IDL into an Enterprise Architect UML project.
Franca is a powerful framework for definition and transformation of software interfaces. It is used for integrating software components from different suppliers, which are built based on various runtime frameworks, platforms and IPC mechanisms. The core of it is Franca IDL (Interface Definition Language), which is a textual language for specification of APIs.
package org.franca2ea.example
import org.franca2ea.example.types.GeoTypes.* from "CommonTypes.fidl"
import org.franca2ea.example.types.BasicTypes.* from "CommonTypes.fidl"
interface ContactBookServiceInterface {
version { major 1 minor 9 }
attribute UInt32 numberOfEntries
<** @description: adds a contact to the contact book **>
method addContact {
in { Contact contact }
out { Handle handle }
error BasicError
}
method removeContact {
in {
Handle handle
}
error extends BasicError{
CONTACT_IN_USE
}
}
method getContactAt {
in {
UInt16 index
}
out {
Handle handle
}
error {
NEGATIVE_INDEX
INDEX_OUT_OF_BOUNDS
}
}
broadcast updateOnContactAdded selective {
out { Handle handle }
}
broadcast updateOnContactRemoved {
out { Handle handle }
}
typedef AddressValueType is String
enumeration AddressFieldtype {
COUNTRY
CITY
STREET
}
enumeration OfficeAddressFieldType extends AddressFieldtype {
BUILDING_NUMBER
}
struct Addressfield {
AddressFieldtype type
AddressValueType value
}
array Address of Addressfield
union AddOnContent {
ByteBuffer binaryContent
String plainTest
Address address
}
enumeration ContentType {
IMAGE
AUDIO_FILE
PHONE_NUMBER
DESCRIPTION
ADDRESS
}
map AddOn { ContentType to AddOnContent }
<** @description: The contact **>
struct Contact {
String firstName
String name
Address homeAddress
Addressfield[] businessAddress
AddOn additionalContent
Coordinate geoPosition
}
struct WebContact extends Contact {
String emailAddress
String homepage
}
}