filenet.vw.api
Class VWXLIFFDefinition
- java.lang.Object
-
- filenet.vw.api.VWXLIFFDefinition
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public final class VWXLIFFDefinition extends java.lang.Object implements java.io.Serializable, java.lang.CloneableUse this class to create, read, delete, or modify XLIFF definitions for different locales within a region- Since:
- CPE 5.2.1.0
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.String[]getAuthoredNames()Gets the authored names in this object.java.util.LocalegetLocale()Gets the Localejava.lang.StringgetLocaleName()Gets the locale name.java.lang.StringgetValue(java.lang.String authoredName)Gets the translated String corresponding with the authoredName key.voidrefetch()Inserts strings that have been added to the isolated region after this XLIFF definition was committed to the isolated region.voidremoveValue(java.lang.String authoredName)If the specified authoredName key is found in the list, the key and the corresponding translated String is removed from the list.voidsetValue(java.lang.String authoredName, java.lang.String translatedName)Adds or replaces the translated name in the list.java.lang.StringtoString(java.util.Locale sourceLocale)Write the contents to an XLIFF-formatted String.voidwriteToFile(java.util.Locale sourceLocale, java.lang.String filePath)Write the contents to an XLIFF file
-
-
-
Method Detail
-
getLocaleName
public java.lang.String getLocaleName() throws VWExceptionGets the locale name.- Returns:
- The locale name.
- Throws:
VWException- Thrown for various causes.- Since:
- PE 5.2.1.0
- See Also:
Locale.toString()
-
getLocale
public java.util.Locale getLocale() throws VWExceptionGets the Locale- Returns:
- The Locale
- Throws:
VWException- Since:
- CPE 5.2.1.0
- See Also:
Locale
-
refetch
public void refetch() throws VWExceptionInserts strings that have been added to the isolated region after this XLIFF definition was committed to the isolated region. Existing translated strings will be preserved.- Throws:
VWException- Thrown for various causes.- Since:
- CPE 5.2.1.0
-
getAuthoredNames
public java.lang.String[] getAuthoredNames() throws VWExceptionGets the authored names in this object.- Returns:
- A String array containing the authored names.
- Throws:
VWException- Since:
- CPE 5.2.1.0
- See Also:
VWXLIFFDefinition.getValue(String),VWXLIFFDefinition.setValue(String, String)
-
getValue
public java.lang.String getValue(java.lang.String authoredName) throws VWExceptionGets the translated String corresponding with the authoredName key.- Parameters:
authoredName- The authored name.- Returns:
- The corresponding string or
nullif the authoredName key is not in the list. - Throws:
VWException- If authoredName isnull.- Since:
- CPE 5.2.1.0
- See Also:
VWXLIFFDefinition.getAuthoredNames()
-
setValue
public void setValue(java.lang.String authoredName, java.lang.String translatedName) throws VWExceptionAdds or replaces the translated name in the list.- Parameters:
authoredName- The authored name.translatedName- The translated name.- Throws:
VWException- If authoredName or translatedName isnull.- Since:
- CPE 5.2.1.0
- See Also:
VWXLIFFDefinition.getAuthoredNames()
-
removeValue
public void removeValue(java.lang.String authoredName) throws VWExceptionIf the specified authoredName key is found in the list, the key and the corresponding translated String is removed from the list. If the specified authoredName key is not found, it is ignored.- Parameters:
authoredName- The authored name.- Throws:
VWException- If the authoredName key isnullor empty.- Since:
- CPE 5.2.1.0
- See Also:
VWXLIFFDefinition.getAuthoredNames()
-
writeToFile
public void writeToFile(java.util.Locale sourceLocale, java.lang.String filePath) throws VWExceptionWrite the contents to an XLIFF file- Parameters:
sourceLocale-filePath-- Throws:
VWException- Since:
- CPE 5.2.1.0
-
toString
public java.lang.String toString(java.util.Locale sourceLocale) throws VWExceptionWrite the contents to an XLIFF-formatted String.- Parameters:
sourceLocale-- Throws:
VWException- Since:
- CPE 5.2.1.0
-
-