Page 1 of 1

Validation

PostPosted: Thu May 12, 2016 9:01 pm
by Anisorf
Dear Wandora Team,

If I do not misunderstood Wandora is not supporting schema validation and constrains (no validators and TMCL), what it will be the right approach in order to implement validation of the following example constrains:

Code: Select all
ecm isa tmcl:schema;
- "Educational Concept Map schema";
tmcl:abbreviation: "ECM"
tmcl:description: "A meta-schema for ECM, describing the allowed structure.";

ecm:educational-topic-type isa tmcl:topic-type;
has-name(tmdm:topic-name, 1, 1);

plays-role(ecm:prerequisite, ecm:is-requirement-of, 0, 1);
plays-role(ecm:subordinate, ecm:is-requirement-of, 0, 1);
plays-role(ecm:linked, ecm:is-related-to, 0, 1);
plays-role(ecm:not-linked, ecm:is-not-related-to, 0, 1);
plays-role(ecm:suggested, ecm:is-suggestd-link-of, 0, 1);
plays-role(ecm:suggester, ecm:is-suggestd-link-of, 0, 1);
overlaps(tmdm:topic).

ecm:educational-association-type isa tmcl:topic-type;
is_abstract(); overlaps(tmdm:association-type).
ecm:educational-role-type isa tmcl:role-type;
is_abstract(); overlaps(tmdm:role-type).

tmdm:supertype-subtype(tmdm:supertype : ecm:educational-association-type,
tmdm:subtype: ecm:is-requirement-of).
tmdm:supertype-subtype(tmdm:supertype : ecm:educational-association-type,
tmdm:subtype: ecm:is-related-to).
tmdm:supertype-subtype(tmdm:supertype : ecm:educational-association-type,
tmdm:subtype: ecm:is-not-related-to).
tmdm:supertype-subtype(tmdm:supertype : ecm:edcuational-association-type,
tmdm:subtype: ecm:is-suggested-link-of).
tmdm:supertype-subtype(tmdm:supertype : ecm:educational-role-type,
tmdm:subtype: ecm:prerequisite).

ecm:is-requirement-of isa ecm:educational-association-type;
has-role(ecm:prerequisite, 1, 1);
has-role(ecm:subordinate, 1, 1).
ecm:prerequisite isa tmcl:educational-role-type.
ecm:subordinate isa ecm:educational-role-type.
........


Kind Regards,
Frosina

Re: Validation

PostPosted: Fri May 13, 2016 8:43 am
by akivela
Hello Anisorf

Happy to hear from you. How is your project proceeding?

Wandora's support light weight schema that is used to aid association and occurrence creation. Supported light weight schema does not validate the topic map. Documentation of supported schema is at http://wandora.org/wiki/Schema.

What is best way to implement a validating schema in Wandora? Well, the hardest solution is to program a tool-class that validates the topic map using Wandora's topic map api. As the validation rules are written in Java code, it is difficult to change the rules. Another solution is to integrate Topic Map Lab's tmcl-validator (https://code.google.com/archive/p/tmcl-validator/) in to the Wandora and use TMCL to validate topic map contraints. I have not looked at the code of the tmcl-validator nor evaluated the work required for such integration. I suppose it is possible but may require some work as Wandora's topic map implementation differs from the TMDM standard.

Kind Regards,
Aki Kivela
Wandora Team

Re: Validation

PostPosted: Fri May 13, 2016 1:14 pm
by akivela
Just one more idea. The act of quering is very close to the act of validating. What I mean is that perhaps you can write a set of TMQL (or Wandora query language) queries that confirm the validity of the topic map.

Kind Regards,
Aki Kivela
Wandora Team