Omeka_Output_OmekaXml_AbstractOmekaXml
Package: Output
- class Omeka_Output_OmekaXml_AbstractOmekaXml
Abstract base class for creating omeka-xml output formats.
- constant XMLNS_XSI
XML Schema instance namespace URI.
- constant XMLNS
Omeka-XML namespace URI.
- constant XMLNS_SCHEMALOCATION
Omeka-XML XML Schema URI.
- property _record
protected array|Omeka_Record_AbstractRecord
This class’ contextual record(s).
- property _context
protected string
The context of this DOMDocument. Determines how buildNode() builds the elements. Valid contexts include: item, file.
- property _doc
protected DOMDocument
The final document object.
- property _node
protected DOMNode
The node built and set in child::_buildNode()
- _buildNode()
Abstract method. child::_buildNode() should set self::$_node.
- __construct($record, $context)
- Parameters:
$record (
Omeka_Record_AbstractRecord|array
)$context (
string
) – The context of this DOM document.
- getDoc()
Get the document object.
- Returns:
DOMDocument
- _setRootElement($rootElement)
Set an element as root.
- Parameters:
$rootElement (
DOMElement
)
- Returns:
DOMElement The root element, including required attributes.
- _createElement($name, $value = null, $id = null, $parentElement = null)
Create a DOM element.
- Parameters:
$name (
string
) – The name of the element.$value
$id
$parentElement
- Returns:
DOMElement
- _setContainerPagination(DOMElement $parentElement)
Set the pagination node for container elements
- Parameters:
$parentElement (
DOMElement
)
- _getElemetSetsByElementTexts(Omeka_Record_AbstractRecord $record, $getItemType = false)
Get all element sets, elements, and element texts associated with the provided record.
- Parameters:
$record (
Omeka_Record_AbstractRecord
) – The record from which to extract metadata.$getItemType (
bool
) – Whether to get the item type metadata.
- Returns:
stdClass A list of element sets or an item type.
- _buildElementSetContainerForRecord(Omeka_Record_AbstractRecord $record, DOMElement $parentElement)
Build an elementSetContainer element in a record (item or file) context.
- Parameters:
$record (
Omeka_Record_AbstractRecord
) – The record from which to build element sets.$parentElement (
DOMElement
) – The element set container will append to this element.
- Returns:
void|null
- _buildItemTypeForItem(Item $item, DOMElement $parentElement)
Build an itemType element in an item context.
- Parameters:
$item (
Item
) – The item from which to build the item type.$parentElement (
DOMElement
) – The item type will append to this element.
- Returns:
void|null
- _buildFileContainerForItem(Item $item, DOMElement $parentElement)
Build a fileContainer element in an item context.
- Parameters:
$item (
Item
) – The item from which to build the file container.$parentElement (
DOMElement
) – The file container will append to this element.
- Returns:
void|null
- _buildCollectionForItem(Item $item, DOMElement $parentElement)
Build a collection element in an item context.
- Parameters:
$item (
Item
) – The item from which to build the collection.$parentElement (
DOMElement
) – The collection will append to this element.
- Returns:
void|null
- _buildTagContainerForItem(Item $item, DOMElement $parentElement)
Build a tagContainer element in an item context.
- Parameters:
$item (
Item
) – The item from which to build the tag container.$parentElement (
DOMElement
) – The tag container will append to this element.
- Returns:
void|null
- _buildItemContainerForCollection(Collection $collection, DOMElement $parentElement)
Build an itemContainer element in a collection context.
- Parameters:
$collection (
Collection
) – The collection from which to build the item container.$parentElement (
DOMElement
) – The item container will append to this element.
- Returns:
void|null
- _buildTagUri()
Create a Tag URI to uniquely identify this Omeka XML instance.
- Returns:
string
- _buildUrl()
Create a absolute URI containing the current query string.
- Returns:
string