if (ModelingConfiguration.getPropertiesDirect()) {
if (this.ontologyManager.isConnectedByDirectProperty(sourceUri, targetUri) ||
this.ontologyManager.isConnectedByDirectProperty(targetUri, sourceUri)) {
logger.debug( sourceUri + " and " + targetUri + " are connected by a direct object property.");
link = new CompactObjectPropertyLink(id, ObjectPropertyType.Direct);
addLink(source, target, link);
connected = true;
}
}
if (ModelingConfiguration.getPropertiesIndirect() && !connected) {
if (this.ontologyManager.isConnectedByIndirectProperty(sourceUri, targetUri) ||
this.ontologyManager.isConnectedByIndirectProperty(targetUri, sourceUri)) {
logger.debug( sourceUri + " and " + targetUri + " are connected by an indirect object property.");
link = new CompactObjectPropertyLink(id, ObjectPropertyType.Indirect);
addLink(source, target, link);
connected = true;
}
}
if (ModelingConfiguration.getPropertiesWithOnlyRange() && !connected) {
if (this.ontologyManager.isConnectedByDomainlessProperty(sourceUri, targetUri) ||
this.ontologyManager.isConnectedByDomainlessProperty(targetUri, sourceUri)) {
logger.debug( sourceUri + " and " + targetUri + " are connected by an object property whose range is " + sourceUri + " or " + targetUri);
link = new CompactObjectPropertyLink(id, ObjectPropertyType.WithOnlyRange);
addLink(source, target, link);
connected = true;
}
}
if (ModelingConfiguration.getPropertiesWithOnlyDomain() && !connected) {
if (this.ontologyManager.isConnectedByRangelessProperty(sourceUri, targetUri) ||
this.ontologyManager.isConnectedByRangelessProperty(targetUri, sourceUri)) {
logger.debug( sourceUri + " and " + targetUri + " are connected by an object property whose domain is " + sourceUri + " or " + targetUri);
link = new CompactObjectPropertyLink(id, ObjectPropertyType.WithOnlyDomain);
addLink(source, target, link);
connected = true;
}
}
if (ModelingConfiguration.getPropertiesSubClass() && !connected) {
if (this.ontologyManager.isSubClass(sourceUri, targetUri, false) ||
this.ontologyManager.isSubClass(targetUri, sourceUri, false)) {
logger.debug( sourceUri + " and " + targetUri + " are connected by a subClassOf relation.");
link = new CompactSubClassLink(id);
addLink(source, target, link);
connected = true;
}
}
if (ModelingConfiguration.getPropertiesWithoutDomainRange() && !connected) {
if (this.ontologyManager.isConnectedByDomainlessAndRangelessProperty(sourceUri, targetUri)) {// ||
// this.ontologyManager.isConnectedByDomainlessAndRangelessProperty(targetUri, sourceUri)) {
link = new CompactObjectPropertyLink(id, ObjectPropertyType.WithoutDomainAndRange);
addLink(source, target, link);
connected = true;
}
}