Examples listed in this document require SMW 2.5.
$applicationFactory = ApplicationFactory::getInstance();
$queryFactory = $applicationFactory->getQueryFactory();
$dataItemFactory = $applicationFactory->getDataItemFactory();
$dataValue = $applicationFactory->getDataValueFactory()->newDataValueByProperty(
$dataItemFactory->newDIProperty( 'Foo' ),
'Bar'
);
$requestOptions = $queryFactory->newRequestOptions();
$requestOptions->setLimit( 42 );
$subjectList = $applicationFactory->getStore()->getPropertySubjects(
$dataValue->getProperty(),
$dataValue->getDataItem(),
$requestOptions
);
$requestOptions = $queryFactory->newRequestOptions();
$requestOptions->setLimit( 42 );
$subjectList = $applicationFactory->getStore()->getAllPropertySubjects(
$dataValue->getProperty(),
$requestOptions
);
$descriptionFactory = $queryFactory->newDescriptionFactory();
$description = $descriptionFactory->newSomeProperty(
$dataValue->getProperty(),
$descriptionFactory->newThingDescription()
);
$query = $queryFactory->newQuery( $description );
$query->setLimit( 42 );
$queryResult = $applicationFactory->getStore()->getQueryResult( $query );
$descriptionFactory = $queryFactory->newDescriptionFactory();
$description = $descriptionFactory->newFromDataValue(
$dataValue
);
$query = $queryFactory->newQuery( $description );
$query->setLimit( 42 );
$queryResult = $applicationFactory->getStore()->getQueryResult( $query );