1 6 7 package com.hp.hpl.jena.vocabulary; 8 9 import com.hp.hpl.jena.graph.*; 10 import com.hp.hpl.jena.rdf.model.*; 11 import com.hp.hpl.jena.shared.*; 12 import com.hp.hpl.jena.util.FileManager; 13 14 24 public class JenaModelSpec 25 { 26 29 public static final String baseURI = "http://jena.hpl.hp.com/2003/08/jms#"; 30 31 34 public static String getURI() 35 { return baseURI; } 36 37 41 public static final Property loadWith = property( "loadWith" ); 42 43 46 public static final Property ontLanguage = property( "ontLanguage" ); 47 48 51 public static final Property docManager = property( "docManager" ); 52 53 56 public static final Property hasConnection = property( "hasConnection" ); 57 58 62 public static final Property importMaker = property( "importMaker" ); 63 64 67 public static final Property reasonsWith = property( "reasonsWith" ); 68 69 72 public static final Property ruleSetURL = property( "ruleSetURL" ); 73 74 77 public static final Property ruleSet = property( "ruleSet" ); 78 79 82 public static final Property modelName = property( "modelName" ); 83 84 87 public static final Property schemaURL = property( "schemaURL" ); 88 89 92 public static final Property hasRule = property( "hasRule" ); 93 94 97 public static final Property policyPath = property( "policyPath" ); 98 99 103 public static final Property dbUser = property( "dbUser" ); 104 105 109 public static final Property dbPassword = property( "dbPassword" ); 110 111 115 public static final Property dbURL = property( "dbURL" ); 116 117 121 public static final Property dbType = property( "dbType" ); 122 123 127 public static final Property dbClass = property( "dbClass" ); 128 129 132 public static final Property maker = property( "maker" ); 133 134 137 public static final Property reificationMode = property( "reificationMode" ); 138 139 143 public static final Property reasoner = property( "reasoner" ); 144 145 149 public static final Property fileBase = property( "fileBase" ); 150 151 155 public static final Property typeCreatedBy = property( "typeCreatedBy" ); 156 157 160 public static final Resource MakerSpec = resource( "MakerSpec" ); 161 162 165 public static final Resource FileMakerSpec = resource( "FileMakerSpec" ); 166 167 170 public static final Resource MemMakerSpec = resource( "MemMakerSpec" ); 171 172 175 public static final Resource RDBMakerSpec = resource( "RDBMakerSpec" ); 176 177 180 public static final Resource ModelSpec = resource( "ModelSpec" ); 181 182 185 public static final Resource DefaultModelSpec = resource( "DefaultModelSpec" ); 186 187 190 public static final Resource PlainModelSpec = resource( "PlainModelSpec" ); 191 192 195 public static Resource FileModelSpec = resource( "FileModelSpec" ); 196 197 200 public static final Resource InfModelSpec = resource( "InfModelSpec" ); 201 202 205 public static final Resource OntModelSpec = resource( "OntModelSpec" ); 206 207 210 public static final Resource rsStandard = resource( "rsStandard" ); 211 212 215 public static final Resource rsMinimal = resource( "rsMinimal" ); 216 217 220 public static final Resource rsConvenient = resource( "rsConvenient" ); 221 222 225 static protected Model schema = null; 226 227 235 public static Model getSchema() 236 { 237 if (schema == null) 238 schema = ModelFactory.createRDFSModel( FileManager.get().loadModel 239 ( "vocabularies/jena-model-spec.n3" ) ); 240 return schema; 241 } 242 243 246 protected static Resource resource( String ln ) 247 { return ResourceFactory.createResource( baseURI + ln ); } 248 249 252 protected static Property property( String ln ) 253 { return ResourceFactory.createProperty( baseURI + ln ); } 254 255 263 public static Node styleAsJMS( ReificationStyle style ) 264 { 265 if (style == ReificationStyle.Minimal) return JenaModelSpec.rsMinimal.asNode(); 266 if (style == ReificationStyle.Convenient) return JenaModelSpec.rsConvenient.asNode(); 267 if (style == ReificationStyle.Standard) return JenaModelSpec.rsStandard.asNode(); 268 return null; 269 } 270 271 278 public static ReificationStyle findStyle( RDFNode style ) 279 { return findStyle( style.asNode() ); } 280 281 288 public static ReificationStyle findStyle( Node style ) 289 { 290 if (style.equals(JenaModelSpec.rsStandard.asNode() )) return ReificationStyle.Standard; 291 if (style.equals(JenaModelSpec.rsMinimal.asNode() )) return ReificationStyle.Minimal; 292 if (style.equals( JenaModelSpec.rsConvenient.asNode() )) return ReificationStyle.Convenient; 293 return null; 294 } 295 } 296 297 298 | Popular Tags |