1 19 20 package com.hp.hpl.jena.ontology; 23 24 25 import com.hp.hpl.jena.ontology.impl.*; 28 import com.hp.hpl.jena.vocabulary.*; 29 30 import java.util.*; 31 32 33 43 public class ProfileRegistry { 44 47 48 public static final String OWL_LANG = OWL.FULL_LANG.getURI(); 49 50 51 public static final String OWL_DL_LANG = OWL.DL_LANG.getURI(); 52 53 54 public static final String OWL_LITE_LANG = OWL.LITE_LANG.getURI(); 55 56 57 public static final String DAML_LANG = DAML_OIL.NAMESPACE_DAML_2001_03_URI; 58 59 60 public static final String RDFS_LANG = RDFS.getURI(); 61 62 63 66 private static Object [][] s_initData = new Object [][] { 67 {OWL_LANG, new OWLProfile()}, 68 {OWL_DL_LANG, new OWLDLProfile()}, 69 {OWL_LITE_LANG, new OWLLiteProfile()}, 70 {DAML_LANG, new DAML_OILProfile()}, 71 {RDFS_LANG, new RDFSProfile()} 72 }; 73 74 75 76 private static ProfileRegistry s_instance = new ProfileRegistry(); 77 78 79 82 83 private Map m_registry = new HashMap(); 84 85 86 89 94 private ProfileRegistry() { 95 for (int i = 0; i < s_initData.length; i++) { 96 registerProfile( (String ) s_initData[i][0], (Profile) s_initData[i][1] ); 97 } 98 } 99 100 101 104 111 public static ProfileRegistry getInstance() { 112 return s_instance; 113 } 114 115 116 124 public void registerProfile( String uri, Profile profile ) { 125 m_registry.put( uri, profile ); 126 } 127 128 129 137 public Profile getProfile( String uri ) { 138 return (Profile) m_registry.get( uri ); 139 } 140 141 142 145 149 } 150 151 152 181 182 | Popular Tags |