Arthur,

one way of doing this is:

1) Create a subclass of rdfs:Resource, e.g. SSNType
2) Change the rdf:type of that to rdfs:Datatype
3) On the owl:equivalentClass field, type in:

        xsd:string[pattern "d{3}-d{2}-d{4}"]
        
Or enter this as rdfs:subClassOf.

Cheers,
Holger


On May 20, 2010, at 3:03 PM, Arthur Keen wrote:

> I would like to create a social security type to demonstrate the creation of 
> new types in composer and demonstrate the use of xsd:pattern
> 
> I found 2 different examples, one from w3c and the other from a blog and they 
> are different, and that is fine, because I only need one of them to work.  
> How does one create a structure like the W3C example in Composer?
> 
> #From w3c
> Declaration( Datatype( a:SSN ) )
> DatatypeDefinition(
> a:SSN
> DatatypeRestriction( xsd:string xsd:pattern "[0-9]{3}-[0-9]{2}-[0-9]{4}" )
> )
> 
> 
> DataPropertyRange( a:hasSSN a:SSN )
> 
> 
> #from a blog 
> <SocialSecurityDatatype>
>    rdfs:label "Social Security Type"@en ;
>    owl:equivalentClass [
>       a rdfs:Datatype ;
>       owl:onDatatype xsd:string ;
>       owl:withRestrictions ([xsd:pattern "d{3}-d{2}-d{4}"])
>    ] .
> 
> 
> 
> 
> 
> 
> 
> -- 
> 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

-- 
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