本文整理汇总了C++中StatementPtr::object方法的典型用法代码示例。如果您正苦于以下问题:C++ StatementPtr::object方法的具体用法?C++ StatementPtr::object怎么用?C++ StatementPtr::object使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StatementPtr
的用法示例。
在下文中一共展示了StatementPtr::object方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void Parser::ParserPrivate::map09to10(Model model)
{
QHash<QString, PropertyPtr> hash;
hash.insert(RSS09Vocab::self()->title()->uri(), RSSVocab::self()->title());
hash.insert(RSS09Vocab::self()->description()->uri(), RSSVocab::self()->description());
hash.insert(RSS09Vocab::self()->link()->uri(), RSSVocab::self()->link());
hash.insert(RSS09Vocab::self()->name()->uri(), RSSVocab::self()->name());
hash.insert(RSS09Vocab::self()->url()->uri(), RSSVocab::self()->url());
hash.insert(RSS09Vocab::self()->image()->uri(), RSSVocab::self()->image());
hash.insert(RSS09Vocab::self()->textinput()->uri(), RSSVocab::self()->textinput());
QStringList uris09 = RSS09Vocab::self()->properties();
// map statement predicates to RSS 1.0
QList<StatementPtr> statements = model.statements();
QList<StatementPtr>::ConstIterator it = statements.constBegin();
QList<StatementPtr>::ConstIterator end = statements.constEnd();
for ( ; it != end; ++it)
{
StatementPtr stmt = *it;
QString predUri = stmt->predicate()->uri();
if (uris09.contains(predUri))
{
model.addStatement(stmt->subject(), hash[predUri], stmt->object());
}
}
// map channel type
QList<ResourcePtr> channels = model.resourcesWithType(RSS09Vocab::self()->channel());
ResourcePtr channel;
if (!channels.isEmpty())
{
channel = *(channels.begin());
model.removeStatement(channel, RDFVocab::self()->type(), RSS09Vocab::self()->channel());
model.addStatement(channel, RDFVocab::self()->type(), RSSVocab::self()->channel());
}
}