I want to create a RDFS schema about venue info which contains for example:
address info and xxx
info.
I find another schema about it:https://schema.org/Place. It contains more properties about address info but no info about xxx
.
So
Should I make my schema venue as a subclass of https://schema.org/Place and add new properties?
<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:place="https://schema.org/Place#"
xml:base="http://localhost:3000/VenueSchema#">
<rdfs:Class rdf:ID="Venue">
<rdfs:subClassOf rdf:resource="https://schema.org/Place"/>
</rdfs:Class>
<rdf:Property rdf:ID="xxx">
<rdfs:domain rdf:resource= "#Venue">
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
</rdf:Property>
</rdf:RDF>
If I use subclass, does the venue automatically have properties from the https://schema.org/Place?
Or instead of subclassing, I should just reuse https://schema.org/Place but declare extra properties for https://schema.org/Place? Something like the following code:
<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:place="https://schema.org/Place#"
xml:base="http://localhost:3000/VenueSchema#">
<rdf:Property rdf:ID="xxx">
<rdfs:domain rdf:resource= "https://schema.org/Place">
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
</rdf:Property>
</rdf:RDF>
Should I make my schema venue as a subclass of https://schema.org/Place and add new properties?
If you're declaring a describing a class Venue, it makes sense to make it a subclass of some other Place class that someone else has declared, if you want to achieve some measure of interoperability with that vocabulary. That just means you'd do Venue rdfs:subClassOf Place.
If I use subclass, does the venue automatically have properties from the https://schema.org/Place?
RDFS (and OWL) classes aren't quite the same thing as classes in an object oriented programming language. Properties don't "belong" to classes, and classes don't "inherit" properties from their superclasses.
When you say that the domain of a property P is a class D, it means that that when you have a triple x P y, you can infer that x rdf:type D.
So, you can use any of the properties that have the domain Place with your instances of Venue, and you won't be inferring any additional information about them (except for the property assertion).
That is, if you already know that v is a Venue, and use a property p whose domain is Place with it, you can infer that v is a Place, but you could already do that because you asserted that Venue is a subclass of Place.
Or instead of subclassing, I should just reuse https://schema.org/Place but declare extra properties for https://schema.org/Place? Something like the following code:
You can declare new properties that have Place as a domain as well. All that the domain axioms mean is that if the property is used with some individual, then you can infer that the individual is a Place.