Closed LeonanCarvalho closed 6 years ago
thanks for this input. I think it would be great to have a JSON, machine readable description of each of the data models. That would eventually allow us to automatically generate the markdown documentation file associated to each data model.
Any contribution would be very welcome. For instance, you can start by contributing the example you have described in this issue.
Thank your for the appreciation.
I'll send a pull request and I'm open to discus this model with you. I'll include Professor @flaviosilva on this conversation, may he could help us to improve and review this schemas. On this pull I'll send the schemas for Device, DeviceModel, WaterQualityObserved, Vehicle, VehicleModel.
thanks Leonan, but please use one pull request per entity type, that would make it easier the review process
best
2016-10-31 14:21 GMT+01:00 José Leonan S. Carvalho <notifications@github.com
:
Thank your for the appreciation.
I'll send a pull request and I'm open to discus this model with you. I'll include Professor @flaviosilva https://github.com/flaviosilva on this conversation, may he could help us to improve and review this schemas. On this pull I'll send the schemas for Device, DeviceModel, WaterQualityObserved, Vehicle, VehicleModel.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Fiware/dataModels/issues/76#issuecomment-257291581, or mute the thread https://github.com/notifications/unsubscribe-auth/AAqZ_lJulfMaebdXK8vHtY1EX_h_onHXks5q5es9gaJpZM4KgE9O .
@LeonanCarvalho and @jmcanterafonseca ,
It really makes sense a DataModel Schema. In some way, this remembers me the Web Services Description Language (WSDL) - https://www.w3.org/TR/wsdl - WSDL is used to describe an Web Service in a machine readable format. We are open to contribute to this initiative!
I would suggest follow guidelines defined under IETF to the schema (https://tools.ietf.org/id/draft-zyp-json-schema-04.html). There are related initiatives regarding JSON Schema (http://json-schema.org/). There is also a tool that can help the JSON Schema creation (http://jsonschema.net/)
That's the point! Thanks!
The guidelines defined under IETF should be enough to clarify some questions, like how to represent normative references of attributes.
I would like to read it deep this requirements to better understand and then adjust the models suggested on #81 , #82 , #83 , #84 and #85 pull requests.
On a second moment it will be great develop a tool to generate the structure and the docs based on this schema.
closed as dup of #151
The documentation is easily readable to humans. Thinking about machine-readable concept would be nice to have a file containing the JSON data model schema because markdown isn't a good structure to do that, anyway using this format could be easily consumed by developers also.
Despite having a pretty good documentation, references and links, there is no kind of support to developers or ways to automatize and consumers of this standardize the data models as schemes or another way to be a machine-redabe model. Data Models there's no limits, new models and changes on currently ones will be necessary along time. It will evolve aligned to new discoveries, news technologies. So, I think Data Models should be flexible, with version control and scheme standard files on a own repository to be consumed or "learned" by smart applications and developers through a know semantic.
Extracting from the docs, I could build a scheme with all attributes of the Device Data Model. I tried to cover all specs to be consumed by an application. The result was:
namespace
: Represent the universe domain/group/universe from a DataModel.name
: DataModel Name.attributes
: Dataset of a DataModel, each key represents an attribute from DataModel, using a StructuredValue to represent properties:type
: Represent a Data Type, could be a Schema's Data Type or another DataModel. The Value can be a Text or a List of Text to represent mixed values, (obs. : I used TextList to represent Arrays because I do not find the correct schema datatype to represent a List of values)unit
: Structured Value composed by symbol and a descriptionmetadata
: Structured Value with same structure from the main structure, but metadata could not have a nested metadata attribute.allowedvalues
: A Structured Value, List or Text to flexibilize all posibilities ,data model reference
,normative reference
and possible values. Default. "*"from
: URL or URI to from referenced datamodel or context.attribute
: Text representing the attribute name from the reference.interval
: A list of 2 Numeric Values that represent a range of Numeric Values. e.g. [0.0,1.0].normative
: URL with normative referencemandatory
: Boolean value to represent if the attribute should aways exists on referenced datamodel (defaulf. false)mandatory-if
: A list of Structured Values withattribute
(name of attribute that rule applies),rule
(rule description) andvalue
(Value based on rule that define if is mandatory ). eg.The other option could also be used a jsonld like https://schema.org/docs/tree.jsonld, that's had a much richer and complex structure.
I believe that it is not possible to speak of a harmonized data model without be closer of the ontology concepts. But this proposal isn't intended as a universal ontology for this harmonized datasets, but to provide ways to developers implement it with more fluidity. I made a fork and I'll work on a structured json to be consumed by our Fiware Powered applications to evaluate this model applied on our concepts.