Inherits SMWExpElement.
Public Member Functions | |
| __construct (SMWExpResource $subject) | |
| Constructor. | |
| getSubject () | |
| Return subject to which the stored semantic annotation refer to. | |
| addPropertyObjectValue (SMWExpNsResource $property, SMWExpElement $child) | |
| Store a value for a property identified by its title object. | |
| getProperties () | |
| Return the list of SMWExpResource objects for all properties for which some values have been given. | |
| getValues (SMWExpResource $property) | |
| Return the list of SMWExpElement values associated to some property (element). | |
| getSpecialValues ($namespaceId, $localName) | |
| Return the list of SMWExpData values associated to some property that is specifed by a standard namespace id and local name. | |
| extractMainType () | |
| This function finds the main type (class) element of the subject based on the current property assignments. | |
| 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. | |
| getTripleList (SMWExpElement $subject=null) | |
| Return an array of ternary arrays (subject predicate object) of SMWExpElements that represents the flattened version of this data. | |
Static Public Member Functions | |
| static | makeCollection (array $elements) |
| Turn an array of SMWExpElements into an RDF collection. | |
Protected Attributes | |
| $m_subject | |
| $m_children = array() | |
| $m_edges = array() | |
It is organised as a tree-shaped data structure with one root subject and zero or more children connected with labelled edges to the root. Children are again SMWExpData objects, and edges are annotated with SMWExpNsElements specifying properties.
Definition at line 22 of file SMW_Exp_Data.php.
| SMWExpData::__construct | ( | SMWExpResource $ | subject | ) |
Constructor.
$subject is the SMWExpResource for the subject about which this SMWExpData is.
Definition at line 44 of file SMW_Exp_Data.php.
References SMWExpElement::getDataItem().
| static SMWExpData::makeCollection | ( | array $ | elements | ) | [static] |
Turn an array of SMWExpElements into an RDF collection.
| $elements | array of SMWExpElement |
Definition at line 55 of file SMW_Exp_Data.php.
References SMWExporter::getSpecialNsResource().
Referenced by SMWConceptValue::descriptionToExpData().
| SMWExpData::getSubject | ( | ) |
Return subject to which the stored semantic annotation refer to.
Definition at line 75 of file SMW_Exp_Data.php.
Referenced by SMWExporter::addPropertyValues(), SMWSparqlStore::expandUpdateExpData(), getCollection(), and SMWRDFXMLSerializer::serializeNestedExpData().
| SMWExpData::addPropertyObjectValue | ( | SMWExpNsResource $ | property, | |
| SMWExpElement $ | 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 | |
| SMWExpData | $child |
Definition at line 87 of file SMW_Exp_Data.php.
References SMWExpResource::getUri().
Referenced by SMWExporter::addPropertyValues().
| SMWExpData::getProperties | ( | ) |
Return the list of SMWExpResource objects for all properties for which some values have been given.
Definition at line 101 of file SMW_Exp_Data.php.
| SMWExpData::getValues | ( | SMWExpResource $ | property | ) |
Return the list of SMWExpElement values associated to some property (element).
Definition at line 111 of file SMW_Exp_Data.php.
References SMWExpResource::getUri().
Referenced by getSpecialValues().
| SMWExpData::getSpecialValues | ( | $ | namespaceId, | |
| $ | localName | |||
| ) |
Return the list of SMWExpData values associated to some property that is specifed 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") |
Definition at line 127 of file SMW_Exp_Data.php.
References SMWExporter::getSpecialNsResource(), and getValues().
| 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.
Definition at line 144 of file SMW_Exp_Data.php.
References SMWExporter::getSpecialNsResource().
Referenced by SMWRDFXMLSerializer::serializeNestedExpData().
| 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.
Definition at line 168 of file SMW_Exp_Data.php.
References SMWExporter::getSpecialNsResource(), and getSubject().
| SMWExpData::getTripleList | ( | SMWExpElement $ | subject = null |
) |
Return an array of ternary arrays (subject predicate object) of SMWExpElements that represents the flattened version of this data.
Definition at line 219 of file SMW_Exp_Data.php.
References SMWExpElement::getDataItem().
SMWExpData::$m_subject [protected] |
Definition at line 27 of file SMW_Exp_Data.php.
SMWExpData::$m_children = array() [protected] |
Definition at line 33 of file SMW_Exp_Data.php.
SMWExpData::$m_edges = array() [protected] |
Definition at line 38 of file SMW_Exp_Data.php.
1.5.6