org.semanticweb.owlapi.model.OWLObjectInverseOf Java Examples

The following examples show how to use org.semanticweb.owlapi.model.OWLObjectInverseOf. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OWLInAboxTranslator.java    From owltools with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
/**
 * @param p
 * @return type-level form of relation
 */
private OWLObjectPropertyExpression trTypeLevel(
		OWLObjectPropertyExpression p) {
	if (!this.isTranslateObjectProperty) {
		return p;
	}
	if (p instanceof OWLObjectInverseOf) {
		OWLObjectPropertyExpression p2 = trTypeLevel(((OWLObjectInverseOf)p).getInverse());
		return getOWLDataFactory().getOWLObjectInverseOf(p2);
	}
	else {
		instanceLevelRelations.add((OWLObjectProperty)p);
		IRI iri = ((OWLObjectProperty) p).getIRI();
		return trTypeLevel(iri);
	}
}
 
Example #2
Source File: TemplatedTransformer.java    From owltools with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private BindingSet unify(OWLObjectPropertyExpression p,
		OWLObjectPropertyExpression template,  Set<IRI> vars) {
	if (p instanceof OWLObjectProperty && template instanceof OWLObjectProperty) {
		return unify(((OWLObjectProperty) p).getIRI(),
				((OWLObjectProperty) template).getIRI(),
				vars);
	}
	if (p instanceof OWLObjectInverseOf && template instanceof OWLObjectInverseOf) {
		return unify(((OWLObjectInverseOf)p).getInverse(),
				((OWLObjectInverseOf)template).getInverseProperty(),
				vars);
	}
	return null;
}
 
Example #3
Source File: TemplatedTransformer.java    From owltools with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private OWLObjectPropertyExpression replaceVariables(
		OWLObjectPropertyExpression p, BindingSet bset) {
	if (p instanceof OWLObjectProperty) {
		IRI y = replaceIRI(((OWLObjectProperty)p).getIRI(), bset);
		return getOWLDataFactory().getOWLObjectProperty(y);
	}
	if (p instanceof OWLObjectInverseOf) {
		return getOWLDataFactory().getOWLObjectInverseOf(
				 replaceVariables(((OWLObjectInverseOf)p).getInverse(),
						 bset));
	}
	return null;
}
 
Example #4
Source File: OWLQuantifiedProperty.java    From owltools with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public OWLQuantifiedProperty(OWLObjectPropertyExpression p, Quantifier q) {
	if (p != null) {
		if (p instanceof OWLObjectInverseOf) {
			isInverseOf = true;
			p = ((OWLObjectInverseOf)p).getInverse();
		}
		property = p.asOWLObjectProperty();
	}
	this.quantifier = q;
}
 
Example #5
Source File: NormalizedOWLQLTbox.java    From quetzal with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * returns the key associated with a property expression
 * @param pe
 * @return
 */
public static String getKey(OWLPropertyExpression pe) {
	if (pe.isObjectPropertyExpression()) {
		pe = ((OWLObjectPropertyExpression) pe).getSimplified();
	}
	if (!pe.isAnonymous()) {
		return ((OWLNamedObject) pe).getIRI().toString();
	} else {
		OWLObjectInverseOf ope = (OWLObjectInverseOf) pe;
		OWLObjectProperty op = (OWLObjectProperty) ope.getInverse();
		return op.getIRI().toString();
		
	}
}
 
Example #6
Source File: AbstractElkObjectConverter.java    From elk-reasoner with Apache License 2.0 4 votes vote down vote up
@Override
public OWLObjectInverseOf visit(ElkObjectInverseOf expression) {
	return owlFactory_
			.getOWLObjectInverseOf(convert(expression.getObjectProperty()));
}
 
Example #7
Source File: OwlObjectInverseOfConverterVisitor.java    From elk-reasoner with Apache License 2.0 4 votes vote down vote up
@Override
public ElkObjectPropertyExpression visit(OWLObjectInverseOf property) {
	return property.getInverse().accept(OWL_OBJECT_PROPERTRY_CONVERTER_);
}
 
Example #8
Source File: OwlObjectPropertyExpressionConverterVisitor.java    From elk-reasoner with Apache License 2.0 4 votes vote down vote up
@Override
public ElkObjectPropertyExpression visit(OWLObjectInverseOf property) {
	return property.getInverse().accept(OWL_OBJECT_INVERSE_OF_CONVERTER_);
}
 
Example #9
Source File: TaxonomyImpl.java    From quetzal with Eclipse Public License 2.0 4 votes vote down vote up
public Set<OWLObjectInverseOf> getInverses() {
	return invprops;
}
 
Example #10
Source File: Taxonomy.java    From quetzal with Eclipse Public License 2.0 votes vote down vote up
public Set<OWLObjectInverseOf> getInverses();