File indexing completed on 2024-04-14 03:58:28

0001 /*
0002     This file is part of the syndication library
0003     SPDX-FileCopyrightText: 2006 Frank Osterfeld <osterfeld@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #include "property.h"
0009 #include "nodevisitor.h"
0010 
0011 namespace Syndication
0012 {
0013 namespace RDF
0014 {
0015 Property::Property()
0016     : Resource()
0017 {
0018 }
0019 
0020 Property::Property(const QString &uri)
0021     : Resource(uri)
0022 {
0023 }
0024 
0025 Property::~Property()
0026 {
0027 }
0028 
0029 bool Property::isProperty() const
0030 {
0031     return true;
0032 }
0033 
0034 void Property::accept(NodeVisitor *visitor, NodePtr ptr)
0035 {
0036     PropertyPtr pptr = ptr.staticCast<Syndication::RDF::Property>();
0037 
0038     if (!visitor->visitProperty(pptr)) {
0039         Resource::accept(visitor, ptr);
0040     }
0041 }
0042 
0043 Property *Property::clone() const
0044 {
0045     return new Property(*this);
0046 }
0047 
0048 } // namespace RDF
0049 } // namespace Syndication