org.semanticweb.owlapi.model.OWLDataPropertyAssertionAxiom Java Examples

The following examples show how to use org.semanticweb.owlapi.model.OWLDataPropertyAssertionAxiom. 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: GraphOwlVisitor.java    From SciGraph with Apache License 2.0 6 votes vote down vote up
@Override
public Void visit(OWLDataPropertyAssertionAxiom axiom) {
  long individual = getOrCreateNode(getIri(axiom.getSubject()));
  OWLDataProperty property = axiom.getProperty().asOWLDataProperty();
  // TODO: fix this Set<OWLDataRange> ranges = property.getRanges(ontology);
  // Except without the ontology we can't verify the range...
  String propertyName = property.getIRI().toString();
  Optional<Object> literal = OwlApiUtils.getTypedLiteralValue(axiom.getObject());

  if (literal.isPresent()) {
    graph.setNodeProperty(individual, propertyName, literal.get());
    if (mappedProperties.containsKey(propertyName)) {
      graph.addNodeProperty(individual, mappedProperties.get(propertyName), literal.get());
    }
  }
  return null;
}
 
Example #2
Source File: AbstractElkObjectConverter.java    From elk-reasoner with Apache License 2.0 5 votes vote down vote up
@Override
public OWLDataPropertyAssertionAxiom visit(
		ElkDataPropertyAssertionAxiom axiom) {
	return owlFactory_.getOWLDataPropertyAssertionAxiom(
			convert(axiom.getProperty()), convert(axiom.getSubject()),
			convert(axiom.getObject()));
}
 
Example #3
Source File: AbstractOwlAxiomConverterVisitor.java    From elk-reasoner with Apache License 2.0 5 votes vote down vote up
@Override
public T visit(OWLDataPropertyAssertionAxiom axiom) {
	throw new IllegalArgumentException(
			OWLDataPropertyAssertionAxiom.class.getSimpleName()
					+ " cannot be converted to "
					+ getTargetClass().getSimpleName());
}
 
Example #4
Source File: OwlConverter.java    From elk-reasoner with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("static-method")
public ElkDataPropertyAssertionAxiom convert(
		OWLDataPropertyAssertionAxiom owlDataPropertyAssertionAxiom) {
	return new ElkDataPropertyAssertionAxiomWrap<OWLDataPropertyAssertionAxiom>(
			owlDataPropertyAssertionAxiom);
}
 
Example #5
Source File: OwlAxiomConverterVisitor.java    From elk-reasoner with Apache License 2.0 4 votes vote down vote up
@Override
public ElkAxiom visit(OWLDataPropertyAssertionAxiom axiom) {
	return CONVERTER.convert(axiom);
}
 
Example #6
Source File: OwlIndividualAxiomConverterVisitor.java    From elk-reasoner with Apache License 2.0 4 votes vote down vote up
@Override
public ElkAssertionAxiom visit(OWLDataPropertyAssertionAxiom axiom) {
	return CONVERTER.convert(axiom);
}
 
Example #7
Source File: FailingOwlAxiomVisitor.java    From elk-reasoner with Apache License 2.0 4 votes vote down vote up
@Override
public void visit(OWLDataPropertyAssertionAxiom axiom) {
	defaultVisit(axiom);
}
 
Example #8
Source File: AxiomAnnotationTools.java    From owltools with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public OWLAxiom visit(OWLDataPropertyAssertionAxiom axiom) {
	return factory.getOWLDataPropertyAssertionAxiom(axiom.getProperty(), axiom.getSubject(), axiom.getObject(), annotations);
}
 
Example #9
Source File: CardinalityContraintsTools.java    From owltools with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public void visit(OWLDataPropertyAssertionAxiom axiom) {
}