Hello friends, my question is,

Pub is a Class and haveBeer is a property of Pub.

And

Beer is a class with other properties

Then:

Pub -> haveBeer -> XXX

Where XXX is a instance of Beer

Then, How can I create an instance (XXX) of a class Beer

Thanks.

Comments

scor’s picture

Neologism cannot be used to create instances. you can use RDF CCK in conjunction with Drupal nodes, nodes will be instances of a content type beer, which you can map to the Beer class you created in Neologism. Create also a content type for Pub, and link the 2 with a node reference field (which you can map to haveBeer with RDF CCK).

krao’s picture

Thank scor,

Well then echo it, how to export the data to RDF/XML. Any idea.

Example,

MyInstancePubRock is a instance of Pub, and MyInstaceColdBeer is a instance of Beer

<Pub rdf:ID="MyInstancePubRock">
    <haveBeer>
      <Beer rdf:ID="MyInstaceColdBeer">
        <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">MyInstaceColdBeer</rdfs:label>
      </Beer>
    </haveBeer >
    <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">MyInstancePubRock</rdfs:label>
  </Pub>
scor’s picture

the RDF/XML you pasted above looks good as an instance. What is your question? Have you tried RDF CCK?

krao’s picture

Yes. I am using rdfcck. My question is, how can I export my instances (MyInstancePubRockand MyInstaceColdBeer) to RDF/XML, as in the example above.

MyInstancePubRock is an instance (node) type Pub; and Pub es un node type create whith rdfcck.
Pub has a property called haveBeer (is a node reference whith Beer), create whith rdfcck
MyInstaceColdBeer is an instance (node) type Pub; and Pub es un node type create whith rdfcck

scor’s picture

add /rdf to the path of the node, for example /node/3/rdf. This will output the RDF data about the node. by default the RDF module will output JSON, so go to admin/settings/rdf to change the serialization format to RDF/XML.

Anonymous’s picture

Status: Active » Closed (cannot reproduce)

No response for two years, closing.