Dear Irene,
I tried via:
CONSTRUCT {
?this :SweptArea ?IfcRectangleProfileDef .
?IfcRectangleProfileDef a :IfcRectangleProfileDef .
?IfcRectangleProfileDef :XDim ?XDim .
?IfcRectangleProfileDef :YDim ?YDim .
}
WHERE {
?this :lenght ?length .
?this :width ?width .
LET (?XDim := ?length) .
LET (?YDim := ?width) .
LET (?IfcRectangleProfileDef := smf:buildURI("http://www.tno.nl/
mapping3#ProfileFor-{?this}")) .
}
still I get no instances after TopSpin inference for
IfcRectangleProfileDef ! :(
Any further advice is highly appreciated!
Thanks, Michel
On Mar 1, 8:03 pm, "Irene Polikoff" <[email protected]> wrote:
> Hi Michael,
>
> It seems that you are trying to create a new resource - denoted by
> ?IfcRectangleProfileDef variable.
>
> You then want to connect it to the current resource (?this) and give it some
> values.
>
> Your current query does not do the creation. To do this you need to create a
> URI for the new resource. It can be based on the URI of ?this resource. One
> approach would be to take its URI and append "Area" to it or something like
> that.
>
> Take a look, for example, at smf:buildURI function in the Help Reference.
> You may also want to CONSTRUCT a rdf:type triple for the new resource.
>
> Regards,
>
> Irene Polikoff
>
> -----Original Message-----
> From: [email protected]
>
> [mailto:[email protected]] On Behalf Of Bohms, H.M.
> (Michel)
> Sent: Sunday, March 01, 2009 1:22 PM
> To: [email protected]
> Subject: [tbc-users] Re: Trying to CONSTRUCT a graph involving more than 1
> triple template (TBC version 3.0.0.62)
>
> Dear Scot,
>
> Wrt equivalence/sameas: ok I see, but for now I kept this in owl semantics
>
> Wrt your last sentence....ok we're getting closer....my first response would
> be: it has no value because I want to construct it!
>
> I.e. based on the semantic Wall property values I want to construct a 'less
> semantic' representation. In the bounding box case the bounding box instance
> is created by the swiwt inference (based on the equivalence relationship),
> next the values for the bounding box properties are calculated via the LET
> statement. For the other representation, the extruded solid it a bit more
> complex because it has no direct properties (that can be derived like in the
> bounding box case) but it has a link to some other class
> IfcRectangleProfileDef that has to be instantiated first and then this one
> has properties that can be calculated.
>
> I thought that the CONSTRUCT statement could actually do this (including the
> construction of the intermediate classes).
>
> Hmmmm, any further advide very much apprec.
> MIchel
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Scott
> Henninger
> Sent: 01 March 2009 16:56
> To: TopBraid Composer Users
> Subject: [tbc-users] Re: Trying to CONSTRUCT a graph involving more than 1
> triple template (TBC version 3.0.0.62)
>
> Michel; Yes you can do owl:same as inferences with SPIN. The following is
> a spin:rule that will infer all of the properties that make instances
> equivalent:
> CONSTRUCT
> { ?this ?aprop ?value .
> ?arsc ?aprop2 ?value2 .
> }
> WHERE
> { ?this owl:sameAs ?arsc .
> ?arsc ?aprop ?value .
> ?this ?aprop2 ?value2 .
> }
>
> If you don't want, for example, type triples to be inferred, you can filter
> these with FILTER ((?aprop2 != rdf:type) && (?aprop != rdf:type)). In this
> way it is more flexible than OWL semantics.
>
> Also, in your script, you have the following in your
> IfcExtrudedAreaSoliddefinition:
>
> CONSTRUCT {
> ?this :Depth ?Depth .
> ?this :SweptArea ?IfcRectangleProfileDef .
> ?IfcRectangleProfileDef :XDim ?XDim .
> ?IfcRectangleProfileDef :YDim ?YDim .
> }
> WHERE {
> ?this :height ?height .
> ?this :lenght ?length .
> ?this :width ?width .
> LET (?Depth := ?height) .
> LET (?XDim := ?length) .
> LET (?YDim := ?width) .
> }
>
> This fail to construct any triples because ?IfcRectangleProfileDef is not
> bound to avalue.
>
> -- Scott
>
> On Mar 1, 5:09 am, "Bohms, H.M. (Michel)" <[email protected]> wrote:
> > Hi Scot,
>
> > - unfort. TopSpin first doesn't solve the problem.
> > - I have OWLIM in to do the inference of the equivalent instances...
> > (assuming TopSpin does not do this...maybe wrong...)
>
> > Cheers, Michel
>
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]] On Behalf Of Scott
> > Henninger
> > Sent: 26 February 2009 16:10
> > To: TopBraid Composer Users
> > Subject: [tbc-users] Re: Trying to CONSTRUCT a graph involving more
> > than 1 triple template (TBC version 3.0.0.62)
>
> > Michel; Thanks for sending both the ontology and .tbc file! I took a look
> at the SPIN rules and don't see a obvious issues. I'm unclear on what what
> role the OWLIM inference plays in your inferences, but it seems to me that
> reversing the order of inference engines may work.
> > I.e. running TopSPIN first, then OWLIM.
>
> > -- Scott
>
> > On Feb 26, 6:45 am, Michel Bohms <[email protected]> wrote:
> > > Dear all,
>
> > > I try to use SPIN/Sparql for mapping from one ontology to another,
> > > actually from a semantic ontology featuring a Wall with a length,
> > > width and height to two alternative, derived representations: one in
> > > the form of a BoundingBox, one in the form of a ExtrudedAreaSolid.
>
> > > The first one is quite simple and is easily inferred with combo of
> > > Swift/TopSpin (the spin:rule is also trivial) The second is giving
> > > me problems since the CONTRUCT graph is more complex here.
>
> > > Currently I cannot find many examples for such situations so maybe I
> > > am making some sparql mistake in my spin:rule.
>
> > > For the moment the base mapping is started by making Wall and the
> > > two reps. equivalent classes (so that SWIFT starts to
> > > infer/construct the reps first; maybe I change this later in "no
> > > equivalence+adapted rules" ie construct the rep classes first in my
> > > CONSTRUCT after adding an objectproperty like "representation" for Wall,
> but this aside).
> > > Next I try to construct via my rule the properties of the
> > > ExtrudedAreaSolid. Since this is an objectproperty ("SweptArea") I
> > > also want to construct properties "further in the graph".
>
> > > After inferring however, the are not even instances of the SweptArea
> > > range class (being "IfcRectangleProfileDef", let alone values for
> > > its properties calculated via the LET clauses (XDim and YDim).
>
> > > What I can think of is that the reasoners have problems with the
> > > underlying types of the involved datatype properties, not being
> > > simple floats, but user-defined datatypes (PostiveLengthMeasures).
> > > However, guess this cause is unlikely.
>
> > > Any help very much appreciated! (when I get this one to work I have
> > > the feeling I get get 'anything' to work with SPIN/Sparql ...:)
>
> > > Michel Bohms
>
> > > ps
> > > I hope the attachments work
>
> > > mu .owl.tbc file content:
> > > # Saved by TopBraid on Thu Feb 26 13:23:15 CET 2009 # baseURI: null
>
> > > @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
> > > @prefix inference: <http://www.topbraid.org/2007/06/inference.owl#> .
> > > @prefix visual: <http://topbraid.org/visual#> .
> > > @prefix owl: <http://www.w3.org/2002/07/owl#> .
> > > @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
> > > @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> > > @prefix forms: <http://www.topbraid.org/2007/01/forms.owl#> .
> > > @prefix composite: <http://www.topbraid.org/2007/05/composite.owl#> .
>
> > > [] a inference:Configuration ;
> > > composite:child
> > > [ a inference:SwiftOWLIMEngine ;
> > > composite:index "0"^^xsd:int
> > > ] ;
> > > composite:child
> > > [ a <http://spinrdf.org/spin#TopSPIN> ;
> > > composite:index "1"^^xsd:int
> > > ] .
>
> > > my ontology (cannot find how to have attachments to this mail...):
>
> > > <?xml version="1.0"?>
> > > <rdf:RDF
> > > xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
> > > xmlns="http://www.tno.nl/mapping2#"
> > > xmlns:spin="http://spinrdf.org/spin#"
> > > xmlns:sp="http://spinrdf.org/sp#"
> > > xmlns:owl="http://www.w3.org/2002/07/owl#"
> > > xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
> > > xmlns:owl11="http://www.w3.org/2006/12/owl11#"
> > > xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
> > > xmlns:spl="http://spinrdf.org/spl#"
> > > xml:base="http://www.tno.nl/mapping2">
> > > <owl:Ontology rdf:about="">
> > > <owl:versionInfo rdf:datatype="http://www.w3.org/2001/
> > > XMLSchema#string"
> > > >Created with TopBraid Composer</owl:versionInfo>
> > > <owl:imports rdf:resource="http://spinrdf.org/spin"/>
> > > </owl:Ontology>
> > > <owl:Class rdf:ID="IfcParameterizedProfileDef">
> > > <rdfs:subClassOf>
> > > <owl:Class rdf:ID="IfcProfileDef"/>
> > > </rdfs:subClassOf>
> > > </owl:Class>
> > > <owl:Class rdf:ID="Wall">
> > > <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/
> > > owl#Thing"/>
> > > </owl:Class>
> > > <owl:Class rdf:ID="IfcBoundingBox">
> > > <owl:equivalentClass rdf:resource="#Wall"/>
> > > <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/
> > > owl#Thing"/>
> > > <spin:rule>
> > > <sp:Construct>
> > > <sp:templates rdf:parseType="Collection">
> > > <rdf:Description>
> > > <sp:object>
> > > <rdf:Description rdf:nodeID="A0">
> > > <sp:varName rdf:datatype="http://www.w3.org/2001/
> > > XMLSchema#string"
> > > >XDim</sp:varName>
> > > </rdf:Description>
> > > </sp:object>
> > > <sp:predicate>
> > > <owl:DatatypeProperty rdf:ID="XDim"/>
> > > </sp:predicate>
> > > <sp:subject
> > > rdf:resource="http://spinrdf.org/spin#_this"/>
> > > </rdf:Description>
> > > <rdf:Description>
> > > <sp:object>
> > > <rdf:Description rdf:nodeID="A1">
> > > <sp:varName rdf:datatype="http://www.w3.org/2001/
> > > XMLSchema#string"
> > > >YDim</sp:varName>
>
> ...
>
> read more »
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TopBraid Composer Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-composer-users?hl=en
-~----------~----~----~----~------~----~------~--~---