Created
March 11, 2011 21:43
-
-
Save turumbay/866632 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ru.turumbay.jena; | |
import com.hp.hpl.jena.rdf.model.Model; | |
import com.hp.hpl.jena.rdf.model.ModelFactory; | |
public class VCardExample { | |
public static void main(String... args) { | |
Model model = ModelFactory.createDefaultModel(); | |
model.setNsPrefix("vcard", VCard.NS); | |
model.createResource("http://turumbay.ru/me") | |
.addProperty(VCard.fn, "Golberg Ilya") | |
.addProperty(VCard.email, "[email protected]") | |
.addProperty( | |
VCard.n, | |
model.createResource() | |
.addProperty(VCard.given_name, "Ilya") | |
.addProperty(VCard.additional_name, "Y") | |
.addProperty(VCard.family_name, "Golberg")); | |
model.write(System.out, "TURTLE"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment