1 19 package org.openharmonise.rm.metadata; 20 21 import java.util.List ; 22 23 import org.openharmonise.commons.dsi.*; 24 import org.openharmonise.rm.DataAccessException; 25 import org.openharmonise.rm.resources.AbstractProfiledObject; 26 import org.openharmonise.rm.resources.metadata.properties.*; 27 import org.openharmonise.rm.resources.metadata.properties.ranges.*; 28 29 30 41 public class ProfileValue extends Profile { 42 43 47 private Property m_prop = null; 48 49 53 public ProfileValue() { 54 super(); 55 } 56 57 62 public ProfileValue(AbstractDataStoreInterface dbintrf) { 63 super(dbintrf); 64 65 } 66 67 74 public ProfileValue( 75 AbstractDataStoreInterface dbintrf, 76 AbstractProfiledObject obj) { 77 super(dbintrf, obj); 78 79 } 80 81 90 public ProfileValue( 91 AbstractDataStoreInterface dbintrf, 92 int nId, 93 AbstractProfiledObject obj) { 94 super(dbintrf, nId, obj); 95 96 } 97 98 103 public void setProperty(Property prop) { 104 m_prop = prop; 105 } 106 107 114 public Property getProperty() { 115 return m_prop; 116 } 117 118 121 public List getAvailableProperties() throws DataAccessException { 122 List props = null; 123 if(m_prop != null) { 124 ProfileRange range = (ProfileRange) m_prop.getRange(); 125 126 props = range.getAllowedProperties(m_dsi); 127 } else { 128 props = super.getAvailableProperties(); 129 } 130 131 return props; 132 } 133 134 } 135 | Popular Tags |