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 entity
EnclosingBean - 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 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 Java Properties.
      Type Parameters:
      Type - data type of entity
      Bean - type of bean associated with the entity
      Parameters:
      tag - attribute XML tag name
      getter - entity bean getter for getting Properties
      setter - entity bean setter for setting Properties
      Returns:
      created property
    • dump

      protected void dump(io.kojan.xml.XMLDumper dumper, Properties properties) throws io.kojan.xml.XMLException
      Specified by:
      dump in class io.kojan.xml.Property<EnclosingType, EnclosingBean, Properties>
      Throws:
      io.kojan.xml.XMLException
    • parse

      protected Properties parse(io.kojan.xml.XMLParser parser) throws io.kojan.xml.XMLException
      Specified by:
      parse in class io.kojan.xml.Property<EnclosingType, EnclosingBean, Properties>
      Throws:
      io.kojan.xml.XMLException