SmartyAttribute Class Reference

A Smarty resource. More...

List of all members.

Public Member Functions

 __construct ($uri, $dataset="", $rawSerialization)
 Construct.
 getURI ($params, &$smarty_obj)
 Get the identifier of the instance record.
 getResourcePropertyValues ($params, &$smarty_obj)
 Get a specific attribute of another resource. Example, the URL of a homepage resource.
 getLabel ($params, &$smarty_obj)
 Get a "label" that refers to an instance record.
 getValues ($params, &$smarty_obj)
 Get all values for a given attribute.
 getUnasigned ($params, &$smarty_obj)
 Get unasigned attributes describing a given instance records that are not defined in a template.
 getLinksTo ($params, &$smarty_obj)
 Get links-to attributes that links to a given instance record.
 getInstanceRecordLabel ($params, &$smarty_obj)
 Get a "label" that refers to an instance record.
 getInstanceRecordType ($params, &$smarty_obj)
 Get a "type" that refers to an instance record.
 getInstanceRecordDataset ($params, &$smarty_obj)
 Get a dataset URI where the record come from that refers to an instance record.
 getInstanceRecordDescription ($params, &$smarty_obj)
 Get a "description" that refers to an instance record.
 setAttribute ($attribute, $attributeLabel, $value, $valueType, $valueDataset, &$classHierarchy, $reifiedStatements, $reifiedObjectLabel, $setAttributeIgnoreResourceLabel)
 Set an attribute-value pair for this instance-record.
 setAttributeLinksTo ($attribute, $attributeLabel, $value, $valueType, $valueDataset, &$classHierarchy)
 Set an attribute-value pair that links to this instance-record.
 getAttributes ()
 Get all the attributes/value pairs describing a resource.
 getResourceRawSerialization ()
 Get Raw data (text/xml) describing the resource. This is normally used by the template to send the raw description of the resource to an external module (ex: flex application).

Private Attributes

 $attributes
 Array of attributes-value pairs used by the Smarty template at rendering time.
 $unassignedAttributes = array()
 Array of unassigned attributes that describe an instance record but that are not defined in the template.
 $attributesLinksTo = array()
 Array of attributes that links to this instance record.
 $uri
 Identifier (URI) of the instance record.
 $dataset
 URI of the dataset where this instance record is archived.
 $rawSerialization
 Raw serialization data describing the record (text/xml).

Detailed Description

A Smarty resource.

This class is used by Smarty to get information abuot a given instance record. This is what we call the "Smarty API". Each of these methods are then assigned to Smarty variables within the templates definitions.


Author:
Frederick Giasson, Structured Dynamics LLC.




Definition at line 501 of file VisualBinder.php.


Constructor & Destructor Documentation

SmartyAttribute::__construct ( uri,
dataset = "",
rawSerialization 
)

Construct.


Parameters:
[in] $uri Identifier of the instance record
[in] $dataset Dataset URI where the resource is indexed
Author:
Frederick Giasson, Structured Dynamics LLC.




Definition at line 532 of file VisualBinder.php.

References $dataset, $rawSerialization, and $uri.


Member Function Documentation

SmartyAttribute::getAttributes (  ) 

Get all the attributes/value pairs describing a resource.


Returns:
returns Returns an array of attributes/value pairs

Definition at line 1026 of file VisualBinder.php.

SmartyAttribute::getInstanceRecordDataset ( params,
&$  smarty_obj 
)

Get a dataset URI where the record come from that refers to an instance record.


Parameters:
[in] $params Smarty parameters that come from the template definition
[in] $smarty_obj reference to the smarty object being processed
Returns:
returns the literal that refers to this type
Author:
Frederick Giasson, Structured Dynamics LLC.




Definition at line 808 of file VisualBinder.php.

SmartyAttribute::getInstanceRecordDescription ( params,
&$  smarty_obj 
)

Get a "description" that refers to an instance record.


Parameters:
[in] $params Smarty parameters that come from the template definition
[in] $smarty_obj reference to the smarty object being processed
Returns:
returns the literal that refers to this description
Author:
Frederick Giasson, Structured Dynamics LLC.




Definition at line 826 of file VisualBinder.php.

References Namespaces::$bibo, Namespaces::$bio, Namespaces::$dcterms, Namespaces::$doap, Namespaces::$geoname, Namespaces::$iron, Namespaces::$skos_2004, and Namespaces::$skos_2008.

SmartyAttribute::getInstanceRecordLabel ( params,
&$  smarty_obj 
)

Get a "label" that refers to an instance record.


Parameters:
[in] $params Smarty parameters that come from the template definition
[in] $smarty_obj reference to the smarty object being processed
Returns:
returns the literal that refers to that label
Author:
Frederick Giasson, Structured Dynamics LLC.




Definition at line 733 of file VisualBinder.php.

References Namespaces::$asn, Namespaces::$dc, Namespaces::$dcterms, Namespaces::$doap, Namespaces::$foaf, Namespaces::$geoname, Namespaces::$iron, Namespaces::$rdfs, Namespaces::$skos_2004, and Namespaces::$skos_2008.

SmartyAttribute::getInstanceRecordType ( params,
&$  smarty_obj 
)

Get a "type" that refers to an instance record.


Parameters:
[in] $params Smarty parameters that come from the template definition
[in] $smarty_obj reference to the smarty object being processed
Returns:
returns the literal that refers to this type
Author:
Frederick Giasson, Structured Dynamics LLC.




Definition at line 780 of file VisualBinder.php.

SmartyAttribute::getLabel ( params,
&$  smarty_obj 
)

Get a "label" that refers to an instance record.


