Semantic MediaWiki and related extensions
|
Public Member Functions | |
__construct (SMWExpResource $subject) | |
getDataItem () | |
getHash () | |
getSubject () | |
addPropertyObjectValue (SMWExpNsResource $property, Element $child) | |
getProperties () | |
getValues (SMWExpResource $property) | |
getSpecialValues ( $namespaceId, $localName) | |
extractMainType () | |
getCollection () | |
getTripleList (Element $subject=null) | |
Static Public Member Functions | |
static | makeCollection (array $elements) |
Protected Attributes | |
$m_subject | |
$m_children = [] | |
$m_edges = [] | |
Additional Inherited Members | |
Public Attributes inherited from SMW\Exporter\Element | |
const | TYPE_RESOURCE = 0 |
const | TYPE_NSRESOURCE = 1 |
const | TYPE_LITERAL = 2 |
SMWExpData is a class representing semantic data that is ready for easy serialisation in OWL or RDF.
SMWExpData::__construct | ( | SMWExpResource | $subject | ) |
Constructor. $subject is the SMWExpResource for the subject about which this SMWExpData is.
SMWExpData::addPropertyObjectValue | ( | SMWExpNsResource | $property, |
Element | $child | ||
) |
Store a value for a property identified by its title object. No duplicate elimination as this is usually done in SMWSemanticData already (which is typically used to generate this object).
SMWExpNsResource | $property | |
Element | $child |
SMWExpData::extractMainType | ( | ) |
This function finds the main type (class) element of the subject based on the current property assignments. It returns this type element (SMWExpElement) and removes the according type assignement from the data. If no type is assigned, the element for rdf:Resource is returned.
SMWExpData::getCollection | ( | ) |
Check if this element encodes an RDF list, and if yes return an array of SMWExpElements corresponding to the collection elements in the specified order. Otherwise return false. The method only returns lists that can be encoded using parseType="Collection" in RDF/XML, i.e. only lists of non-literal resources.
SMWExpData::getDataItem | ( | ) |
SMWExpData::getHash | ( | ) |
SMWExpData::getProperties | ( | ) |
Return the list of SMWExpResource objects for all properties for which some values have been given.
SMWExpData::getSpecialValues | ( | $namespaceId, | |
$localName | |||
) |
Return the list of SMWExpData values associated to some property that is specified by a standard namespace id and local name.
$namespaceId | string idetifying a known special namespace (e.g. "rdf") |
$localName | string of local name (e.g. "type") |
SMWExpData::getSubject | ( | ) |
Return subject to which the stored semantic annotation refer to.
SMWExpData::getTripleList | ( | Element | $subject = null | ) |
Return an array of ternary arrays (subject predicate object) of SMWExpElements that represents the flattened version of this data.
SMWExpData::getValues | ( | SMWExpResource | $property | ) |
Return the list of SMWExpElement values associated to some property (element).
|
static |
Turn an array of SMWExpElements into an RDF collection.
$elements | array of SMWExpElement |