class: JiBXHelper

public class: JiBXHelper
Author: Johannes Mueller (initial creation)
Project: Phase: 1.0; Status: Proposed; Version: $Revision: 1995 $ $LastChangedDate: 2009-05-19 16:; Complexity: 1
Dates: Created: 16.07.2009 15:14:32; Modified: 16.07.2009 15:14:32;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {4A65F31B-803F-476c-9F83-51B7F0671AEF}
Class with helper methods for the JiBX-based XML-2-Java-Transforming.
 

Goto: Custom Properties, Fields, Methods

Appears in: xmltransforming

Custom Properties
 
JiBXHelper Attributes
Attribute Details
public static const String
  DCTERMS_NAMESPACE_PREFIX
Initial: "dcterms:"
Notes: private static final Logger logger = Logger.getLogger(JiBXHelper.class);
private static const String
  escapedCharacters
Initial: { ">", """, "'" }
public static const String
  IDTYPES_NAMESPACE_PREFIX
Initial: "eidt:"
private static const String
  problematicCharacters
Initial: { ">", "\"", "\'" }
Notes: XML escaped characters mapping ("<" and "&" get escaped/unescaped automatically by JiBX) Note: Only the characters "<" and "&" are strictly illegal in XML. Apostrophes, quotation marks and greater than signs are legal, but it is a good habit to replace them.
 
JiBXHelper Methods
Operation Details
public static
accountUserVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<AccountUserVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<AccountUserVO></code>
public static
addContextLinkPrefix(
   String unprefixedString):String
Sequential
Notes: Adds the prefix '/ir/context/' to the given String and gives back the result.
@return The String with added prefix ("/ir/context/")
public static
addCreatorLinkPrefix(
   String unprefixedString):String
Sequential
Notes: Adds the prefix '/um/user-account/' to the given String and gives back the result.
@return The String with added prefix ("/um/user-account/")
public static
addOrganizationalUnitLinkPrefix(
   String unprefixedString):String
Sequential
Notes: Adds the prefix '/oum/organizational-unit/' to the given String and gives back the result.
@return The String with added prefix ("/oum/organizational-unit/")
public static
adminDescriptorVOListFactory():List
Sequential
Notes: Factory method to create a {@link ArrayList} as the implementation of a {@link List}.
@return A new {@link ArrayList}.
public static
affiliationPathVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<AffiliationPathVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<AffiliationPathVO></code>
public static
affiliationROListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<AffiliationRO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<AffiliationRO></code>
public static
affiliationVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<AffiliationVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<AffiliationVO></code>
private static
change(
   String in,
   String oldPat,
   String newPat):String
Sequential
Notes: Change all occurrences of a given 'old' pattern in a String to a given 'new' pattern.
@return The changed String
public static
containerVOListFactory():List
Sequential
Notes: Temporary factory method to create a <code>java.util.ArrayList<Object</code> for Container objects until ContainerVOs are implemented
@return A new <code>java.util.ArrayList<Object></code>
public static
contextVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<ContextVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<ContextVO></code>
public static
creatorVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<CreatorVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<CreatorVO></code>
public static
deserializeAccessLevelEnum(
   String enumValue):MdsFaceVO.AccessLevel
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing an emotion like defined in item.xsd to the corresponding
<code>MdsFaceVO.Emotion</code> Enum.
@return MdsFaceVO.Emotion The corresponding <code>MdsFaceVO.Emotion</code> Enum
public static
deserializeAgeGroupEnum(
   String enumValue):MdsFaceVO.AgeGroup
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing an emotion like defined in item.xsd to the corresponding
<code>MdsFaceVO.Emotion</code> Enum.
@return MdsFaceVO.Emotion The corresponding <code>MdsFaceVO.Emotion</code> Enum
public static
deserializeBoolean(
   String booleanValue):boolean
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing 'true' or 'false' to the corresponding boolean value.
@return boolean The corresponding boolean
public static
deserializeChecksumAlgorithmEnum(
   String enumValue):ChecksumAlgorithm
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing a ChecksumAlgorithm-type like defined in item.xsd to the corresponding
<code>FileVO.ChecksumAlgorithm</code> Enum.
@return ChecksumAlgorithm The corresponding <code>FileVO.ChecksumAlgorithm</code> Enum
public static
deserializeContainerLockStatusEnum(
   String enumValue):de.mpg.escidoc.services.common.valueobjects.ContainerVO.LockStatus
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing a lock-status-type like defined in container.xsd to the corresponding
<code>ContainerVO.LockStatus</code> Enum.
@return ValidityStatus The corresponding <code>ContainerVO.LockStatus</code> Enum
public static
deserializeContainerStateEnum(
   String enumValue):ContainerVO.State
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing a status-type like defined in container.xsd to the corresponding
<code>ContainerVO.State</code> Enum.
@return ContainerVO.State The corresponding <code>ContainerVO.State</code> Enum.
public static
deserializeCoordinates(
   String coordString):Coordinates
Sequential
Tags: throws=Exception
Notes: Deserializes a String containing an <code>xs:dateTime</code> to the corresponding <code>java.util.Date</code>.
@param dateString The String to deserialize
@return The corresponding <code>java.util.Date</code>
public static
deserializeCreatorRoleEnum(
   String enumValue):CreatorRole
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing a creator-role like defined in escidocenumtypes.xsd to the corresponding CreatorVO.CreatorRole Enum.
@return The corresponding CreatorVO.CreatorRole Enum
public static
deserializeDate(
   String dateString):Date
Sequential
Tags: throws=WrongDateException
Notes: Deserializes a String containing an <code>xs:dateTime</code> to the corresponding <code>java.util.Date</code>.
@return The corresponding <code>java.util.Date</code>
public static
deserializeDegreeTypeEnum(
   String enumValue):DegreeType
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing a degree type like defined in escidocenumtypes.xsd to the corresponding MdsPublicationVO.DegreeType enum.
@return DegreeType The corresponding MdsPublicationVO.DegreeType Enum
public static
deserializeEmotionEnum(
   String enumValue):MdsFaceVO.Emotion
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing an emotion like defined in item.xsd to the corresponding
<code>MdsFaceVO.Emotion</code> Enum.
@return MdsFaceVO.Emotion The corresponding <code>MdsFaceVO.Emotion</code> Enum
public static
deserializeEventTypeEnum(
   String enumValue):EventLogEntryVO.EventType
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing a genre type like defined in escidocenumtypes.xsd to the corresponding
<code>SourceVO.Genre</code> Enum.
@return Genre The corresponding <code>SourceVO.Genre</code> Enum (if set), null otherwise.
public static
deserializeExportFormatTypeEnum(
   String enumValue):ExportFormatVO.FormatType
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing a format-type to the corresponding <code>ExportFormatVO.FormatType</code> Enum.
@return ExportFormatVO.FormatType The corresponding <code>ExportFormatVO.FormatType</code> Enum
public static
deserializeFileVisibilityEnum(
   String enumValue):Visibility
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing a visibility-type like defined in components.xsd to the corresponding
<code>FileVO.Visibility</code> Enum. As JiBX v1.1.3 calls the deserialization method for all optional attributes also (see http://www.mail-archive.com/jibx-users@lists.sourceforge.net/msg00003.html), a
<code>null</code> value is returned when this method is called with a <code>null</code> parameter.
@return Visibility The corresponding <code>FileVO.Visibility</code> Enum (or <code>null</code>)
public static
deserializeGenderEnum(
   String enumValue):MdsFaceVO.Gender
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing an emotion like defined in item.xsd to the corresponding
<code>MdsFaceVO.Emotion</code> Enum.
@return MdsFaceVO.Emotion The corresponding <code>MdsFaceVO.Emotion</code> Enum
public static
deserializeGenreEnum(
   String enumValue):MdsPublicationVO.Genre
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing a genre type like defined in escidocenumtypes.xsd to the corresponding
<code>MdsPublicationVO.Genre</code> Enum.
@return Genre The corresponding <code>MdsPublicationVO.Genre</code> Enum
public static
deserializeIdentifierTypeEnum(
   String enumValue):IdType
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing a <code>xsi:type</code> attribute of <dc:identifier> and <escidoc:identifier> elements (referencing to the types defined in escidocidtypes.xsd and dcterms.xsd) to the corresponding
<code>IdentifierVO.IdType</code> Enum.
@return IdType The corresponding <code>IdentifierVO.IdType</code> Enum
public static
deserializeInvitationStatusEnum(
   String enumValue):InvitationStatus
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing an invitation status like defined in escidocenumtypes.xsd to the corresponding
<code>VersionHistoryEntryVO.InvitationStatus</code> Enum.
@return InvitationStatus The corresponding <code>VersionHistoryEntryVO.InvitationStatus</code> Enum
public static
deserializeItemStateEnum(
   String enumValue):ItemVO.State
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing a status-type like defined in item.xsd to the corresponding
<code>ItemVO.State</code> Enum.
@return ItemVO.State The corresponding <code>ItemVO.State</code> Enum.
public static
deserializeLockStatusEnum(
   String enumValue):LockStatus
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing a lock-status-type like defined in item.xsd to the corresponding
<code>ItemVO.LockStatus</code> Enum.
@return ValidityStatus The corresponding <code>ItemVO.LockStatus</code> Enum
public static
deserializePictureGroupEnum(
   String enumValue):MdsFaceVO.PictureGroup
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing an emotion like defined in item.xsd to the corresponding
<code>MdsFaceVO.Emotion</code> Enum.
@return MdsFaceVO.Emotion The corresponding <code>MdsFaceVO.Emotion</code> Enum
public static
deserializePubCollectionStateEnum(
   String enumValue):ContextVO.State
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing a status-type like defined in context.xsd to the corresponding
<code>ContextVO.State</code> Enum.
@return ContextVO.State The corresponding <code>ContextVO.State</code> Enum
public static
deserializeReviewMethodEnum(
   String enumValue):ReviewMethod
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing a review-method like defined in escidocenumtypes.xsd to the corresponding
<code>MdsPublicationVO.ReviewMethod</code> Enum.
@return ReviewMethod The corresponding <code>MdsPublicationVO.ReviewMethod</code> Enum
public static
deserializeSearchHitTypeEnum(
   String enumValue):SearchHitType
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing a type like defined in search-result.xsd to the corresponding
<code>SearchHitVO.SearchHitType</code> Enum.
@return SearchHitType The corresponding <code>SearchHitVO.SearchHitType</code> Enum
public static
deserializeSourceGenreEnum(
   String enumValue):SourceVO.Genre
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing a genre type like defined in escidocenumtypes.xsd to the corresponding
<code>SourceVO.Genre</code> Enum.
@return Genre The corresponding <code>SourceVO.Genre</code> Enum (if set), null otherwise.
public static
deserializeStorageEnum(
   String enumValue):Storage
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing a storage-attribute like defined in components.xsd to the corresponding
<code>FileVO.Storage</code> Enum.
@return Storage The corresponding <code>FileVO.Storage</code> Enum
public static
deserializeURL(
   String urlString):URL
Sequential
Notes: Deserializes a String to a <code>java.net.URL</code>.
@return The corresponding <code>java.net.URL</code>
public static
deserializeVisibilityEnum(
   String enumValue):Visibility
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing a visibility-type like defined in components.xsd to the corresponding
<code>FileVO.Visibility</code> Enum.
@return State The corresponding <code>FileVO.Visibility</code> Enum
public static
deserializeWorkflowEnum(
   String enumValue):PublicationAdminDescriptorVO.Workflow
Sequential
Tags: throws=WrongEnumException
Notes: Deserializes a String containing a genre type like defined in escidocenumtypes.xsd to the corresponding
<code>SourceVO.Genre</code> Enum.
@return Genre The corresponding <code>SourceVO.Genre</code> Enum (if set), null otherwise.
public static
eventVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<VersionHistoryEntryVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<VersionHistoryEntryVO></code>
public static
exportFormatVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<ExportFormatVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<ExportFormatVO></code>
public static
fileFormatVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<FileFormatVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<FileFormatVO></code>
public static
filterListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<Filter></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<Filter></code>
public static
formatVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<FormatVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<FormatVO></code>
public static
genreListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<MdsPublicationVO.Genre></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<MdsPublicationVO.Genre></code>
public static
grantVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<GrantVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<GrantVO></code>
public static
hitwordVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<HitwordVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<HitwordVO></code>
public static
identifierVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<IdentifierVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<IdentifierVO></code>
public static
itemVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<ItemVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<ItemVO></code>
private
JiBXHelper():
Sequential
Notes: Hide default constructor.
public static
localTagsListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<String></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<String></code>
public static
memberListFactory():List
Sequential
public static
memberROListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<ReferenceObject></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<ReferenceObject></code>
public static
metadataSetVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<MetadataSetVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<MetadataSetVO></code>
public static
organizationVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<OrganizationVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<OrganizationVO></code>
public static
pubFileVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<FileVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<FileVO></code>
public static
relationVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<ItemRelationVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<ItemRelationVO></code>
public static
removeLinkPrefix(
   String prefixedString):String
Sequential
Notes: Removes from a String everything before the last slash and the slash itself.
@return The String without the prefix (everything before the last slash and the slash itself)
public static
searchHitVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<SearchHitVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<SearchHitVO></code>
public static
serializeBoolean(
   boolean bool):String
Sequential
Notes: Serializes a boolean to a corresponding String ('true' or 'false').
@return String The corresponding String ('true' or 'false')
public static
serializeDate(
   Date date):String
Sequential
Notes: Serializes a <code>java.util.Date</code> to a String. The format of the String is "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'".
@see java.text.SimpleDateFormat
@return String The corresponding String
public static
serializeEnumLikeStringToString(
   String enumeration):String
Sequential
Notes: Serializes a Java Enum of arbitrary type to the corresponding String representation according to the following rules: Every upper case letter is replaced by a lower case letter and every underscore is replaced by a hyphen. If theses rules are not sufficient, a specialized serialization method has to be used instead.
@return String The corresponding String
public static
serializeIdentifierTypeEnum(
   IdType idType):String
Sequential
Notes: Serializes an <code>IdentifierVO.IdType</code> Enum to a String that corresponds to the types defined in escidocidtypes.xsd and dcterms.xsd.
@return The corresponding 'xsi:type' String (cf. escidocidtypes.xsd and http://dublincore.org/schemas/xmls/qdc/2003/04/02/dcterms.xsd)
public static
serializeRegularEnumToString(
   Enum enumeration):String
Sequential
Notes: Serializes a Java Enum of arbitrary type to the corresponding String representation according to the following rules: Every upper case letter is replaced by a lower case letter and every underscore is replaced by a hyphen. If theses rules are not sufficient, a specialized serialization method has to be used instead.
@return String The corresponding String
public static
serializeUppercaseEnumToString(
   Enum enumeration):String
Sequential
Notes: Serializes enums to strings leaving the cases as they are but replacing _ by -.
@return The searialized string
public static
serializeURL(
   java.net.URL url):String
Sequential
Notes: Serializes a <code>java.net.URL</code> to a String.
@return The corresponding String
public static
sourceVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<SourceVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<SourceVO></code>
public static
statisticReportDefinitionVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<StatisticReportDefinitionVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<StatisticReportDefinitionVO></code>
public static
statisticReportRecordParamVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<StatisticReportRecordParamVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<StatisticReportRecordParamVO></code>
public static
statisticReportRecordVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<StatisticReportRecordVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<StatisticReportRecordVO></code>
public static
stringListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<String></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<String></code>
public static
textFragmentVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<TextFragmentVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<TextFragmentVO></code>
public static
textVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<TextVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<TextVO></code>
public static
tocDivVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<TocDivVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<TocDivVO></code>
public static
tocPtrVOListFactory():List
Sequential
Notes: Factory method to create a <code>java.util.ArrayList<TocPtrVO></code> as the implementation of a
<code>java.util.List</code>.
@return A new <code>java.util.ArrayList<TocPtrVO></code>
public static
urlFactory():URL
Sequential
Notes: Factory method to create a <code>java.net.URL</code>
@return A new <code>java.net.URL</code>
public static
xmlEscape(
   String cdata):String
Sequential
Notes: Escapes unwanted XML characters.
@return The escaped String
public static
xmlUnescape(
   String cdata):String
Sequential
Notes: Unescapes the set of escaped special characters "greater than", apostrophe and quotation mark.
@return The unescaped String