Properties having custom types

5 views
Skip to first unread message

Arthur

unread,
Dec 21, 2010, 7:56:38 PM12/21/10
to jenabean-dev
I am extended QUDT in order to be able to express units as typed
literals. The following turtle fragment has ProductionRow_1's
tubingPressure = 200 psia. The unit or:unit:psia is a subclass of
xsd:double

:ProductionRow_1
a production:Production ;
rdfs:label "Production row 1"^^xsd:string ;
coreproperties:time "2008-10-27T21:00:00"^^xsd:dateTime ;
production:productionBHP
"2109.5"^^xsd:float ;
production:tubingPressure
"200"^^or_unit:psia ;
productionset:partOfProductionSet
:MyWellProductionDataset_1 .

I first tried setting the java type for bean property tubingPressure
to Float and then to String.

In both cases, when my application reads tubingPressure it throws an
exception:

"Dec 21, 2010 5:59:52 PM thewebsemantic.FieldContext setProperty
WARNING: Could not set bean field tubingPressure
java.lang.IllegalArgumentException: Can not set java.lang.String field
com.or.orka.jenabeans.schema.Production.tubingPressure to
com.hp.hpl.jena.datatypes.BaseDatatype$TypedValue"

Is there a way to handle one of these custom types?

Thanks

Arthur

Don't know if this is relevant, but here is the psia definition

or_unit:psia
a qudt:PressureOrStressUnit ;
rdfs:label "Psi Absolute"^^xsd:string ;
rdfs:subClassOf xsd:double ;
qudt:literal "psia"^^xsd:string ;
qudt:quantityKind quantity:Pressure .
Reply all
Reply to author
Forward
0 new messages