1 5 6 package org.joseki; 7 8 import java.util.* ; 9 10 14 public class Joseki 15 { 16 public static String version = "2.1" ; 18 public static String httpHeaderField = "X-Joseki-Server" ; 19 public static String httpHeaderValue = "Joseki-"+version ; 20 21 24 public static final String baseURI = "http://org.joseki/" ; 25 26 public static final String contentTypeN3 = "application/n3" ; 27 public static final String contentTypeRDFXML = "application/rdf+xml" ; 28 public static final String contentTypeNTriples = "application/n-triples" ; 29 30 static final String contentTypeXML = "application/xml" ; 32 static final String contentTypeRDF = "application/rdf" ; 33 34 public static String serverContentType = contentTypeRDFXML ; 35 public static String clientContentType = contentTypeRDFXML ; 36 37 public static String serverActualContentType = null ; 40 41 44 public static boolean serverDebug = false ; 45 public static boolean clientDebug = false ; 46 47 public static String getReaderType(String contentType) 48 { 49 return (String )jenaReaders.get(contentType) ; 50 } 51 52 public static String getWriterType(String contentType) 53 { 54 return (String )jenaWriters.get(contentType) ; 55 } 56 57 public static String setReaderType(String contentType, String writerName) 58 { 59 return (String )jenaReaders.put(contentType, writerName) ; 60 } 61 62 public static String setWriterType(String contentType, String writerName) 63 { 64 return (String )jenaWriters.put(contentType, writerName) ; 65 } 66 67 static Map jenaReaders = new HashMap() ; 68 static { 69 setReaderType(contentTypeN3, "N3") ; 70 setReaderType(contentTypeRDFXML, "RDF/XML") ; 71 setReaderType(contentTypeNTriples, "N-TRIPLE") ; 72 setReaderType(contentTypeXML, "RDF/XML") ; 73 setReaderType(contentTypeRDF, "RDF/XML") ; 74 } 75 76 static Map jenaWriters = new HashMap() ; 77 static { 78 setWriterType(contentTypeN3, "N3") ; 79 setWriterType(contentTypeRDFXML, "RDF/XML-ABBREV") ; 80 setWriterType(contentTypeNTriples, "N-TRIPLE") ; 81 } 82 } 83 84 85 111 112 | Popular Tags |