Bruce; I'm going to pick off a few pieces to see what helps.

On 8/26/11 8:10 PM, brucewhealton wrote:
Ok, I was able to open the XML file and see Classes and properties.
However, when I opened Associations, it was empty.

Associaitons are by the chosen property.  Given that you opened this in Semantic XML, right-click on the property composite:child and choose "Show in Associations view".
I got a bit lost here:
   Import it into a RDF file?
If you want to get more sophisticated, and want to control which
class
that an instance has as its type, then you can construct an ontology
where you define the sub-class hierarchy and attach sxml:element
annotations on the classes, with element tag of the instance as the
value of the annotation. Then, you can import an XML file through
Imports View, and the SXML instances will have these annotated
classes
as their type. If you want more sophisticated and more customized
structure, you can write SPIN rules (SPARQL Rules), where you can
construct new triples on the existing SXML triples.

I could use the vocabularies that already exist like BIO, REL and
FOAF.  So, in the Genealogy XML file, I'd start by wanting the Class
Person to be
made an equivalent Class with foaf:Person or a subclass of
foaf:Person, not sure which.  Then I'd have some Event classes that
would relate to the BIO vocabulary.  So, I do have sxml:Node as a
Class and under that most of the data from the xml file is in the
sxml:TextNode.  

I'd suggest starting by taking a look at Help > Import and Export > Creating, Importing, Querying, Saving XML documents with Semantic XML

That will show that an Semantic XML will convert each element to an OWL class and each occurrence of the element in the document is an instance.  See the section on "How does Semantic XML work".


There are 968 Instances here.  

There were comments earlier on "instance" data that could necessitate being explicit about this - 968 instances is really, really small.  There would be no problem processing small data like this.

In Composer, and RDF in general, an "instance" is a triple that has a type triple to some class definition.  Take, for example:

  :myInst rdfs:label "It's just an RDF resource, a URI" .
  :myInst rdf:type :ClassA .
  :ClassA rdf:type owl:Class .

:myInst is a "instance" only by virtue of the {:myInst rdf:type :ClassA } triple.  That's it.  As a bonus, though, {:ClassA rdf:type owl:Class .} defines :ClassA as a "class" - a member of owl:Class.

"Instances" are just RDF triples.  Nothing more than that and the fact that one of the triples says its a member of some class.


I wouldn't want to
connect this with any ontology because we have different types of data
in this class sxml:TextNode.
Maybe I want <PERSON> from the imported XML file to be of type
foaf:Person instead of a subproperty of foaf:Person.

I'm not entirely clear what you're looking for here.  One thing you can try to experiment with is to create some SPARQL CONSTRUCT triples to transform the XML data to your model.  It would look something like:

CONSTRUCT
{   ?someone a foaf:Person .
}
WHERE
{   ?someone a :Person # where "Person would be from the Genealogy XML file
}

Do that in the SPARQL view and you can choose the results you want and either assert or infer them in your model. 

From there you can start looking into SPIN as a way to so this systematically (a SPIN rule apply to all member of the class the rule is defined in). 

SPINMap is also worth looking into as a way to map the XML data to your model - see Help > SPIN > Ontology Mapping with SPINMap
.

--
Scott Henninger
Sr, Product & Support Engineer, TopQuadrant, Inc.,
tel: 402-429-3751 / fax: 703 991-8192 / main: 703 299-9330
Training:
   Semantic Technology Training and Intro to TopBraid - Sept. 12-15, 2011, Washington, DC
   TopBraid Advanced Products Training - Sept. 26-29, 2011, Washington, DC
TQ Blog: Voyages of the Semantic Enterprise

--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
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-users?hl=en

Reply via email to