Package org.bedework.calfacade
Class BwString
java.lang.Object
- All Implemented Interfaces:
Serializable,Comparable<BwString>,SizedEntity,org.bedework.util.logging.Logged
A String value in bedework. This class is for strings that are not very long
usually a max of 2-3k. This is mostly because db systems tend to handle long
strings in a different manner. (clobs, no searches etc)
Internally there is no difference, this just provides essentially a label for the schema.
- Version:
- 1.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bedework.calfacade.base.DumpEntity
DumpEntity.DumpType -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.bedework.calfacade.base.BwStringBase
checkNulls, compareTo, findLanguage, getLang, getLangPar, getSize, getValue, hasDumpValue, hashCode, setLang, setValue, toString, toStringSegment, updateMethods inherited from class org.bedework.calfacade.base.BwDbentity
addDeletedEntity, afterDeletion, beforeDeletion, beforeSave, beforeUpdate, getByteSize, getDeletedEntities, getSeq, length, setByteSize, setSeqMethods inherited from class org.bedework.calfacade.base.BwUnversionedDbentity
equals, getHref, getId, markUnsaved, setHref, setId, unsavedMethods inherited from class org.bedework.calfacade.base.DumpEntity
dump, dump, getLoggerMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bedework.util.logging.Logged
audit, debug, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, trace, warn
-
Constructor Details
-
BwString
public BwString()Constructor -
BwString
Create a string by specifying all its fields- Parameters:
lang- String language codevalue- String value
-
-
Method Details
-
findLang
Search the collection for a string that matches the given language code.A supplied lang of null implies the default language code.
If the supplied language equals any language in the collection we return with that.
Otherwise if if matches the first part of a qualified code we take that, e.g lan="en" could match "en_US"
Otherwise we return the first one we found.
- Parameters:
lang- language codec- collection of strings- Returns:
- BwString or null if no strings.
-
getRestoreCallback
public static org.bedework.util.xml.FromXmlCallback getRestoreCallback() -
clone
Description copied from class:BwUnversionedDbentityMake visible- Overrides:
clonein classBwStringBase<BwString>- Returns:
- Object of class T
-