diff options
| author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-18 13:48:45 +0100 |
|---|---|---|
| committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-18 13:48:45 +0100 |
| commit | 372c67e0844654362fc7d440b0b4a31500a6d02a (patch) | |
| tree | d677aa19bdc77486be02171de77e5675ce5f0f80 /src/core/model/Document.hpp | |
| parent | db51a874964b038c69f1336a8a659ae40471e26b (diff) | |
| parent | 3e63d6539b9738018a4aca68d07a119e4402e9aa (diff) | |
Merge branch 'master' of somweyr.de:ousia
Conflicts:
application/src/core/model/Domain.hpp
Diffstat (limited to 'src/core/model/Document.hpp')
| -rw-r--r-- | src/core/model/Document.hpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/core/model/Document.hpp b/src/core/model/Document.hpp index cb7f394..9410d17 100644 --- a/src/core/model/Document.hpp +++ b/src/core/model/Document.hpp @@ -161,7 +161,7 @@ protected: fields[getFieldDescriptorIndex(fieldName, true)].push_back(s); } - bool validate(Logger &logger) const; + bool doValidate(Logger &logger) const; public: /** @@ -512,6 +512,7 @@ class AnnotationEntity : public Node, public DocumentEntity { private: Owned<Anchor> start; Owned<Anchor> end; + protected: bool doValidate(Logger &logger) const override; @@ -569,6 +570,9 @@ private: void doResolve(ResolutionState &state) override; +protected: + bool doValidate(Logger &logger) const override; + public: Document(Manager &mgr, std::string name) // TODO: Can a document have a parent? @@ -622,6 +626,17 @@ public: { domains.insert(domains.end(), d.begin(), d.end()); } + + /** + * Returns true if and only if the given StructureNode is part of this + * document, meaning that there is a path of parent references in the + * Structure Tree leading from the given StructureNode to this Document. + * + * @param s is some StructureNode. + * @return true if and only if the given StructureNode is part of this + * document. + */ + bool hasChild(Handle<StructureNode> s) const; }; } |
