diff options
| author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-04 19:30:56 +0100 | 
|---|---|---|
| committer | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-04 19:30:56 +0100 | 
| commit | 7d22aac0c7be52381822abdd0cb6860deaf01096 (patch) | |
| tree | 9ff9adc2d1d7115ead1867ca093deaaa69bd5e1b /test/core/model/TestDomain.hpp | |
| parent | 0daeae84055f959f7e78b2dea2eb7aef151853e5 (diff) | |
fixed a nasty bug in the getField method of DocumentEntity. Also corrected some issues in the TestDocument and TestDomain.
Diffstat (limited to 'test/core/model/TestDomain.hpp')
| -rw-r--r-- | test/core/model/TestDomain.hpp | 15 | 
1 files changed, 12 insertions, 3 deletions
| diff --git a/test/core/model/TestDomain.hpp b/test/core/model/TestDomain.hpp index d55bff7..f457531 100644 --- a/test/core/model/TestDomain.hpp +++ b/test/core/model/TestDomain.hpp @@ -81,11 +81,20 @@ static Rooted<Domain> constructBookDomain(Manager &mgr, Logger &logger)  	section_field->getChildren().push_back(paragraph);  	book_field->getChildren().push_back(paragraph);  	domain->getStructureClasses().push_back(paragraph); +	// And the field of it. +	Rooted<FieldDescriptor> paragraph_field{new FieldDescriptor(mgr, paragraph)}; +	paragraph->getFieldDescriptors().push_back(paragraph_field); +	 +	// Finally we add the "text" node, which is transparent as well. +	Rooted<StructuredClass> text{new StructuredClass( +	    mgr, "text", domain, any, {nullptr}, {nullptr}, true)}; +	paragraph_field->getChildren().push_back(text); +	domain->getStructureClasses().push_back(text);  	// ... and has a primitive field. -	Rooted<FieldDescriptor> paragraph_field{new FieldDescriptor( -	    mgr, paragraph, domain->getTypesystems()[0]->getTypes()[1], "text", +	Rooted<FieldDescriptor> text_field{new FieldDescriptor( +	    mgr, text, domain->getTypesystems()[0]->getTypes()[0], "content",  	    false)}; -	paragraph->getFieldDescriptors().push_back(paragraph_field); +	text->getFieldDescriptors().push_back(text_field);  	return domain;  } | 
