Class JavaProperties<EnclosingType, EnclosingBean>
java.lang.Object
io.kojan.xml.Property<EnclosingType, EnclosingBean, Properties>
org.fedoraproject.xmvn.xml.JavaProperties<EnclosingType, EnclosingBean>
- Type Parameters:
EnclosingType- data type of entityEnclosingBean- type of bean associated with the entity
public class JavaProperties<EnclosingType, EnclosingBean>
extends io.kojan.xml.Property<EnclosingType, EnclosingBean, Properties>
A
Property of an Entity backed up by Java Properties.
When stored in XML form, the properties are represented by a XML element with specified tag, which contains nested child element for each property. For example:
<properties> <foo>123</foo> <bar>xyzzy</bar> </properties>
WARNING: This class is part of internal implementation of XMvn and it is marked as public only for technical reasons. This class is not part of XMvn API. Client code using XMvn should not reference it directly.
- Author:
- Mikolaj Izdebski
-
Method Summary
Modifier and TypeMethodDescriptionprotected voiddump(io.kojan.xml.XMLDumper dumper, Properties properties) static <Type,Bean>
JavaProperties<Type, Bean> of(String tag, io.kojan.xml.Getter<Type, Properties> getter, io.kojan.xml.Setter<Bean, Properties> setter) Creates a unique, optional entity property modeling JavaProperties.protected Propertiesparse(io.kojan.xml.XMLParser parser) Methods inherited from class io.kojan.xml.Property
getGetter, getSetter, getTag, isOptional, isUnique
-
Method Details
-
of
public static <Type,Bean> JavaProperties<Type,Bean> of(String tag, io.kojan.xml.Getter<Type, Properties> getter, io.kojan.xml.Setter<Bean, Properties> setter) Creates a unique, optional entity property modeling JavaProperties.- Type Parameters:
Type- data type of entityBean- type of bean associated with the entity- Parameters:
tag- attribute XML tag namegetter- entity bean getter for gettingPropertiessetter- entity bean setter for settingProperties- Returns:
- created property
-
dump
protected void dump(io.kojan.xml.XMLDumper dumper, Properties properties) throws io.kojan.xml.XMLException - Specified by:
dumpin classio.kojan.xml.Property<EnclosingType, EnclosingBean, Properties>- Throws:
io.kojan.xml.XMLException
-
parse
- Specified by:
parsein classio.kojan.xml.Property<EnclosingType, EnclosingBean, Properties>- Throws:
io.kojan.xml.XMLException
-