Package DE_EPAGES::Object::API::Object::SemanticStructure
logical structure presenting an xml file that contains database content.
the structure contains a lot of elements that are referenced by object path.
every xml element has a lot of semantic structure attributes e.g.
xml-file:
if changes where made please actualize:
http://ep-support.intern.epages.de:8080/wiki/index.php/Image:SemanticStructure.jpeg
http://ep-support.intern.epages.de:8080/wiki/index.php/Semantic_Structure
Functions
- addElement
- countTagAttributes
- deleteElement
- deleteTagAttribute
- existsAdditionalTagAttributes
- existsElement
- existsIDPart
- existsSemStructAttribute
- existsSubElement
- existsTagAttribute
- getChildElements
- getClass
- getElements
- getID
- getIDValue
- getSemStructAttribute
- getSemStructAttributes
- getTagAttribute
- getTagAttributes
- getXMLType
- getXMLTypeAddictedID
- isEmpty
- new
- setID
- setSemStructAttribute
- setSemStructAttributes
- setTagAttribute
- setTagAttributes
addElement
adds a new element to the semantic structure.
Syntax |
$self->addElement($ElementName,$Class,$hID, $hSemanticStructAttributes,$hTagAttributes); |
Example |
$self->addElement('/Class/Class1/Objects/Object1/Attributes/TranslationAttribute{Language->de;Name->Test}', 'TranslationAttribute', {'Language' => 'de', 'Name' => 'Test'}, {'TagName' => 'Attribute'}, {'Meta' => 'Übersetzung', 'delete' => '1' } ); |
Input |
|
countTagAttributes
return the number of tag attribute, from element
Syntax |
my $CountTagAttr = $self->countTagAttributes($ElementName); |
Input |
|
Return |
|
deleteElement
removes an element with given path from semantic structure.
Syntax |
$self->deleteElement($ElementName); |
Input |
|
deleteTagAttribute
delete the attribute of element in semantic structure
Syntax |
$self->deleteTagAttribute($ElementName, $TagAttributeName); |
Input |
|
existsAdditionalTagAttributes
return true if additionally attributes exists besides the attributes in array. return false if only the given attributes exists.
Syntax |
my $Exists = $self->existsAdditionalTagAttributes($ElementName,$aControlAttributeNames); |
Input |
|
Return |
|
existsElement
return true if the path of an element exists in the semantic structure.
Syntax |
my $ExistsElement = $self->existsElement($ElementName); |
Input |
|
existsIDPart
return true if part of id for element exists
Syntax |
my $Exists = $self->existsIDPart($ElementName,$IDName); |
Input |
|
Return |
|
existsSemStructAttribute
return true if semantic structure element exists for given element
Syntax |
my $Exists = $self->existsSemStructAttribute($ElementName, $SemStructAttributeName); |
Input |
|
Return |
|
existsSubElement
return true if one ore more sub elements of given element exists
Syntax |
my $Exists = $self->existsSubElement($ElementName); |
Input |
|
Return |
|
existsTagAttribute
return true if if the attribute of element exists
Syntax |
my $ExistsTagAttribute = $self->existsTagAttribute($ElementName, $TagAttributeName); |
Input |
|
getChildElements
return a list with the names of all child elements in the semantic structure of a given elementname.
Syntax |
my @ChildElements = @{$self->getChildElements()}; |
Return |
|
getClass
return class element exists
Syntax |
my $Value = $self->getClass($ElementName); |
Input |
|
Return |
|
getElements
return a list with the names of all elements in the semantic structure. the names are always the pathes of the elements.
Syntax |
my @Elements = @{$self->getElements()}; |
Return |
|
getID
return the identifier of given element
Syntax |
my $hID = $self->getID($ElementName); |
Input |
|
Return |
|
getIDValue
return part of id for element exists
Syntax |
my $Value = $self->getIDValue($ElementName,$IDName); |
Input |
|
Return |
|
getSemStructAttribute
get the semantic structure attribute of element like _SemStruct-Class=?
Syntax |
my $SemStructAttr = $self->getSemStructAttribute($ElementName, $SemStructAttributeName); |
Input |
|
Return |
|
getSemStructAttributes
get list of semantic structure attributes for element
Syntax |
my @SemStructAttributes = @{$self->getSemStructAttributes($ElementName)}; |
Input |
|
Return |
|
getTagAttribute
return the value of tag attribute of the element
Syntax |
my $Value = $self->getTagAttribute($ElementName, $TagAttributeName); |
Input |
|
Return |
|
getTagAttributes
return a sorted array with names of tag attributes for given array.
Syntax |
my @Attributes = @{$self->getTagAttributes($ElementName)}; |
Input |
|
Return |
|
getXMLType
returns the type of xml [epages_standard|epages_translation]
Syntax |
my $XMLType = $self->getXMLType(); |
Return |
|
getXMLTypeAddictedID
return the identifier of given element addicted by the xml type the only known difference is AttributeValue tags in translation file, they are addressed only by Name because translation xml files have a global language tag.
Syntax |
my $hID = $self->getXMLTypeAddictedID($ElementName); |
Input |
|
Return |
|
isEmpty
return true if no elements are in semantic structure ore only elements that have no effect for sub pathes like global tags like <epages>, ...
Syntax |
my $IsEmpty = $self->isEmpty(); |
Return |
|
new
constructor for semantic structure object.
Syntax |
$self->new($hSemStructHash, $XMLType); |
Input |
|
setID
set the identifier of given element
Syntax |
$self->setID($ElementName, {'ID1' => 'Value1', 'ID2' => 'Value2'}); |
Input |
|
Return |
|
setSemStructAttribute
set the semantic structure attribute of element like _SemStruct-Class='Object'
Syntax |
$self->setSemStructAttribute($ElementName, $SemStructAttributeName, $SemStructAttributeValue); |
Input |
|
setSemStructAttributes
set the semantic structure attributes for an element
Syntax |
$self->setSemStructAttributes($ElementName, $hSemStructAttributes); |
Input |
|
setTagAttribute
set the attribute value of element in semantic structure
Syntax |
$self->setTagAttribute($ElementName, $TagAttributeName, $Value); |
Input |
|
setTagAttributes
set the tag attributes for a semantic structure element. if a tag attribute already exists it will be overwrite.
Syntax |
$self->setTagAttributes($ElementName, $hTagAttributes); |
Input |
|