Hi Jie,
in my extension I have a function readproperties. Maybe this can help?
Anja
public function readProperties( $namespace, $pagename ) {
if($pagename == '') {
return 'No configpage available';
}
else {
$page = SMWDataValueFactory::newTypeIDValue( '_wpg',
$namespace . ':' . $pagename );
$data =
smwfGetStore()->getSemanticData($page->getTitle());
$properties = $data->getProperties();
$proparray = array();
foreach ($properties as $property) {
$propname = array();
$propname = explode(':',
$property->getlongHTMLText());
$propnametext = $propname[1];
$propvalue = array();
$propvalue =
$data->getPropertyValues($property);
$propvaluetext =
$propvalue[0]->getLongHTMLText();
$proparray[$propnametext] = $propvaluetext;
}
}
return $proparray;
}
>-----Ursprüngliche Nachricht-----
>Von: Jie Bao [mailto:[email protected]]
>Gesendet: Mittwoch, 8. Juli 2009 04:33
>An: semediawiki-devel; Semantic MediaWiki users
>Betreff: [SMW-devel] Anybody knows how to get all triples of a
>page in aprogram?
>
>I need to get all triples about a page in a php program. Anybody knows
>how? Thanks
>
>jie
>
>--
>Jie Bao
>http://www.cs.rpi.edu/~baojie
>
>---------------------------------------------------------------
>---------------
>Enter the BlackBerry Developer Challenge
>This is your chance to win up to $100,000 in prizes! For a
>limited time,
>vendors submitting new applications to BlackBerry App
>World(TM) will have
>the opportunity to enter the BlackBerry Developer Challenge.
>See full prize
>details at: http://p.sf.net/sfu/Challenge
>_______________________________________________
>Semediawiki-devel mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Semediawiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel