From 105c6082983a0c9dc4f1379fbcee3bcacc830472 Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Wed, 4 Mar 2015 14:48:23 +0100 Subject: massively reworked demo html output. --- test/core/model/TestAdvanced.hpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'test/core/model/TestAdvanced.hpp') 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 resolveDescriptor(Handle ontology, * This constructs the "heading" ontology given the book ontology. */ static Rooted constructHeadingOntology(Manager &mgr, - Handle sys, - Handle bookOntology, - Logger &logger) + Handle sys, + Handle bookOntology, + Logger &logger) { // set up ontology node. Rooted ontology{new Ontology(mgr, sys, "headings")}; @@ -78,9 +78,9 @@ static Rooted constructHeadingOntology(Manager &mgr, * This constructs the "list" ontology given the book ontology. */ static Rooted constructListOntology(Manager &mgr, - Handle sys, - Handle bookOntology, - Logger &logger) + Handle sys, + Handle bookOntology, + Logger &logger) { // set up ontology node. Rooted ontology{new Ontology(mgr, sys, "list")}; @@ -97,7 +97,8 @@ static Rooted constructListOntology(Manager &mgr, for (auto &listType : listTypes) { Rooted list{new StructuredClass( mgr, listType, ontology, Cardinality::any(), p, false)}; - Rooted list_field{new FieldDescriptor(mgr, list)}; + Rooted list_field = + list->createFieldDescriptor(logger).first; list_field->addChild(item); } return ontology; @@ -107,15 +108,17 @@ static Rooted constructListOntology(Manager &mgr, * This constructs the "emphasis" ontology. */ static Rooted constructEmphasisOntology(Manager &mgr, - Handle sys, - Logger &logger) + Handle sys, + Logger &logger) { // set up ontology node. Rooted ontology{new Ontology(mgr, sys, "emphasis")}; // create AnnotationClasses - Rooted em{new AnnotationClass(mgr, "emphasized", ontology)}; + Rooted em{ + new AnnotationClass(mgr, "emphasized", ontology)}; - Rooted strong{new AnnotationClass(mgr, "strong", ontology)}; + Rooted strong{ + new AnnotationClass(mgr, "strong", ontology)}; return ontology; } -- cgit v1.2.3