diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-03-04 14:48:23 +0100 |
---|---|---|
committer | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-03-04 14:48:23 +0100 |
commit | 105c6082983a0c9dc4f1379fbcee3bcacc830472 (patch) | |
tree | 889ec1ad1b8a3e043108a63b4b2e8d12046ff66d /test/core/model/TestAdvanced.hpp | |
parent | c6fc25cf500d3f7d4bb855c4225f386736f2ebf9 (diff) |
massively reworked demo html output.
Diffstat (limited to 'test/core/model/TestAdvanced.hpp')
-rw-r--r-- | test/core/model/TestAdvanced.hpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/test/core/model/TestAdvanced.hpp b/test/core/model/TestAdvanced.hpp index c92effa..58eb965 100644 --- a/test/core/model/TestAdvanced.hpp +++ b/test/core/model/TestAdvanced.hpp @@ -45,9 +45,9 @@ static Rooted<StructuredClass> resolveDescriptor(Handle<Ontology> ontology, * This constructs the "heading" ontology given the book ontology. */ static Rooted<Ontology> constructHeadingOntology(Manager &mgr, - Handle<SystemTypesystem> sys, - Handle<Ontology> bookOntology, - Logger &logger) + Handle<SystemTypesystem> sys, + Handle<Ontology> bookOntology, + Logger &logger) { // set up ontology node. Rooted<Ontology> ontology{new Ontology(mgr, sys, "headings")}; @@ -78,9 +78,9 @@ static Rooted<Ontology> constructHeadingOntology(Manager &mgr, * This constructs the "list" ontology given the book ontology. */ static Rooted<Ontology> constructListOntology(Manager &mgr, - Handle<SystemTypesystem> sys, - Handle<Ontology> bookOntology, - Logger &logger) + Handle<SystemTypesystem> sys, + Handle<Ontology> bookOntology, + Logger &logger) { // set up ontology node. Rooted<Ontology> ontology{new Ontology(mgr, sys, "list")}; @@ -97,7 +97,8 @@ static Rooted<Ontology> constructListOntology(Manager &mgr, for (auto &listType : listTypes) { Rooted<StructuredClass> list{new StructuredClass( mgr, listType, ontology, Cardinality::any(), p, false)}; - Rooted<FieldDescriptor> list_field{new FieldDescriptor(mgr, list)}; + Rooted<FieldDescriptor> list_field = + list->createFieldDescriptor(logger).first; list_field->addChild(item); } return ontology; @@ -107,15 +108,17 @@ static Rooted<Ontology> constructListOntology(Manager &mgr, * This constructs the "emphasis" ontology. */ static Rooted<Ontology> constructEmphasisOntology(Manager &mgr, - Handle<SystemTypesystem> sys, - Logger &logger) + Handle<SystemTypesystem> sys, + Logger &logger) { // set up ontology node. Rooted<Ontology> ontology{new Ontology(mgr, sys, "emphasis")}; // create AnnotationClasses - Rooted<AnnotationClass> em{new AnnotationClass(mgr, "emphasized", ontology)}; + Rooted<AnnotationClass> em{ + new AnnotationClass(mgr, "emphasized", ontology)}; - Rooted<AnnotationClass> strong{new AnnotationClass(mgr, "strong", ontology)}; + Rooted<AnnotationClass> strong{ + new AnnotationClass(mgr, "strong", ontology)}; return ontology; } |