how to build class with deep structured data
<p>I want to create class that contain the following data that can be stored from other object parsing</p>

<pre><code>Parent    Property   propertyDataNameAndValue      
T1        p1           name=Olaf,time=15:00..
T1        p2           date=22/11/12,z=9...          
T2        p10          t8=2,f8=3...
T3        p2           c=1
T3        p7           t=2,t=1,name=jhon...
</code></pre>

<p>....
My question is how would you create this class with the following assumption.</p>

<ol>
<li>parent and property is not unique</li>
<li>for parent , specific property is unique, i.e. for parent T1 there
is only one entry of property p1</li>
<li><strong>for every property we will have list of data with his value. (not
sure how to structure it)</strong></li>
</ol>

<p>latter on I will need retrieve it by get property dataNames (or you name it) which can be name and time (for parent T1 P1 ) and get property value which is  Olaf and 15:00 .</p>

<p>So my question is how to create the propertyDataNameAndValue  since for every property entry I can list of term (many) I am not sure how to put it since I need to get the data and the value..</p>

<p>I'm tried to create the following class but I not sure how to handle propertyDataNameAndValue ( setpropMap )...</p>

<pre><code>import java.util.LinkedHashMap;
import java.util.Map;

public class Property {

    private String parentName;
    private String propertyName;
    private String name;
    private String value;

    private Map&lt;String, String&gt; propDataMap = new LinkedHashMap&lt;String, String&gt;();

    public Property(String parentName, String propertyName) {
        this.parentName = parentName;
        this.propertyName = propertyName;
    }

    public void Create(Map&lt;String, String&gt; propDataMap) {
        this.propDataMap = propDataMap;
    }

    public void setpropMap(Map&lt;String, String&gt; propDataMap) {
        this.propDataMap = propDataMap;
    }
}
</code></pre>

<p>Example will be very helpful!</p>

<p>Thanks,Olaf</p>
