1 19 package org.openharmonise.vfs.metadata.value; 20 21 import java.util.ArrayList ; 22 import java.util.List ; 23 24 import org.openharmonise.vfs.metadata.*; 25 26 27 34 public class DomainValue implements ValueInstance { 35 36 39 public static String COLLECTION = "collection"; 40 41 44 public static String RESOURCE = "resource"; 45 46 49 public static String PROPERTY = "property-resource"; 50 51 54 public static String VALUE = "value"; 55 56 59 private int m_nMinOccurs = 0; 60 61 64 private int m_nMaxOccurs = -1; 65 66 69 private ArrayList m_aContentTypes = new ArrayList (); 70 71 74 private String m_sResourceType = RESOURCE; 75 76 79 private String m_sPath = null; 80 81 public DomainValue() { 82 super(); 83 } 84 85 90 public DomainValue(String sPath) { 91 super(); 92 this.m_sPath = sPath; 93 } 94 95 104 public DomainValue(String sPath, int nMinOccurs, int nMaxOccurs, List aContentTypes, String sResourceType) { 105 super(); 106 this.m_sPath = sPath; 107 this.m_nMinOccurs = nMinOccurs; 108 this.m_nMaxOccurs = nMaxOccurs; 109 this.m_aContentTypes = new ArrayList (aContentTypes); 110 this.m_sResourceType = sResourceType; 111 } 112 113 118 public void setMinOccurs(int nMinOccurs) { 119 this.m_nMinOccurs = nMinOccurs; 120 } 121 122 127 public int getMinOccurs() { 128 return this.m_nMinOccurs; 129 } 130 131 136 public void setMaxOccurs(int nMaxOccurs) { 137 this.m_nMaxOccurs = nMaxOccurs; 138 } 139 140 145 public int getMaxOccurs() { 146 return this.m_nMaxOccurs; 147 } 148 149 154 public void setResourceType(String sResourceType) { 155 this.m_sResourceType = sResourceType; 156 } 157 158 163 public String getResourceType() { 164 return this.m_sResourceType; 165 } 166 167 172 public void setContentTypes(List aContentTypes) { 173 this.m_aContentTypes = new ArrayList (aContentTypes); 174 } 175 176 181 public void addContentType(String sContentType) { 182 this.m_aContentTypes.add(sContentType); 183 } 184 185 190 public List getContentTypes() { 191 return (List ) this.m_aContentTypes.clone(); 192 } 193 194 199 public void setPath(String sPath) { 200 this.m_sPath = sPath; 201 } 202 203 208 public String getPath() { 209 return this.m_sPath; 210 } 211 212 215 public boolean equals(Object arg0) { 216 if(super.equals(arg0)) { 217 return true; 218 } else { 219 return false; 220 } 221 } 222 223 } 224 | Popular Tags |