/** * @return {@link #organization} (The organization which is responsible for the action speccified * in thise request.) */ public Reference getOrganization() { if (this.organization == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ProcessRequest.organization"); else if (Configuration.doAutoCreate()) this.organization = new Reference(); // cc return this.organization; }
/** * @return {@link #date} (The date (and possibly time) when the family member history was taken.). * This is the underlying object with id, value and extensions. The accessor "getDate" gives * direct access to the value */ public DateTimeType getDateElement() { if (this.date == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create FamilyMemberHistory.date"); else if (Configuration.doAutoCreate()) this.date = new DateTimeType(); // bb return this.date; }
/** * @return {@link #relationship} (The type of relationship this person has to the patient (father, * mother, brother etc.).) */ public CodeableConcept getRelationship() { if (this.relationship == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create FamilyMemberHistory.relationship"); else if (Configuration.doAutoCreate()) this.relationship = new CodeableConcept(); // cc return this.relationship; }
@Test public void testSetBeforeAndGetAfterDeprecation() { Configuration conf = new Configuration(); conf.set("oldkey", "hello"); Configuration.addDeprecation("oldkey", new String[] {"newkey"}); assertEquals("hello", conf.get("newkey")); }
/** @return {@link #patient} (The person who this history concerns.) */ public Reference getPatient() { if (this.patient == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create FamilyMemberHistory.patient"); else if (Configuration.doAutoCreate()) this.patient = new Reference(); // cc return this.patient; }
/** * @return {@link #value} (The value of the measured amount. The value includes an implicit * precision in the presentation of the value.). This is the underlying object with id, value * and extensions. The accessor "getValue" gives direct access to the value */ public DecimalType getValueElement() { if (this.value == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create Quantity.value"); else if (Configuration.doAutoCreate()) this.value = new DecimalType(); // bb return this.value; }
/** * @return {@link #system} (The identification of the system that provides the coded form of the * unit.). This is the underlying object with id, value and extensions. The accessor * "getSystem" gives direct access to the value */ public UriType getSystemElement() { if (this.system == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create Quantity.system"); else if (Configuration.doAutoCreate()) this.system = new UriType(); // bb return this.system; }
/** * @return {@link #period} (The length of time between sampling times, measured in milliseconds.). * This is the underlying object with id, value and extensions. The accessor "getPeriod" gives * direct access to the value */ public DecimalType getPeriodElement() { if (this.period == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create SampledData.period"); else if (Configuration.doAutoCreate()) this.period = new DecimalType(); // bb return this.period; }
/** * @return {@link #factor} (A correction factor that is applied to the sampled data points before * they are added to the origin.). This is the underlying object with id, value and * extensions. The accessor "getFactor" gives direct access to the value */ public DecimalType getFactorElement() { if (this.factor == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create SampledData.factor"); else if (Configuration.doAutoCreate()) this.factor = new DecimalType(); // bb return this.factor; }
protected void configureMethod(ITestResult testResult) { if (SystemProperties.isSeleniumDebug()) { System.out.println("$configureMethod"); } Method realMethod = getCurrentRealMethod(); if (realMethod == null) { throw new IllegalStateException("can't find more configured methods"); } Class<?> realClass = realMethod.getDeclaringClass(); final Object testInstance = testResult.getInstance(); Configuration configuration = configurations.get(realClass).get(realMethod); if (!configuration.hasNext()) { throw new IllegalStateException("can't find more configurations"); } currentConfiguration = configuration.next(); try { for (Entry<Field, Object> entry : currentConfiguration.entrySet()) { final Field field = entry.getKey(); final Object assignment = entry.getValue(); setDeclaredFieldValue(testInstance, field, assignment); } } catch (Exception e) { throw new IllegalStateException("Cannot configure method", e); } }
/** * @return {@link #origin} (The base quantity that a measured value of zero represents. In * addition, this provides the units of the entire measurement series.) */ public SimpleQuantity getOrigin() { if (this.origin == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create SampledData.origin"); else if (Configuration.doAutoCreate()) this.origin = new SimpleQuantity(); // cc return this.origin; }
/** * @return {@link #nullify} (If true remove all history excluding audit.). This is the underlying * object with id, value and extensions. The accessor "getNullify" gives direct access to the * value */ public BooleanType getNullifyElement() { if (this.nullify == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ProcessRequest.nullify"); else if (Configuration.doAutoCreate()) this.nullify = new BooleanType(); // bb return this.nullify; }
/** * @return {@link #response} (Reference of a prior response to resource which is the target or * subject of this action.) */ public Reference getResponse() { if (this.response == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ProcessRequest.response"); else if (Configuration.doAutoCreate()) this.response = new Reference(); // cc return this.response; }
/** * @return {@link #organization} The actual object that is the target of the reference. The * reference library doesn't populate this, but you can use it to hold the resource if you * resolve it. (The organization which is responsible for the action speccified in thise * request.) */ public Organization getOrganizationTarget() { if (this.organizationTarget == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ProcessRequest.organization"); else if (Configuration.doAutoCreate()) this.organizationTarget = new Organization(); // aa return this.organizationTarget; }
public static String createPath( ConfigurationSection section, String key, ConfigurationSection relativeTo) { Configuration root = section.getRoot(); if (root == null) { throw new IllegalStateException("Cannot create path without a root"); } char separator = root.options().pathSeparator(); StringBuilder builder = new StringBuilder(); if (section != null) { for (ConfigurationSection parent = section; (parent != null) && (parent != relativeTo); parent = parent.getParent()) { if (builder.length() > 0) { builder.insert(0, separator); } builder.insert(0, parent.getName()); } } if ((key != null) && (key.length() > 0)) { if (builder.length() > 0) { builder.append(separator); } builder.append(key); } return builder.toString(); }
/** * @return {@link #upperLimit} (The upper limit of detection of the measured points. This is * needed if any of the data points have the value "U" (higher than detection limit).). This * is the underlying object with id, value and extensions. The accessor "getUpperLimit" gives * direct access to the value */ public DecimalType getUpperLimitElement() { if (this.upperLimit == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create SampledData.upperLimit"); else if (Configuration.doAutoCreate()) this.upperLimit = new DecimalType(); // bb return this.upperLimit; }
private void generateASCIIFont(AsyncTask task) { String ascii = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"; Paint p = new Paint(); p.setTextAlign(Align.CENTER); Typeface tf = Fonts.getTypeface(configuration.getModel()); p.setTypeface(tf); p.setTextScaleX(1.0f); p.setColor(configuration.getCharacterColorAsRGB()); p.setAntiAlias(true); setFontSize(p); int xPos = trsCharWidth / 2; int yPos = (int) ((trsCharHeight / 2) - ((p.descent() + p.ascent()) / 2)); for (int i = 0; i < ascii.length(); i++) { if (task.isCancelled()) { return; } Bitmap b = Bitmap.createBitmap(trsCharWidth, trsCharHeight, Bitmap.Config.RGB_565); Canvas c = new Canvas(b); c.drawColor(configuration.getScreenColorAsRGB()); c.drawText(ascii.substring(i, i + 1), xPos, yPos, p); font[i + 32] = b; } // Use space for all other characters for (int i = 0; i < font.length; i++) { if (font[i] == null) { font[i] = font[32]; } } }
/** * @return {@link #dimensions} (The number of sample points at each time point. If this value is * greater than one, then the dimensions will be interlaced - all the sample points for a * point in time will be recorded at once.). This is the underlying object with id, value and * extensions. The accessor "getDimensions" gives direct access to the value */ public PositiveIntType getDimensionsElement() { if (this.dimensions == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create SampledData.dimensions"); else if (Configuration.doAutoCreate()) this.dimensions = new PositiveIntType(); // bb return this.dimensions; }
/** * @return {@link #unit} (A human-readable form of the unit.). This is the underlying object with * id, value and extensions. The accessor "getUnit" gives direct access to the value */ public StringType getUnitElement() { if (this.unit == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create Quantity.unit"); else if (Configuration.doAutoCreate()) this.unit = new StringType(); // bb return this.unit; }
/** * @return {@link #data} (A series of data points which are decimal values separated by a single * space (character u20). The special values "E" (error), "L" (below detection limit) and "U" * (above detection limit) can also be used in place of a decimal value.). This is the * underlying object with id, value and extensions. The accessor "getData" gives direct access * to the value */ public StringType getDataElement() { if (this.data == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create SampledData.data"); else if (Configuration.doAutoCreate()) this.data = new StringType(); // bb return this.data; }
/** * @return {@link #code} (A computer processable form of the unit in some unit representation * system.). This is the underlying object with id, value and extensions. The accessor * "getCode" gives direct access to the value */ public CodeType getCodeElement() { if (this.code == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create Quantity.code"); else if (Configuration.doAutoCreate()) this.code = new CodeType(); // bb return this.code; }
public VncViewer(String[] argv) { applet = false; // Override defaults with command-line options for (int i = 0; i < argv.length; i++) { if (argv[i].equalsIgnoreCase("-log")) { if (++i >= argv.length) usage(); System.err.println("Log setting: " + argv[i]); LogWriter.setLogParams(argv[i]); continue; } if (Configuration.setParam(argv[i])) continue; if (argv[i].charAt(0) == '-') { if (i + 1 < argv.length) { if (Configuration.setParam(argv[i].substring(1), argv[i + 1])) { i++; continue; } } usage(); } if (vncServerName.getValue() != null) usage(); vncServerName.setParam(argv[i]); } }
/** * @return {@link #outcome} (Indicates what happened as a result of this condition. If the * condition resulted in death, deceased date is captured on the relation.) */ public CodeableConcept getOutcome() { if (this.outcome == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create FamilyMemberHistoryConditionComponent.outcome"); else if (Configuration.doAutoCreate()) this.outcome = new CodeableConcept(); // cc return this.outcome; }
public void set(String path, Object value) { Configuration root = getRoot(); if (root == null) { throw new IllegalStateException("Cannot use section without a root"); } final char separator = root.options().pathSeparator(); // i1 is the leading (higher) index // i2 is the trailing (lower) index int i1 = -1, i2; ConfigurationSection section = this; while ((i1 = path.indexOf(separator, i2 = i1 + 1)) != -1) { String node = path.substring(i2, i1); ConfigurationSection subSection = section.getConfigurationSection(node); if (subSection == null) { section = section.createSection(node); } else { section = subSection; } } String key = path.substring(i2); if (section == this) { if (value == null) { map.remove(key); } else { map.put(key, value); } } else { section.set(key, value); } }
/** * @return {@link #patient} The actual object that is the target of the reference. The reference * library doesn't populate this, but you can use it to hold the resource if you resolve it. * (The person who this history concerns.) */ public Patient getPatientTarget() { if (this.patientTarget == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create FamilyMemberHistory.patient"); else if (Configuration.doAutoCreate()) this.patientTarget = new Patient(); // aa return this.patientTarget; }
public Object get(String path, Object def) { if (path.length() == 0) { return this; } Configuration root = getRoot(); if (root == null) { throw new IllegalStateException("Cannot access section without a root"); } final char separator = root.options().pathSeparator(); // i1 is the leading (higher) index // i2 is the trailing (lower) index int i1 = -1, i2; ConfigurationSection section = this; while ((i1 = path.indexOf(separator, i2 = i1 + 1)) != -1) { section = section.getConfigurationSection(path.substring(i2, i1)); if (section == null) { return def; } } String key = path.substring(i2); if (section == this) { Object result = map.get(key); return (result == null) ? def : result; } return section.get(key, def); }
/** * @return {@link #name} (This will either be a name or a description. E.g. "Aunt Susan", "my * cousin with the red hair".). This is the underlying object with id, value and extensions. * The accessor "getName" gives direct access to the value */ public StringType getNameElement() { if (this.name == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create FamilyMemberHistory.name"); else if (Configuration.doAutoCreate()) this.name = new StringType(); // bb return this.name; }
public ConfigurationSection createSection(String path) { Configuration root = getRoot(); if (root == null) { throw new IllegalStateException("Cannot create section without a root"); } final char separator = root.options().pathSeparator(); // i1 is the leading (higher) index // i2 is the trailing (lower) index int i1 = -1, i2; ConfigurationSection section = this; while ((i1 = path.indexOf(separator, i2 = i1 + 1)) != -1) { String node = path.substring(i2, i1); ConfigurationSection subSection = section.getConfigurationSection(node); if (subSection == null) { section = section.createSection(node); } else { section = subSection; } } String key = path.substring(i2); if (section == this) { ConfigurationSection result = new MemorySection(this, key); map.put(key, result); return result; } return section.createSection(key); }
/** Parse and store the user credentials to the appropriate fields. */ private void parseUserCredentials() { Configuration conf = (Configuration) GWT.create(Configuration.class); String cookie = conf.authCookie(); String auth = Cookies.getCookie(cookie); if (auth == null) { authenticateUser(); // Redundant, but silences warnings about possible auth NPE, below. return; } int sepIndex = auth.indexOf(conf.cookieSeparator()); if (sepIndex == -1) authenticateUser(); token = auth.substring(sepIndex + 1); final String username = auth.substring(0, sepIndex); if (username == null) authenticateUser(); refreshWebDAVPassword(); DeferredCommand.addCommand( new Command() { @Override public void execute() { fetchUser(username); } }); }
/** * @return {@link #provider} The actual object that is the target of the reference. The reference * library doesn't populate this, but you can use it to hold the resource if you resolve it. * (The practitioner who is responsible for the action specified in thise request.) */ public Practitioner getProviderTarget() { if (this.providerTarget == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ProcessRequest.provider"); else if (Configuration.doAutoCreate()) this.providerTarget = new Practitioner(); // aa return this.providerTarget; }