I want to model ontological knowledge with rdf/rdfs. Therefore, I define that A is a class which corresponds to my first triple. Then I want to say that (instances of) this class has always a property called "hasName" and the object in this statement is from the type Literal (String). My triples look like as follows in Turtle syntax:
<http://www.example.com/A> <rdf:type> <rdfs:Class> .
<http://www.example.com/A> <http://www.example.com/hasName> <rdfs:Literal> .
Would the second triple express the meaning I stated previously? Or what would its meaning be?
Thanks in advance
Your triple says the class is annotated with the Literal IRI.
To express the range of the property you need a range axiom. The OWL to RDF mapping page at W3C shows what the triple for that looks like.
https://www.w3.org/TR/owl2-mapping-to-rdf/
To express that each instance of A has a property you need to make A a subclass of an existential restriction (same page as above has examples).