use of org.semanticweb.owlapi.model.OWLEntity in project webprotege by protegeproject.
the class OWLEntityReadConverter_TestCase method shouldReadOWLDataProperty.
@Test
public void shouldReadOWLDataProperty() {
when(dbObject.get("type")).thenReturn(EntityType.DATA_PROPERTY.getName());
OWLEntity entity = converter.convert(dbObject);
assertThat(entity.isOWLDataProperty(), is(true));
assertThat(entity.getIRI(), is(iri));
}
use of org.semanticweb.owlapi.model.OWLEntity in project webprotege by protegeproject.
the class OWLEntityReadConverter_TestCase method shouldReadOWLAnnotationProperty.
@Test
public void shouldReadOWLAnnotationProperty() {
when(dbObject.get("type")).thenReturn(EntityType.ANNOTATION_PROPERTY.getName());
OWLEntity entity = converter.convert(dbObject);
assertThat(entity.isOWLAnnotationProperty(), is(true));
assertThat(entity.getIRI(), is(iri));
}
use of org.semanticweb.owlapi.model.OWLEntity in project webprotege by protegeproject.
the class OWLEntityReadConverter_TestCase method shouldReadOWLClass.
@Test
public void shouldReadOWLClass() {
when(dbObject.get("type")).thenReturn(EntityType.CLASS.getName());
OWLEntity entity = converter.convert(dbObject);
assertThat(entity.isOWLClass(), is(true));
assertThat(entity.getIRI(), is(iri));
}
use of org.semanticweb.owlapi.model.OWLEntity in project webprotege by protegeproject.
the class ClassFrame method getSignature.
public Set<OWLEntity> getSignature() {
Set<OWLEntity> result = new HashSet<>();
result.add(subject.getEntity());
for (OWLClassData entry : classEntries) {
result.add(entry.getEntity());
}
for (PropertyValue propertyValue : propertyValues) {
result.addAll(propertyValue.getProperty().getSignature());
result.addAll(propertyValue.getValue().getSignature());
}
return result;
}
use of org.semanticweb.owlapi.model.OWLEntity in project webprotege by protegeproject.
the class IssueBuilder_TestCase method shouldBuildIssueWithoutRemovedTargetEntity.
@Test
public void shouldBuildIssueWithoutRemovedTargetEntity() {
OWLEntity entity = mock(OWLEntity.class);
builder.addTargetEntity(entity, userId, TIMESTAMP);
builder.removeTargetEntity(entity, userId, TIMESTAMP);
Issue issue = builder.build(mentionParser);
assertThat(issue.getTargetEntities(), is(empty()));
}
Aggregations