Skip to content

Commit 8ca9382

Browse files
committed
Make get/set additional property URIs public and update docs
1 parent 55b64f9 commit 8ca9382

2 files changed

Lines changed: 58 additions & 6 deletions

File tree

src/ubic/basecode/ontology/jena/AbstractOntologyService.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,7 @@ public void setSearchEnabled( boolean searchEnabled ) {
168168
this.nextSearchEnabled = searchEnabled;
169169
}
170170

171-
/**
172-
* The set of properties relation to use when inferring parents and children.
173-
* <p>
174-
* The default is to use {@link BFO#partOf} and {@link RO#properPartOf}.
175-
*/
171+
@Override
176172
public Set<String> getAdditionalPropertyUris() {
177173
Lock lock = rwLock.readLock();
178174
try {
@@ -183,6 +179,7 @@ public Set<String> getAdditionalPropertyUris() {
183179
}
184180
}
185181

182+
@Override
186183
public void setAdditionalPropertyUris( Set<String> additionalPropertyUris ) {
187184
this.nextAdditionalPropertyUris = additionalPropertyUris;
188185
}

src/ubic/basecode/ontology/providers/OntologyService.java

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,18 @@
1212

1313
public interface OntologyService {
1414

15+
/**
16+
* Check if this ontology will process imports.
17+
* <p>
18+
* If disabled, ontologies imported by this ontology will not be loaded.
19+
*/
1520
boolean getProcessImports();
1621

22+
/**
23+
* Allow of forbid this ontology to process imports.
24+
* <p>
25+
* Changes are applicable only if the service is re-initialized.
26+
*/
1727
void setProcessImports( boolean processImports );
1828

1929
enum LanguageLevel {
@@ -31,8 +41,18 @@ enum LanguageLevel {
3141
LITE
3242
}
3343

44+
/**
45+
* Obtain the OWL language level supported by this ontology.
46+
* <p>
47+
* The default is to use {@link LanguageLevel#FULL}.
48+
*/
3449
LanguageLevel getLanguageLevel();
3550

51+
/**
52+
* Set the OWL language level supported by this ontology.
53+
* <p>
54+
* Changes are applicable only if the service is re-initialized.
55+
*/
3656
void setLanguageLevel( LanguageLevel languageLevel );
3757

3858
enum InferenceMode {
@@ -41,7 +61,7 @@ enum InferenceMode {
4161
*/
4262
NONE,
4363
/**
44-
* Only basic inference is supported for {@code subClassOf} and {@code subPropertyOf}.
64+
* Only basic inference is supported for {@code rdfs:subClassOf} and {@code rdfs:subPropertyOf}.
4565
* <p>
4666
* This is the fastest inference mode.
4767
*/
@@ -64,6 +84,8 @@ enum InferenceMode {
6484

6585
/**
6686
* Obtain the inference mode used for this ontology.
87+
* <p>
88+
* The default is {@link InferenceMode#TRANSITIVE}.
6789
*/
6890
InferenceMode getInferenceMode();
6991

@@ -74,10 +96,43 @@ enum InferenceMode {
7496
*/
7597
void setInferenceMode( InferenceMode inferenceMode );
7698

99+
/**
100+
* Check if this ontology has full-text search enabled.
101+
* <p>
102+
* This is necessary for finding term using full-text queries. If enabled, an index will be generated in during
103+
* initialization by {@link #initialize(boolean, boolean)}.
104+
* <p>
105+
* Search is enabled by default.
106+
* @see #findTerm(String, boolean)
107+
* @see #findIndividuals(String, boolean)
108+
* @see #findResources(String, boolean)
109+
*/
77110
boolean isSearchEnabled();
78111

112+
/**
113+
* Enable or disable search for this ontology.
114+
* <p>
115+
* Changes are only applicable if the service is re-initialized.
116+
*/
79117
void setSearchEnabled( boolean searchEnabled );
80118

119+
/**
120+
* Obtain the URIs used as additional properties when inferring parents and children.
121+
* <p>
122+
* The default is to use <a href="http://purl.obolibrary.org/obo/BFO_0000050">part of</a>, <a href="http://www.obofoundry.org/ro/ro.owl#proper_part_of">proper part of</a>
123+
* and all of their sub-properties if inference is enabled.
124+
* @see #getParents(Collection, boolean, boolean, boolean)
125+
* @see #getChildren(Collection, boolean, boolean, boolean)
126+
*/
127+
Set<String> getAdditionalPropertyUris();
128+
129+
/**
130+
* Set the URIs to be used as additional properties when inferring parents and children.
131+
* <p>
132+
* Changes are applicable only if the service is re-initialized.
133+
*/
134+
void setAdditionalPropertyUris( Set<String> additionalPropertyUris );
135+
81136
/**
82137
* Initialize this ontology service.
83138
*

0 commit comments

Comments
 (0)