1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package ubic.basecode.ontology.providers;
16
17 import com.hp.hpl.jena.ontology.OntModel;
18 import ubic.basecode.ontology.jena.AbstractOntologyMemoryBackedService;
19 import ubic.basecode.ontology.jena.OntologyLoader;
20
21 import ubic.basecode.ontology.jena.AbstractOntologyService;
22
23 import java.io.InputStream;
24
25
26
27
28
29
30 public class GenericOntologyService extends AbstractOntologyMemoryBackedService {
31
32 private final String url;
33 private final String name;
34 private final boolean cache;
35
36 public GenericOntologyService( String name, String url ) {
37 this( name, url, false );
38 }
39
40 public GenericOntologyService( String name, String url, boolean cache ) {
41 this.name = name;
42 this.url = url;
43 this.cache = cache;
44 }
45
46 @Override
47 protected String getOntologyName() {
48 return name;
49 }
50
51 @Override
52 protected String getOntologyUrl() {
53 return url;
54 }
55
56 @Override
57 protected String getCacheName() {
58 return this.cache ? this.name : null;
59 }
60 }