Class FileMetadataElement
- java.lang.Object
-
- org.jivesoftware.smackx.file_metadata.element.FileMetadataElement
-
- All Implemented Interfaces:
Element
,ExtensionElement
,NamedElement
,XmlElement
,XmlLangElement
public final class FileMetadataElement extends Object implements ExtensionElement
File metadata element as defined in XEP-0446: File Metadata Element. This element is used in a generic way to provide information about files, e.g. during file sharing.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FileMetadataElement.Builder
-
Field Summary
Fields Modifier and Type Field Description static String
ELEM_DATE
static String
ELEM_DESC
static String
ELEM_HEIGHT
static String
ELEM_LENGTH
static String
ELEM_MEDIA_TYPE
static String
ELEM_NAME
static String
ELEM_SIZE
static String
ELEM_WIDTH
static String
ELEMENT
static String
NAMESPACE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FileMetadataElement.Builder
builder()
boolean
equals(Object other)
Date
getDate()
String
getDescription()
String
getDescription(String lang)
Map<String,String>
getDescriptions()
String
getElementName()
Returns the root element name.HashElement
getHashElement(HashManager.ALGORITHM algorithm)
Map<HashManager.ALGORITHM,HashElement>
getHashElements()
Integer
getHeight()
Long
getLength()
String
getMediaType()
String
getName()
Return the name of the file.String
getNamespace()
Returns the root element XML namespace.String
getRawName()
Long
getSize()
List<ThumbnailElement>
getThumbnails()
Integer
getWidth()
int
hashCode()
XmlStringBuilder
toXML(XmlEnvironment xmlEnvironment)
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smack.packet.XmlElement
getLanguage, getQName
-
-
-
-
Field Detail
-
ELEMENT
public static final String ELEMENT
- See Also:
- Constant Field Values
-
NAMESPACE
public static final String NAMESPACE
- See Also:
- Constant Field Values
-
ELEM_DATE
public static final String ELEM_DATE
- See Also:
- Constant Field Values
-
ELEM_HEIGHT
public static final String ELEM_HEIGHT
- See Also:
- Constant Field Values
-
ELEM_WIDTH
public static final String ELEM_WIDTH
- See Also:
- Constant Field Values
-
ELEM_DESC
public static final String ELEM_DESC
- See Also:
- Constant Field Values
-
ELEM_LENGTH
public static final String ELEM_LENGTH
- See Also:
- Constant Field Values
-
ELEM_MEDIA_TYPE
public static final String ELEM_MEDIA_TYPE
- See Also:
- Constant Field Values
-
ELEM_NAME
public static final String ELEM_NAME
- See Also:
- Constant Field Values
-
ELEM_SIZE
public static final String ELEM_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
toXML
public XmlStringBuilder toXML(XmlEnvironment xmlEnvironment)
-
getNamespace
public String getNamespace()
Description copied from interface:XmlElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceXmlElement
- Returns:
- the namespace.
-
getElementName
public String getElementName()
Description copied from interface:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
getDescriptions
public Map<String,String> getDescriptions()
-
getDescription
public String getDescription()
-
getDescription
public String getDescription(String lang)
-
getHashElements
public Map<HashManager.ALGORITHM,HashElement> getHashElements()
-
getHashElement
public HashElement getHashElement(HashManager.ALGORITHM algorithm)
-
getMediaType
public String getMediaType()
-
getRawName
public String getRawName()
-
getThumbnails
public List<ThumbnailElement> getThumbnails()
-
builder
public static FileMetadataElement.Builder builder()
-
-