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.SearchType
ResourceBundleWrapper.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) |
protected oracle.mds.core.MetadataObject |
getMetadataObject(oracle.mds.core.MDSSession mdsSession,
java.lang.String fileName,
oracle.mds.cust.CustClassList custClassList,
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 |
saxParse(java.net.URL url)
Deprecated.
|
void |
seParse(org.w3c.dom.Document document) |
void |
seParse(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 |
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, addEntry, addResourceBundleListener, deleteEntry, 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, isCacheable, isEmptyReadOnlyWrapper, isIsSEWrapper, refreshBundleIfNeeded, removeResourceBundleListener, setBundleId, setEmptyReadOnlyWrapper, setIsSEWrapper, setKeyGenerator, setParentList, setURL, toString, updateEntry, updateEntryExport, updateEntryImport
public 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 oracle.mds.core.MetadataObject getMetadataObject(oracle.mds.core.MDSSession mdsSession, java.lang.String fileName, oracle.mds.cust.CustClassList custClassList, 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
ResourceBundleWrapper
addEntry
in interface ResourceBundleWrapper
addEntry
in class ResourceBundleWrapperRT
key
- 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 null
true
on successjava.lang.UnsupportedOperationException
public ResourceBundleOperationResult addEntryNoDialog(java.lang.String key, java.lang.String text, java.util.Map<java.lang.String,java.lang.String> metadata)
ResourceBundleWrapper
addEntryNoDialog
in interface ResourceBundleWrapper
addEntryNoDialog
in class ResourceBundleWrapperRT
key
- 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 null
public java.lang.String getString(java.lang.String key)
ResourceBundleWrapper
key
getString
in interface ResourceBundleWrapper
getString
in class ResourceBundleWrapperRT
key
- 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)
ResourceBundleWrapper
updateEntry
in interface ResourceBundleWrapper
updateEntry
in class ResourceBundleWrapperRT
key
- 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)
ResourceBundleWrapper
updateEntryNoDialog
in interface ResourceBundleWrapper
updateEntryNoDialog
in class ResourceBundleWrapperRT
key
- 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 ResourceBundleWrapperRT
public 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 ResourceBundleWrapperRT
key
- 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 ResourceBundleWrapperRT
key
- Key to be updatedtext
- String to be updatedmetadata
- Note to be updatedmetadataObject
- MO where the update will gopublic boolean deleteEntry(java.lang.String key)
ResourceBundleWrapper
key
. If
key
does not exist, then a value of false
is returned.deleteEntry
in interface ResourceBundleWrapper
deleteEntry
in class ResourceBundleWrapperRT
key
- The key to deletetrue
If the key is found and deleted success.public java.util.Set<java.lang.String> keySet()
ResourceBundleWrapper
Iterator
will throw an UnsupportedOperationException
.public java.util.Map<java.lang.String,java.lang.String> getMetadata(java.lang.String key)
ResourceBundleWrapper
key
key
- The key in the resource bundlepublic java.util.Map<java.lang.String,java.lang.String> getKeyValueMap()
ResourceBundleWrapperRT
getKeyValueMap
in class ResourceBundleWrapperRT
public 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 ResourceBundleWrapperRT
public void saxParse(java.net.URL url)
public 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)
public void seParse(org.w3c.dom.Document document)
public void seParse(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)