public class XliffResourceBundleWrapper extends ResourceBundleWrapperRT
XliffResourceBundleWrapper provides a run-time
implementation of a ResourceBundleWrapper
for .xlf files.
The .xlf file is expected to use the "id" attribute in the "trans-unit"
node to store the "key" value.| Modifier and Type | Class and Description |
|---|---|
protected static class |
XliffResourceBundleWrapper.ResourceBundleAuditEvents |
ResourceBundleWrapperRT.DefaultSearchContext, ResourceBundleWrapperRT.SearchTypeResourceBundleWrapper.KeyInfo| Modifier and Type | Field and Description |
|---|---|
protected boolean |
_writable |
_parent| Constructor and Description |
|---|
XliffResourceBundleWrapper() |
XliffResourceBundleWrapper(oracle.mds.core.MOKey mokey,
java.util.Locale locale)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addEntry(java.lang.String key,
java.lang.String text,
java.util.Map<java.lang.String,java.lang.String> metadata)
Adds a new entry (key, value, and optional metadata) into the
resource bundle.
|
ResourceBundleOperationResult |
addEntryNoDialog(java.lang.String key,
java.lang.String text,
java.util.Map<java.lang.String,java.lang.String> metadata)
Adds a new entry (key, value, and optional metadata) into the
resource bundle.
|
protected void |
addMetadata(org.w3c.dom.Element element,
java.util.Map<java.lang.String,java.lang.String> metadata) |
protected oracle.mds.core.MOReference |
createMOReference(java.lang.String appOverrideFile) |
boolean |
deleteEntry(java.lang.String key)
Deletes the resource bundle entry identified by
key. |
protected java.util.Map<java.lang.String,ResourceBundleWrapper.KeyInfo> |
getBaseKeyMap() |
protected java.util.Map<java.lang.String,java.lang.String> |
getBaseKeyValueMap() |
protected java.lang.String |
getBundleIdentifier() |
protected org.w3c.dom.Document |
getDocument() |
java.util.Map<java.lang.String,java.lang.String> |
getKeyValueMap()
Gets the map of key-values for this bundle.
|
java.util.Map<java.lang.String,java.lang.String> |
getMetadata(java.lang.String key)
Gets the translated text (value) identified by
key |
protected oracle.mds.core.MetadataObject |
getMetadataObject(oracle.mds.core.MDSSession mdsSession,
java.lang.String fileName) |
protected oracle.mds.core.MetadataObject |
getMetadataObject(oracle.mds.core.MDSSession mdsSession,
java.lang.String fileName,
boolean writable) |
oracle.mds.core.MOKey |
getMOKey() |
protected oracle.mds.core.MetadataObject |
getMutableMO(oracle.mds.core.MDSSession mdsSession,
oracle.mds.core.MOReference moRef,
java.lang.String custLayerName,
java.lang.String custLayerValue) |
java.lang.String |
getString(java.lang.String key)
Gets the translated text (value) identified by
key |
java.util.Set<java.lang.String> |
keySet()
Returns a set view of the keys contained in this resource bundle.
|
void |
parse(org.w3c.dom.Document document) |
void |
parse(org.w3c.dom.Document document,
java.util.Map<java.lang.String,ResourceBundleWrapper.KeyInfo> keyMap,
java.util.Map<java.lang.String,java.lang.String> keyValueMap) |
void |
parse(java.net.URL url) |
void |
setDocument(org.w3c.dom.Document document)
This should only be used when dealing with an override bundle and
via the AppBundleInfoRT class
|
void |
setParent(ResourceBundleWrapperRT parentBundle) |
void |
setWritable(boolean writable) |
void |
updateDocument(org.w3c.dom.Document document) |
boolean |
updateEntry(java.lang.String key,
java.lang.String text,
java.util.Map<java.lang.String,java.lang.String> metadata)
Updates the specified key to have the specified text and metadata.
|
boolean |
updateEntry(java.lang.String key,
java.lang.String text,
java.util.Map<java.lang.String,java.lang.String> note,
CustomizationHint hint)
Only for string editor use.
|
protected boolean |
updateEntry(java.lang.String key,
java.lang.String text,
java.util.Map<java.lang.String,java.lang.String> metadata,
oracle.mds.core.MetadataObject metadataObject)
Only for string editor use.
|
ResourceBundleOperationResult |
updateEntryNoDialog(java.lang.String key,
java.lang.String text,
java.util.Map<java.lang.String,java.lang.String> metadata)
Updates the specified key to have the specified text and metadata while not
showing any dialog
|
ResourceBundleOperationResult |
updateEntryNoDialog(java.lang.String key,
java.lang.String text,
java.util.Map<java.lang.String,java.lang.String> metadata,
CustomizationHint hint) |
addEntry, addResourceBundleListener, findKeys, findKeys, findKeysByMetaData, findKeysByMetaData, findKeysByText, findKeysByText, findKeysLikeKey, findKeysLikeKey, findKeysLikeMetaData, findKeysLikeText, findKeysLikeText, getBaseBundleKeyValueMap, getBundleId, getChainedKeyValueMap, getChainedKeyValueMapNoOverride, getChainedKeyValueNoteMap, getExportChainedKeyValueNoteMap, getKeyGenerator, getKeyMapForExport, getKeyMapForFABundleExport, getKeyValueNoteMap, getKeyValueNoteMap, getKeyValueNoteMapFromFABundle, getKeyValueNoteMapFromFABundleChain, getMetadataFromParentChain, getMetadataObject, getMOReference, getMostSpecificWrapperMoName, getParent, getParentChain, getParentList, getSEChainedKeyValueMap, isEmptyReadOnlyWrapper, refreshBundleIfNeeded, removeResourceBundleListener, setBundleId, setEmptyReadOnlyWrapper, setKeyGenerator, setParentList, setURL, toString, updateEntryExport, updateEntryImportpublic XliffResourceBundleWrapper()
@Deprecated
public XliffResourceBundleWrapper(oracle.mds.core.MOKey mokey,
java.util.Locale locale)
public oracle.mds.core.MOKey getMOKey()
protected java.lang.String getBundleIdentifier()
protected oracle.mds.core.MOReference createMOReference(java.lang.String appOverrideFile)
protected oracle.mds.core.MetadataObject getMetadataObject(oracle.mds.core.MDSSession mdsSession,
java.lang.String fileName)
protected oracle.mds.core.MetadataObject getMetadataObject(oracle.mds.core.MDSSession mdsSession,
java.lang.String fileName,
boolean writable)
protected java.util.Map<java.lang.String,ResourceBundleWrapper.KeyInfo> getBaseKeyMap()
protected java.util.Map<java.lang.String,java.lang.String> getBaseKeyValueMap()
public boolean addEntry(java.lang.String key,
java.lang.String text,
java.util.Map<java.lang.String,java.lang.String> metadata)
throws java.lang.UnsupportedOperationException
ResourceBundleWrapperaddEntry in interface ResourceBundleWrapperaddEntry in class ResourceBundleWrapperRTkey - The key name to use in the resource bundle.text - The text to be translated.metadata - Any associated metadata about the translation string
This parameter may be nulltrue on successjava.lang.UnsupportedOperationExceptionpublic ResourceBundleOperationResult addEntryNoDialog(java.lang.String key, java.lang.String text, java.util.Map<java.lang.String,java.lang.String> metadata)
ResourceBundleWrapperaddEntryNoDialog in interface ResourceBundleWrapperaddEntryNoDialog in class ResourceBundleWrapperRTkey - The key name to use in the resource bundle.text - The text to be translated.metadata - Any associated metadata about the translation string
This parameter may be nullpublic java.lang.String getString(java.lang.String key)
ResourceBundleWrapperkeygetString in interface ResourceBundleWrappergetString in class ResourceBundleWrapperRTkey - The key in the resource bundlepublic void setParent(ResourceBundleWrapperRT parentBundle)
public boolean updateEntry(java.lang.String key,
java.lang.String text,
java.util.Map<java.lang.String,java.lang.String> metadata)
ResourceBundleWrapperupdateEntry in interface ResourceBundleWrapperupdateEntry in class ResourceBundleWrapperRTkey - The key to updatetext - The new text for the given keymetadata - Any metadata to change. Existing metadata is merged with
the new metadata, unless there is a key with a null value, then the
existing metadata for that key is removed. If metadata is
null then the existing metadata will be unchanged.true on successpublic ResourceBundleOperationResult updateEntryNoDialog(java.lang.String key, java.lang.String text, java.util.Map<java.lang.String,java.lang.String> metadata)
ResourceBundleWrapperupdateEntryNoDialog in interface ResourceBundleWrapperupdateEntryNoDialog in class ResourceBundleWrapperRTkey - The key to updatetext - The new text for the given keymetadata - Any metadata to change. Existing metadata is merged with
the new metadata, unless there is a key with a null value, then the
existing metadata for that key is removed. If metadata is
null then the existing metadata will be unchanged.public ResourceBundleOperationResult updateEntryNoDialog(java.lang.String key, java.lang.String text, java.util.Map<java.lang.String,java.lang.String> metadata, CustomizationHint hint)
updateEntryNoDialog in class ResourceBundleWrapperRTpublic boolean updateEntry(java.lang.String key,
java.lang.String text,
java.util.Map<java.lang.String,java.lang.String> note,
CustomizationHint hint)
updateEntry in class ResourceBundleWrapperRTkey - Key to be updatedtext - String to be updatednote - Note to be updatedhint - CustomizationHint object keeping track of the CC layer where the update should go.protected boolean updateEntry(java.lang.String key,
java.lang.String text,
java.util.Map<java.lang.String,java.lang.String> metadata,
oracle.mds.core.MetadataObject metadataObject)
updateEntry in class ResourceBundleWrapperRTkey - Key to be updatedtext - String to be updatedmetadata - Note to be updatedmetadataObject - MO where the update will gopublic boolean deleteEntry(java.lang.String key)
ResourceBundleWrapperkey. If
key does not exist, then a value of false is returned.deleteEntry in interface ResourceBundleWrapperdeleteEntry in class ResourceBundleWrapperRTkey - The key to deletetrue If the key is found and deleted success.public java.util.Set<java.lang.String> keySet()
ResourceBundleWrapperIterator
will throw an UnsupportedOperationException.public java.util.Map<java.lang.String,java.lang.String> getMetadata(java.lang.String key)
ResourceBundleWrapperkeykey - The key in the resource bundlepublic java.util.Map<java.lang.String,java.lang.String> getKeyValueMap()
ResourceBundleWrapperRTgetKeyValueMap in class ResourceBundleWrapperRTpublic void setWritable(boolean writable)
protected oracle.mds.core.MetadataObject getMutableMO(oracle.mds.core.MDSSession mdsSession,
oracle.mds.core.MOReference moRef,
java.lang.String custLayerName,
java.lang.String custLayerValue)
public void parse(java.net.URL url)
parse in class ResourceBundleWrapperRTpublic void setDocument(org.w3c.dom.Document document)
protected org.w3c.dom.Document getDocument()
public void parse(org.w3c.dom.Document document)
public void parse(org.w3c.dom.Document document,
java.util.Map<java.lang.String,ResourceBundleWrapper.KeyInfo> keyMap,
java.util.Map<java.lang.String,java.lang.String> keyValueMap)
protected void addMetadata(org.w3c.dom.Element element,
java.util.Map<java.lang.String,java.lang.String> metadata)
public void updateDocument(org.w3c.dom.Document document)