| 1 | /* |
|---|---|
| 2 | This file is part of the syndication library |
| 3 | SPDX-FileCopyrightText: 2006 Frank Osterfeld <osterfeld@kde.org> |
| 4 | |
| 5 | SPDX-License-Identifier: LGPL-2.0-or-later |
| 6 | */ |
| 7 | |
| 8 | #include "property.h" |
| 9 | #include "nodevisitor.h" |
| 10 | |
| 11 | namespace Syndication |
| 12 | { |
| 13 | namespace RDF |
| 14 | { |
| 15 | Property::Property() |
| 16 | : Resource() |
| 17 | { |
| 18 | } |
| 19 | |
| 20 | Property::Property(const QString &uri) |
| 21 | : Resource(uri) |
| 22 | { |
| 23 | } |
| 24 | |
| 25 | Property::~Property() |
| 26 | { |
| 27 | } |
| 28 | |
| 29 | bool Property::isProperty() const |
| 30 | { |
| 31 | return true; |
| 32 | } |
| 33 | |
| 34 | void Property::accept(NodeVisitor *visitor, NodePtr ptr) |
| 35 | { |
| 36 | PropertyPtr pptr = ptr.staticCast<Syndication::RDF::Property>(); |
| 37 | |
| 38 | if (!visitor->visitProperty(property: pptr)) { |
| 39 | Resource::accept(visitor, ptr); |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | Property *Property::clone() const |
| 44 | { |
| 45 | return new Property(*this); |
| 46 | } |
| 47 | |
| 48 | } // namespace RDF |
| 49 | } // namespace Syndication |
| 50 |
