Persist Ecore models to RDF, or use Active Objects and Reflection to hold active object state in RDF. These slides were presented as a lightning talk at Code Generation 2013 <http: />.
2. Introduction
• Based at the Bristol and Bath Science Park.
• Aerospace and Advanced Manufacturing.
• Model Driven Architecture and Development.
Successes :
• DSL based service configuration
• Model Driven Architecture Evaluation
• Model Driven 3D Printing
• Linked Data and Ontology
3. Purchase-Order MetaModel
Sharing of models between applications is hard:
• Code dependency.
• Wrong level of modularization for Services.
• Alternative Views.
4. Resource Description
RDF : Resource Description Framework <www.w3.org/RDF>
• URIs name resources
• Share data not objects
• Self-describing (schema-less)
5. Resource vs. Object Orientation
public interface PurchaseOrder extends EObject {
String getShipTo();
void setShipTo(String value);
String getBillTo();
void setBillTo(String value);
EList<Item> getItems();
}
External view
• Model reflection in RDF
• Shared ontology in OWL
• Loose coupling
• Resource Orientation
Internal view
• System model
• Code Generation
• Object Orientation
Model Driven
• Ecore Meta-Model
• Architecture Evaluation
6. Persistence and Reflection
• Ecore Persistence framework
– ResourceSet supplies the base URI
e.g. http://example.com/po.rdf
– RDF Resource defines a hash URI
e.g. http://example.com/po.rdf#/0
http://example.com/po.rdf#/0/@items.0
– Benefit : Exchange objects by URI reference
• Active Objects and Reflection
– RDF EStore holds active object state in RDF model
– Generated classes use reflective methods eGet(),eSet(), …
– Generated implementations extend custom EStoreEObjectImpl
– Benefit : Lazy object construction resolves URIs on demand
Resources have (absolute) URIs or may be anonymous.Literals (represented by rectangles) may be untyped, use XSD datatypes, or may use custom datatypes (e.g. for enumerated types).
Resource-Orientationrecasts the code-centric notion of object-orientation to an inter-linked network of web-resources.It is an architectural style for developing software in the form of resources with RESTful interfaces.
In genmodel, set Root Extends Class, and FeatureDelegation to ‘Reflective’.
SPARQL,pronounced "sparkle", is a recursive acronym for SPARQL Protocol and RDF Query Language.The result is returned programmatically as a relation, or as JSON via the web.