1 6 7 package com.hp.hpl.jena.rdf.model; 8 9 import com.hp.hpl.jena.vocabulary.*; 10 import com.hp.hpl.jena.rdf.model.impl.*; 11 12 import java.util.*; 13 14 25 public class ModelMakerCreatorRegistry 26 { 27 30 private ModelMakerCreatorRegistry() 31 {} 32 33 36 private static Map creators = new HashMap(); 37 38 45 public static ModelMakerCreator findCreator( Resource type ) 46 { return (ModelMakerCreator) creators.get( type ); } 47 48 54 public static void register( Resource type, ModelMakerCreator mmc ) 55 { creators.put( type, mmc ); } 56 57 61 private static final ModelMakerCreator defaultMakerCreator = new MemMakerCreator(); 62 63 68 static 69 { 70 register( JenaModelSpec.MakerSpec, defaultMakerCreator ); 71 register( JenaModelSpec.FileMakerSpec, new FileMakerCreator() ); 72 register( JenaModelSpec.MemMakerSpec, new MemMakerCreator() ); 73 register( JenaModelSpec.RDBMakerSpec, new RDBMakerCreator() ); 74 } 75 } 76 77 78 | Popular Tags |