|
OBEROn SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.oberon.ooql.sdk.OBBase
com.oberon.ooql.sdk.AdminBase
com.oberon.ooql.sdk.UnitMeasure
public class UnitMeasure
UnitMeasure Admin Object: defines a Unit Measure for Field values representation
| Field Summary | |
|---|---|
static java.util.Hashtable<java.lang.Integer,UnitMeasure[]> |
hUnitMeasures
Table of all pre-defined unit measures for each type ( key=UM type ; value=UnitMeasure[] ) |
static int |
UMTYPE_ACCELERATION
Unit Measure Type: acceleration |
static int |
UMTYPE_AREA
Unit Measure Type: area |
static int |
UMTYPE_CURRENCY
Unit Measure Type: currency |
static int |
UMTYPE_DATE
Unit Measure Type: date format |
static int |
UMTYPE_DATETIME
Unit Measure Type: date-time format |
static int |
UMTYPE_DENSITY
Unit Measure Type: density |
static int |
UMTYPE_DYNAMIC_VISCOSITY
Unit Measure Type: dynamic viscosity |
static int |
UMTYPE_ELECTRIC_CAPACITANCE
Unit Measure Type: electric capacitance |
static int |
UMTYPE_ELECTRIC_CHARGE
Unit Measure Type: electric charge |
static int |
UMTYPE_ELECTRIC_CURRENT
Unit Measure Type: electric current |
static int |
UMTYPE_ELECTRIC_DIPOLE
Unit Measure Type: electric dipole |
static int |
UMTYPE_ELECTRIC_INDUCTANCE
Unit Measure Type: electric inductance |
static int |
UMTYPE_ELECTRIC_POTENTIAL_DIFFERENCE
Unit Measure Type: electric potential difference |
static int |
UMTYPE_ELECTRIC_RESISTANCE
Unit Measure Type: electric resistance |
static int |
UMTYPE_ENERGY
Unit Measure Type: energy |
static int |
UMTYPE_FLOW
Unit Measure Type: flow |
static int |
UMTYPE_FLVOLUME
Unit Measure Type: fluid volume |
static int |
UMTYPE_FORCE
Unit Measure Type: force |
static int |
UMTYPE_FREQUENCY
Unit Measure Type: frequency |
static int |
UMTYPE_ILLUMINANCE
Unit Measure Type: illuminance |
static int |
UMTYPE_INFORMATION_ENTROPY
Unit Measure Type: information entropy |
static int |
UMTYPE_INFORMATION_QUANTITY
Unit Measure Type: information quantity |
static int |
UMTYPE_KINEMATIC_VISCOSITY
Unit Measure Type: kinematic viscosity |
static int |
UMTYPE_length
|
static int |
UMTYPE_LENGTH
Unit Measure Type: length |
static int |
UMTYPE_LUMINANCE
Unit Measure Type: luminance |
static int |
UMTYPE_LUMINOUS_FLUX
Unit Measure Type: luminous flux |
static int |
UMTYPE_LUMINOUS_INTENSITY
Unit Measure Type: luminous intensity |
static int |
UMTYPE_MAGNETIC_FLUX
Unit Measure Type: magnetic flux |
static int |
UMTYPE_MAGNETIC_FLUX_DENSITY
Unit Measure Type: magnetic flux density |
static int |
UMTYPE_MASS
Unit Measure Type: mass |
static int |
UMTYPE_NOT_DEFINED
Unit Measure Type: not defined |
static int |
UMTYPE_PLANE_ANGLE
Unit Measure Type: plane angle |
static int |
UMTYPE_POWER
Unit Measure Type: power |
static int |
UMTYPE_PRESSURE
Unit Measure Type: pressure |
static int |
UMTYPE_RADIATION_ABSORBED_DOSE
Unit Measure Type: radiation absorbed dose |
static int |
UMTYPE_RADIATION_EQUIVALENT_DOSE
Unit Measure Type: radiation equivalent dose |
static int |
UMTYPE_RADIATION_EXPOSURE
Unit Measure Type: radiation exposure |
static int |
UMTYPE_RADIATION_SOURCE_ACTIVITY
Unit Measure Type: radiation source activity |
static int |
UMTYPE_SOLID_ANGLE
Unit Measure Type: solid angle |
static int |
UMTYPE_SPEED
Unit Measure Type: speed |
static int |
UMTYPE_TEMPERATURE
Unit Measure Type: temperature |
static int |
UMTYPE_TIME
Unit Measure Type: time |
static int |
UMTYPE_TORQUE
Unit Measure Type: torque |
static int |
UMTYPE_VOLUME
Unit Measure Type: volume |
| Fields inherited from class com.oberon.ooql.sdk.AdminBase |
|---|
bsOptions, HIDDEN_OPTION |
| Constructor Summary | |
|---|---|
UnitMeasure()
|
|
UnitMeasure(int type,
java.lang.String name,
java.lang.String symbol,
double factor,
java.lang.String description)
|
|
UnitMeasure(java.lang.String name)
|
|
| Method Summary | |
|---|---|
java.lang.String |
compareUpdate(UnitMeasure refUnitMeasure,
boolean checkImage,
boolean overwrite,
boolean force,
Framework framework)
Return/apply the OOQL command to update this UnitMeasure object and let it become equals to another reference object. |
java.lang.String |
convertFromDefaultDateFormat(java.lang.String value_SI)
Convert a date expressed in the default format to the current UM format |
java.lang.String |
convertFromDefaultDateTimeFormat(java.lang.String value_SI)
Convert a date expressed in the default format to the current UM format |
double |
convertFromSIValue(double value_SI)
Convert a value expressed in the SI unit measure to the current UM |
java.lang.String |
convertToDefaultDateFormat(java.lang.String value_UM)
Convert a date expressed in the current UM format to the correspondent default format |
java.lang.String |
convertToDefaultDateTimeFormat(java.lang.String value_UM)
Convert a date expressed in the current UM format to the correspondent default format |
double |
convertToSIValue(double value_UM)
Convert a value expressed in the current UM to the correspondent SI unit measure |
void |
create(boolean force,
Framework framework)
Create a new UnitMeasure object on the database |
void |
create(Framework framework)
Create a new UnitMeasure object on the database |
void |
destroy(Framework framework)
Remove the UnitMeasure object from the database |
boolean |
equals(UnitMeasure unitmeasure)
Compare two UnitMeasures |
void |
fromXML(org.jdom.Element rootElement)
Load the UnitMeasure properties from XML element tree |
double |
getConversionAddendum()
Get the Conversion addendum |
double |
getConversionFactor()
Get the Conversion factor |
java.lang.String |
getCreateCommand(boolean force)
Return the OOQL command to create this UnitMeasure object with the settled properties |
java.lang.String |
getDateFormat()
Get the UnitMeasure date format |
java.util.Vector<java.lang.String> |
getFields(Framework framework)
Return a list of Fields where this UnitMeasure is used |
java.lang.String |
getFieldsAsString(java.lang.String delim,
Framework framework)
Return a list of Fields where this UnitMeasure is used, as String |
java.util.Vector<java.lang.String> |
getMetricSystems(Framework framework)
Return a list of MetricSystems where this UnitMeasure is used |
java.lang.String |
getMetricSystemsAsString(java.lang.String delim,
Framework framework)
Return a list of MetricSystems where this UnitMeasure is used, as String |
java.lang.String |
getProperty(java.lang.String propertyName,
java.util.Vector<java.lang.Object> filterArgs,
java.lang.String token,
Framework framework)
Get a property for this UnitMeasure object by its OOQL identifier |
java.lang.String |
getSaveCommand(boolean force)
Return the OOQL command to update this UnitMeasure object with the modified properties. |
static UnitMeasure |
getSIUnitMeasure(int type)
Get the International standard (SI) Unit Measure for the specific type |
java.lang.String |
getSymbol()
Get the UnitMeasure Symbol |
java.util.Vector<?> |
getTargetNames(java.lang.String composedName,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Return a Vector of administrative object names extracted by using an OOQL selector |
int |
getType()
Get the UnitMeasure type |
java.lang.String |
getTypeAsString()
Get the UnitMeasure type in OOQL format |
static java.lang.String |
getTypeAsString(int type)
Convert the UnitMeasure type in OOQL format |
static int |
getTypeFromString(java.lang.String unitmeasureType)
Convert UnitMeasure type from OOQL format |
static UnitMeasure[] |
getUnitMeasures(int type)
Get the known Unit Measures list for the specific type |
void |
link(Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Open the UnitMeasure object: connect the memory instance with the database instance |
static UnitMeasure |
open(java.lang.String name,
Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Open an administrative object and read properties from the database or retrieve them from memory |
void |
setConversionAddendum(double addendum)
Set the Conversion addendum. |
void |
setConversionFactor(double factor)
Set the Conversion factor. |
void |
setDateFormat(java.lang.String format)
Set the UnitMeasure date format. |
void |
setSymbol(java.lang.String symbol)
Set the UnitMeasure Symbol. |
void |
setType(int type)
Set the UnitMeasure type |
java.lang.String |
toString()
Return the UnitMeasure properties as a single String |
java.lang.String |
toString(Framework framework)
Return the UnitMeasure object extended properties as a single String |
org.jdom.Element |
toXML(boolean getImage,
boolean fullDump,
Framework framework)
Return the UnitMeasure properties as XML element tree |
org.jdom.Element |
toXML(Framework framework)
Return the UnitMeasure properties as XML element tree |
void |
unlink(Framework framework)
Close the object: disconnect the memory instance from the database instance |
void |
write(boolean force,
Framework framework)
Update the UnitMeasure object to the database |
void |
write(Framework framework)
Update the UnitMeasure object to the database |
| Methods inherited from class com.oberon.ooql.sdk.OBBase |
|---|
addChange, addUniqueChange, ChangesFromXML, ChangesToXML, getChanges, getChangesAsString, getId, isLinked, removeChange, resetChanges, setId, setLinked |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int UMTYPE_NOT_DEFINED
public static final int UMTYPE_LENGTH
public static final int UMTYPE_AREA
public static final int UMTYPE_VOLUME
public static final int UMTYPE_FLVOLUME
public static final int UMTYPE_PLANE_ANGLE
public static final int UMTYPE_SOLID_ANGLE
public static final int UMTYPE_MASS
public static final int UMTYPE_DENSITY
public static final int UMTYPE_TIME
public static final int UMTYPE_FREQUENCY
public static final int UMTYPE_SPEED
public static final int UMTYPE_ACCELERATION
public static final int UMTYPE_FORCE
public static final int UMTYPE_TORQUE
public static final int UMTYPE_ENERGY
public static final int UMTYPE_POWER
public static final int UMTYPE_TEMPERATURE
public static final int UMTYPE_PRESSURE
public static final int UMTYPE_FLOW
public static final int UMTYPE_ELECTRIC_CURRENT
public static final int UMTYPE_ELECTRIC_POTENTIAL_DIFFERENCE
public static final int UMTYPE_ELECTRIC_RESISTANCE
public static final int UMTYPE_ELECTRIC_CAPACITANCE
public static final int UMTYPE_ELECTRIC_INDUCTANCE
public static final int UMTYPE_ELECTRIC_CHARGE
public static final int UMTYPE_ELECTRIC_DIPOLE
public static final int UMTYPE_DYNAMIC_VISCOSITY
public static final int UMTYPE_KINEMATIC_VISCOSITY
public static final int UMTYPE_MAGNETIC_FLUX
public static final int UMTYPE_MAGNETIC_FLUX_DENSITY
public static final int UMTYPE_INFORMATION_ENTROPY
public static final int UMTYPE_INFORMATION_QUANTITY
public static final int UMTYPE_LUMINOUS_INTENSITY
public static final int UMTYPE_LUMINANCE
public static final int UMTYPE_LUMINOUS_FLUX
public static final int UMTYPE_ILLUMINANCE
public static final int UMTYPE_RADIATION_SOURCE_ACTIVITY
public static final int UMTYPE_RADIATION_EXPOSURE
public static final int UMTYPE_RADIATION_ABSORBED_DOSE
public static final int UMTYPE_RADIATION_EQUIVALENT_DOSE
public static final int UMTYPE_CURRENCY
public static final int UMTYPE_length
public static final int UMTYPE_DATE
public static final int UMTYPE_DATETIME
public static final java.util.Hashtable<java.lang.Integer,UnitMeasure[]> hUnitMeasures
| Constructor Detail |
|---|
public UnitMeasure()
public UnitMeasure(java.lang.String name)
throws OberonException
name - the name of the administrative object
OberonException - if the name contains invalid characters
public UnitMeasure(int type,
java.lang.String name,
java.lang.String symbol,
double factor,
java.lang.String description)
throws OberonException
name - the name of the administrative objecttype - the UnitMeasure typesymbol - the UM symbolfactor - the Conversion Factor respect to the SI unitdescription - the UM definition
OberonException - if the name contains invalid characters| Method Detail |
|---|
public static UnitMeasure open(java.lang.String name,
Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
throws OberonException
name - the object nameframework - the current frameworkcounters - administrative object synch counters (if null read them from database)
OberonException - usually due to DB SQL exceptions
public void link(Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
throws OberonException
link in class AdminBaseframework - the current frameworkcounters - administrative object synch counters (if null read them from database)
OberonException - usually due to DB SQL exceptions
public void create(Framework framework)
throws OberonException
create in class AdminBaseframework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rights
public void create(boolean force,
Framework framework)
throws OberonException
force - if true ignores optional featuresframework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rights
public void write(Framework framework)
throws OberonException
write in class AdminBaseframework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rights
public void write(boolean force,
Framework framework)
throws OberonException
force - if true ignores optional featuresframework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rights
public void unlink(Framework framework)
throws OberonException
unlink in class AdminBaseframework - the current framework
OberonException - usually due to DB SQL exceptions
public void destroy(Framework framework)
throws OberonException
destroy in class AdminBaseframework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rightspublic void setType(int type)
type - the UnitMeasure typepublic int getType()
public static java.lang.String getTypeAsString(int type)
public java.lang.String getTypeAsString()
public static int getTypeFromString(java.lang.String unitmeasureType)
public void setSymbol(java.lang.String symbol)
symbol - the UM symbolpublic java.lang.String getSymbol()
public void setDateFormat(java.lang.String format)
format - the date formatpublic java.lang.String getDateFormat()
public void setConversionFactor(double factor)
factor - the Conversion Factor respect to the SI unitpublic double getConversionFactor()
public void setConversionAddendum(double addendum)
addendum - the Conversion Addendum respect to the SI unitpublic double getConversionAddendum()
public java.util.Vector<java.lang.String> getMetricSystems(Framework framework)
framework - the current framework
MetricSystem names
public java.lang.String getMetricSystemsAsString(java.lang.String delim,
Framework framework)
delim - the separator itemframework - the current framework
MetricSystem names separated by the delim characterspublic java.util.Vector<java.lang.String> getFields(Framework framework)
framework - the current framework
Field names
public java.lang.String getFieldsAsString(java.lang.String delim,
Framework framework)
delim - the separator itemframework - the current framework
Menu names separated by the delim characters
public java.lang.String getProperty(java.lang.String propertyName,
java.util.Vector<java.lang.Object> filterArgs,
java.lang.String token,
Framework framework)
getProperty in class OBBasepropertyName - OOQL property identifier/name (example: type , symbol ...)filterArgs - extra arguments used to compute propertiestoken - separator token for complex propertiesframework - the current framework
public java.util.Vector<?> getTargetNames(java.lang.String composedName,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
getTargetNames in class OBBasecomposedName - OOQL property identifier/namefilterArgs - extra arguments used to compute propertiesframework - the current framework
public boolean equals(UnitMeasure unitmeasure)
public java.lang.String toString()
toString in class AdminBasepublic java.lang.String toString(Framework framework)
toString in class AdminBaseframework - the current frameworkpublic org.jdom.Element toXML(Framework framework)
toXML in class AdminBaseframework - the current framework
public org.jdom.Element toXML(boolean getImage,
boolean fullDump,
Framework framework)
toXML in class AdminBasegetImage - true to include "imagedata" element with the base64 encoded image datafullDump - true to include detailed informationframework - the current frameworkpublic void fromXML(org.jdom.Element rootElement)
fromXML in class AdminBasepublic java.lang.String getCreateCommand(boolean force)
getCreateCommand in class AdminBaseforce - if true append the "force" options at the endpublic java.lang.String getSaveCommand(boolean force)
getSaveCommand in class AdminBaseforce - if true append the "force" options at the end
public java.lang.String compareUpdate(UnitMeasure refUnitMeasure,
boolean checkImage,
boolean overwrite,
boolean force,
Framework framework)
throws OberonException
refUnitMeasure - the reference UnitMeasure objectcheckImage - if true compare also the image iconoverwrite - if true update the database object instanceforce - if true ignores optional propertiesframework - the current framework
OberonExceptionfromXML(Element)public static UnitMeasure getSIUnitMeasure(int type)
public static UnitMeasure[] getUnitMeasures(int type)
public double convertToSIValue(double value_UM)
public double convertFromSIValue(double value_SI)
public java.lang.String convertToDefaultDateFormat(java.lang.String value_UM)
throws OberonException
OberonException
public java.lang.String convertFromDefaultDateFormat(java.lang.String value_SI)
throws OberonException
OberonException
public java.lang.String convertToDefaultDateTimeFormat(java.lang.String value_UM)
throws OberonException
OberonException
public java.lang.String convertFromDefaultDateTimeFormat(java.lang.String value_SI)
throws OberonException
OberonException
|
OBEROn SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||