public class XMPLanguageAlternative
extends java.lang.Object
| Modifier and Type | Method and Description | 
|---|---|
void | 
clear()
Delete all elements 
 | 
XMPArray | 
getArray()
Gets underlying  
XMPArray | 
java.util.List<java.lang.String> | 
getAvailableLanguages()  | 
XMPSimple | 
getDefaultText()
Returns the default language from an alternative array. 
 | 
XMPSimple | 
getLocalizedText(java.lang.String language)
Returns the language alternative array item for a specific language
 If language is x-default the first entry of the array is returned, even
 if someone accidently added an "x-default" entry
 at another position than the first one (not possible while using this class) 
 | 
boolean | 
isEmpty()
Checks if the Language Alternative is empty 
 | 
java.util.Iterator<XMPNode> | 
iterator()  | 
static XMPLanguageAlternative | 
newInstance(XMPArray array)
Constructs a  
XMPLanguageAlternative which wraps the given XMPArray. | 
void | 
normalize()
This will normalize the alternative array to meet the criteria of a XMPLanguage alternative. 
 | 
XMPSimple | 
removeDefaultText()
removes the default entry (the first one) and the second one will be default 
 | 
XMPSimple | 
removeLocalizedText(java.lang.String language)
Removes the specified language item from an alternative array 
 | 
XMPSimple | 
setDefaultLanguage(java.lang.String language)
Sets the entry with a certain language as the default entry (pushes it to the first location) 
 | 
XMPSimple | 
setDefaultText(java.lang.String value)
Sets the default text entry (first one in array) in an language alternative array. 
 | 
XMPSimple | 
setDefaultText(java.lang.String language,
              java.lang.String value)
Set or overwrites the default localized text entry for this language alternative. 
 | 
XMPSimple | 
setLocalizedText(java.lang.String language,
                java.lang.String value)
Set or overwrites a localized text entry for this language alternative. 
 | 
int | 
size()
returns the number of elements 
 | 
public static XMPLanguageAlternative newInstance(XMPArray array)
XMPLanguageAlternative which wraps the given XMPArray. If 
 this XMPArray does not represent a Lang Alt as per XMP Specification this
 method returns null.
 To detect whether a language alternative, these prerequisites 
 must be fulfilled:
 array - public void normalize()
public boolean isEmpty()
public int size()
public void clear()
public XMPSimple setLocalizedText(java.lang.String language, java.lang.String value)
language - the language String, has to follow the RFC 3066 formatvalue - the value for this language alternative entryjava.lang.IllegalArgumentException - IllegalArgumentException is thrown if value is nullpublic XMPSimple setDefaultText(java.lang.String language, java.lang.String value)
language - the language of the default entry (or null or x-default. if no specific language is given)value - the value for this language alternative entrypublic XMPSimple setDefaultText(java.lang.String value)
value - the value for this language alternative entrypublic XMPSimple setDefaultLanguage(java.lang.String language)
language - the language to set as defaultpublic XMPSimple getLocalizedText(java.lang.String language)
language - the language for the desired array itempublic XMPSimple getDefaultText()
public java.util.List<java.lang.String> getAvailableLanguages()
public XMPSimple removeLocalizedText(java.lang.String language)
language - the language that shall be removedpublic XMPSimple removeDefaultText()
public java.util.Iterator<XMPNode> iterator()
Copyright © 2010 - 2023 Adobe. All Rights Reserved