public function addNode(Node $node)
    {
        foreach ($this->nodes as $n) {
            if ($n->getIdentifier() === $node->getIdentifier()) {
                throw new SchemaDefinitionException(sprintf('The node with Identifier "%s" has already been declared', $node->getIdentifier()));
            }
        }

        return $this->nodes->add($node);
    }