Package edu.harvard.hul.ois.jhove
Enum Class Utils
- All Implemented Interfaces:
Serializable,Comparable<Utils>,java.lang.constant.Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic StringencodeContent(String content) Encodes a content String in XML-clean form, converting characters to entities as necessary and removing control characters disallowed by XML.static StringencodeValue(String value) Encodes an attribute value String in XML-clean form, converting quote characters to entities and removing control characters disallowed by XML.static booleanisPropertyEmpty(Property property, PropertyArity arity) Checks if a property would produce an empty XML element, and returns true if it would.static UtilsReturns the enum constant of this class with the specified name.static Utils[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
encodeContent
Encodes a content String in XML-clean form, converting characters to entities as necessary and removing control characters disallowed by XML. The null string will be converted to an empty string. -
encodeValue
Encodes an attribute value String in XML-clean form, converting quote characters to entities and removing control characters disallowed by XML. -
isPropertyEmpty
Checks if a property would produce an empty XML element, and returns true if it would.
-