Package org.opencastproject.mediapackage
Class XMLCatalogImpl.CatalogEntry
java.lang.Object
org.opencastproject.mediapackage.XMLCatalogImpl.CatalogEntry
- All Implemented Interfaces:
Serializable,Comparable<XMLCatalogImpl.CatalogEntry>,XmlElement
- Enclosing class:
XMLCatalogImpl
public final class XMLCatalogImpl.CatalogEntry
extends Object
implements XmlElement, Comparable<XMLCatalogImpl.CatalogEntry>, Serializable
Element representation.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCompare two catalog entries.booleangetAttribute(EName name) Returns the attribute value for the given attribute.Returns the element's attributes.getEName()Returns the expanded name of the entry.getQName()Returns the qualified name of the entry as a string.getValue()Returns the element value.booleanhasAttribute(EName name) Returnstrueif the element contains an attribute with the given name.booleanReturnstrueif the element contains attributes.inthashCode()toString()Returns the XML representation of this entry.
-
Constructor Details
-
CatalogEntry
Creates a new catalog element representation with name, value and attributes.- Parameters:
value- the element valueattributes- the element attributes
-
-
Method Details
-
getQName
Returns the qualified name of the entry as a string. The namespace of the entry has to be bound to a prefix for this method to succeed. -
getEName
Returns the expanded name of the entry. -
getValue
Returns the element value.- Returns:
- the value
-
hasAttributes
public boolean hasAttributes()Returnstrueif the element contains attributes.- Returns:
trueif the element contains attributes
-
getAttributes
Returns the element's attributes.- Returns:
- the attributes
-
hasAttribute
Returnstrueif the element contains an attribute with the given name.- Returns:
trueif the element contains the attribute
-
getAttribute
Returns the attribute value for the given attribute.- Returns:
- the attribute or null
-
hashCode
public int hashCode() -
equals
-
toXml
Returns the XML representation of this entry.- Specified by:
toXmlin interfaceXmlElement- Parameters:
document- the document- Returns:
- the xml node
-
compareTo
Compare two catalog entries. Comparison order: - e_name - number of attributes (less come first) - attribute comparison (e_name -> value)- Specified by:
compareToin interfaceComparable<XMLCatalogImpl.CatalogEntry>
-
toString
-