Parameters:
[in] $params Smarty parameters that come from the template definition
[in] $smarty_obj reference to the smarty object being processed
Returns:
returns the literal that refers to that label
Author:
Frederick Giasson, Structured Dynamics LLC.




Definition at line 599 of file VisualBinder.php.

SmartyAttribute::getLinksTo ( params,
&$  smarty_obj 
)

Get links-to attributes that links to a given instance record.


Parameters:
[in] $params Smarty parameters that come from the template definition
[in] $smarty_obj reference to the smarty object being processed
Returns:
returns a list of attributes-values pair linking to this instance record
Author:
Frederick Giasson, Structured Dynamics LLC.




Definition at line 700 of file VisualBinder.php.

SmartyAttribute::getResourcePropertyValues ( params,
&$  smarty_obj 
)

Get a specific attribute of another resource. Example, the URL of a homepage resource.


Parameters:
[in] $params Smarty parameters that come from the template definition. "property": the target property to get the value from; "resource": the URI of the target resource.
[in] $smarty_obj reference to the smarty object being processed
Returns:
returns the value of that resource.
Author:
Frederick Giasson, Structured Dynamics LLC.




Definition at line 570 of file VisualBinder.php.

References get_label_uri().

Here is the call graph for this function:

SmartyAttribute::getResourceRawSerialization (  ) 

Get Raw data (text/xml) describing the resource. This is normally used by the template to send the raw description of the resource to an external module (ex: flex application).


Returns:
returns Returns a string with the raw text/xml description data of the resource.
Author:
Frederick Giasson, Structured Dynamics LLC.




Definition at line 1042 of file VisualBinder.php.

SmartyAttribute::getUnasigned ( params,
&$  smarty_obj 
)

Get unasigned attributes describing a given instance records that are not defined in a template.


Parameters:
[in] $params Smarty parameters that come from the template definition
[in] $smarty_obj reference to the smarty object being processed
Returns:
returns a list of attributes-values pair of unsigned attributes
Author:
Frederick Giasson, Structured Dynamics LLC.




Definition at line 662 of file VisualBinder.php.

SmartyAttribute::getURI ( params,
&$  smarty_obj 
)

Get the identifier of the instance record.


Parameters:
[in] $params Unused
[in] $smarty_obj reference to the smarty object being processed
Returns:
returns the identifer of the instance record
Author:
Frederick Giasson, Structured Dynamics LLC.




Definition at line 552 of file VisualBinder.php.

SmartyAttribute::getValues ( params,
&$  smarty_obj 
)

Get all values for a given attribute.


Parameters:
[in] $params Smarty parameters that come from the template definition
[in] $smarty_obj reference to the smarty object being processed
Returns:
returns an array of values for a given attribute
Author:
Frederick Giasson, Structured Dynamics LLC.




Definition at line 625 of file VisualBinder.php.

SmartyAttribute::setAttribute ( attribute,
attributeLabel,
value,
valueType,
valueDataset,
&$  classHierarchy,
reifiedStatements,
reifiedObjectLabel,
setAttributeIgnoreResourceLabel 
)

Set an attribute-value pair for this instance-record.


Parameters:
[in] $attribute URI of the attribute
[in] $attributeLabel Label describing the attribute
[in] $value Value of the attribute
[in] $valueType Type of the value of the attribute (can be: (1) literal (2) resource)
[in] $valueDataset Dataset where the value can be indexed (if the value is another resource)
[in] $classHierarchy Class hierarchy of the system
[in] $reifiedStatements Array of reified statements for that attribute/value pair
[in] $reifiedObjectLabel Array of reified objects that are literals for that attribute/value pair
Author:
Frederick Giasson, Structured Dynamics LLC.




Todo:
Checking in the classHierarchy of the system for the label of this type

Definition at line 869 of file VisualBinder.php.

SmartyAttribute::setAttributeLinksTo ( attribute,
attributeLabel,
value,
valueType,
valueDataset,
&$  classHierarchy 
)

Set an attribute-value pair that links to this instance-record.


Parameters:
[in] $attribute URI of the attribute
[in] $attributeLabel Label describing the attribute
[in] $value Value of the attribute
[in] $valueType Type of the value of the attribute (can be: (1) literal (2) resource)
[in] $valueDataset Dataset where the value can be indexed (if the value is another resource)
[in] $classHierarchy Class hierarchy of the system
Author:
Frederick Giasson, Structured Dynamics LLC.




Definition at line 967 of file VisualBinder.php.


Member Data Documentation

SmartyAttribute::$attributes [private]

Array of attributes-value pairs used by the Smarty template at rendering time.

Definition at line 504 of file VisualBinder.php.

SmartyAttribute::$attributesLinksTo = array() [private]

Array of attributes that links to this instance record.

Definition at line 510 of file VisualBinder.php.

SmartyAttribute::$dataset [private]

URI of the dataset where this instance record is archived.

Definition at line 516 of file VisualBinder.php.

Referenced by __construct().

SmartyAttribute::$rawSerialization [private]

Raw serialization data describing the record (text/xml).

Definition at line 519 of file VisualBinder.php.

Referenced by __construct().

SmartyAttribute::$unassignedAttributes = array() [private]

Array of unassigned attributes that describe an instance record but that are not defined in the template.

Definition at line 507 of file VisualBinder.php.

SmartyAttribute::$uri [private]

Identifier (URI) of the instance record.

Definition at line 513 of file VisualBinder.php.

Referenced by __construct().


The documentation for this class was generated from the following file:
Copyright © 2009-2011. Structured Dynamics LLC Structured Dynamics LLC. All rights reserved.