private SampleOntologyDetails createSampleOntology() {
setPrivileges(user, Sets.newHashSet(Privilege.ONTOLOGY_ADD, Privilege.ONTOLOGY_PUBLISH));
getWorkspaceRepository().add(workspaceId, "Junit Workspace", user);
Concept publicConcept = createConcept(PUBLIC_CONCEPT_IRI, PUBLIC_DISPLAY_NAME, PUBLIC);
Concept sandboxedConcept = createConcept(SANDBOX_CONCEPT_IRI, SANDBOX_DISPLAY_NAME, workspaceId);
Relationship publicRelationship = createRelationship(PUBLIC_RELATIONSHIP_IRI, PUBLIC);
Relationship sandboxedRelationship = createRelationship(SANDBOX_RELATIONSHIP_IRI, workspaceId);
OntologyProperty publicProperty = createProperty(PUBLIC_PROPERTY_IRI, PUBLIC_DISPLAY_NAME, publicConcept, publicRelationship, PUBLIC);
OntologyProperty sandboxedProperty = createProperty(SANDBOX_PROPERTY_IRI, SANDBOX_DISPLAY_NAME, Arrays.asList(publicConcept, sandboxedConcept), Arrays.asList(publicRelationship, sandboxedRelationship), workspaceId);
OntologyProperty sandboxedPropertyOnlySandboxedConcept = createProperty(SANDBOX_PROPERTY_IRI_ONLY_SANDBOXED_CONCEPT, SANDBOX_DISPLAY_NAME, Arrays.asList(sandboxedConcept), Arrays.asList(), workspaceId);
getOntologyRepository().clearCache();
return new SampleOntologyDetails(
publicConcept.getId(), publicRelationship.getId(), publicProperty.getId(),
sandboxedConcept.getId(),
sandboxedRelationship.getId(), sandboxedProperty.getId(), sandboxedPropertyOnlySandboxedConcept.getId());
}