public abstract class OntologyRepositoryBase extends Object implements OntologyRepository
| Modifier and Type | Field and Description |
|---|---|
static String |
BASE_OWL_IRI |
static String |
COMMENT_OWL_IRI |
static String |
RESOURCE_ENTITY_PNG |
CONFIG_INTENT_CONCEPT_PREFIX, CONFIG_INTENT_PROPERTY_PREFIX, CONFIG_INTENT_RELATIONSHIP_PREFIX, ENTITY_CONCEPT_IRI, ROOT_CONCEPT_IRI, TYPE_CONCEPT, TYPE_PROPERTY, TYPE_RELATIONSHIP, VISIBILITY, VISIBILITY_STRING| Modifier | Constructor and Description |
|---|---|
protected |
OntologyRepositoryBase(Configuration configuration,
LockRepository lockRepository) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConceptTypeFilterToQuery(org.vertexium.query.Query query,
String conceptTypeIri,
boolean includeChildNodes) |
void |
addEdgeLabelFilterToQuery(org.vertexium.query.Query query,
String edgeLabel,
boolean includeChildNodes) |
protected abstract void |
addEntityGlyphIconToEntityConcept(Concept entityConcept,
byte[] rawImg) |
protected abstract OntologyProperty |
addPropertyTo(List<Concept> concepts,
List<Relationship> relationships,
String propertyIri,
String displayName,
PropertyType dataType,
Map<String,String> possibleValues,
Collection<org.vertexium.TextIndexHint> textIndexHints,
boolean userVisible,
boolean searchable,
boolean addable,
boolean sortable,
String displayType,
String propertyGroup,
Double boost,
String validationFormula,
String displayFormula,
com.google.common.collect.ImmutableList<String> dependentPropertyIris,
String[] intents,
boolean deleteable,
boolean updateable) |
org.semanticweb.owlapi.model.OWLOntologyManager |
createOwlOntologyManager(org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration config,
org.semanticweb.owlapi.model.IRI excludeDocumentIRI) |
protected void |
definePropertyOnGraph(org.vertexium.Graph graph,
String propertyIri,
PropertyType dataType,
Collection<org.vertexium.TextIndexHint> textIndexHints,
Double boost,
boolean sortable) |
protected boolean |
determineSearchable(String propertyIri,
PropertyType dataType,
Collection<org.vertexium.TextIndexHint> textIndexHints,
boolean searchable) |
protected File |
findOwlFile(File fileOrDir) |
protected boolean |
getAddable(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity) |
protected String |
getAnnotationValueByUri(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity,
String uri) |
protected static String[] |
getAnnotationValuesByUri(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity,
String uri) |
protected com.google.common.collect.ImmutableList<String> |
getAnnotationValuesByUriOrNull(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity,
String uri) |
protected Double |
getBoost(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity) |
protected abstract List<Concept> |
getChildConcepts(Concept concept) |
protected abstract List<Relationship> |
getChildRelationships(Relationship relationship) |
ClientApiOntology |
getClientApiObject() |
Set<Concept> |
getConceptAndAllChildren(Concept concept) |
Set<Concept> |
getConceptAndAllChildrenByIri(String conceptIRI) |
Concept |
getConceptByIntent(String intent) |
Concept |
getConceptByIRI(String conceptIRI) |
String |
getConceptIRIByIntent(String intent) |
Configuration |
getConfiguration() |
protected boolean |
getDeleteable(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity) |
protected com.google.common.collect.ImmutableList<String> |
getDependentPropertyIris(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity) |
OntologyProperty |
getDependentPropertyParent(String iri) |
protected String |
getDisplayFormula(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity) |
protected String |
getDisplayType(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity) |
static String[] |
getIntents(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity) |
static String |
getLabel(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity) |
protected Iterable<org.semanticweb.owlapi.model.OWLAnnotation> |
getObjectPropertyDomains(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLDataProperty owlDataTypeProperty) |
protected abstract void |
getOrCreateInverseOfRelationship(Relationship fromRelationship,
Relationship inverseOfRelationship) |
OntologyProperty |
getOrCreateProperty(OntologyPropertyDefinition ontologyPropertyDefinition) |
protected Concept |
getParentConcept(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLClass ontologyClass,
File inDir,
org.vertexium.Authorizations authorizations) |
protected Map<String,String> |
getPossibleValues(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity) |
List<OntologyProperty> |
getPropertiesByIntent(String intent) |
OntologyProperty |
getPropertyByIntent(String intent) |
OntologyProperty |
getPropertyByIRI(String propertyIRI) |
protected String |
getPropertyGroup(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity) |
String |
getPropertyIRIByIntent(String intent) |
protected PropertyType |
getPropertyType(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLDataProperty dataTypeProperty) |
Set<Relationship> |
getRelationshipAndAllChildren(Relationship relationship) |
Relationship |
getRelationshipByIntent(String intent) |
Relationship |
getRelationshipByIRI(String relationshipIRI) |
String |
getRelationshipIRIByIntent(String intent) |
Concept |
getRequiredConceptByIntent(String intent) |
Concept |
getRequiredConceptByIRI(String iri) |
String |
getRequiredConceptIRIByIntent(String intent) |
OntologyProperty |
getRequiredPropertyByIntent(String intent) |
OntologyProperty |
getRequiredPropertyByIRI(String propertyIRI) |
String |
getRequiredPropertyIRIByIntent(String intent) |
Relationship |
getRequiredRelationshipByIntent(String intent) |
String |
getRequiredRelationshipIRIByIntent(String intent) |
<T extends VisalloProperty> |
getRequiredVisalloPropertyByIntent(String intent,
Class<T> visalloPropertyType) |
protected boolean |
getSearchable(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity) |
protected boolean |
getSortable(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity) |
protected Collection<org.vertexium.TextIndexHint> |
getTextIndexHints(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLDataProperty owlEntity) |
protected boolean |
getUpdateable(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity) |
protected boolean |
getUserVisible(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity) |
protected String |
getValidationFormula(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity) |
<T extends VisalloProperty> |
getVisalloPropertyByIntent(String intent,
Class<T> visalloPropertyType) |
String |
guessDocumentIRIFromFile(File owlFile) |
String |
guessDocumentIRIFromPackage(File file) |
protected void |
importDataProperty(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLDataProperty dataTypeProperty) |
void |
importFile(File inFile,
org.semanticweb.owlapi.model.IRI documentIRI,
org.vertexium.Authorizations authorizations) |
void |
importFileData(byte[] inFileData,
org.semanticweb.owlapi.model.IRI documentIRI,
File inDir,
org.vertexium.Authorizations authorizations) |
protected void |
importInverseOf(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLObjectProperty objectProperty) |
protected Relationship |
importObjectProperty(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLObjectProperty objectProperty,
org.vertexium.Authorizations authorizations) |
protected void |
importOntologyAnnotationProperties(org.semanticweb.owlapi.model.OWLOntology o,
File inDir,
org.vertexium.Authorizations authorizations) |
protected void |
importOntologyAnnotationProperty(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLAnnotationProperty annotationProperty,
File inDir,
org.vertexium.Authorizations authorizations) |
protected Concept |
importOntologyClass(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLClass ontologyClass,
File inDir,
org.vertexium.Authorizations authorizations) |
void |
importResourceOwl(Class baseClass,
String fileName,
String iri,
org.vertexium.Authorizations authorizations) |
abstract boolean |
isOntologyDefined(String iri) |
void |
loadOntologies(Configuration config,
org.vertexium.Authorizations authorizations) |
protected abstract List<org.semanticweb.owlapi.model.OWLOntology> |
loadOntologyFiles(org.semanticweb.owlapi.model.OWLOntologyManager m,
org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration config,
org.semanticweb.owlapi.model.IRI excludedIRI) |
void |
resolvePropertyIds(org.json.JSONArray filterJson) |
protected void |
setIconProperty(Concept concept,
File inDir,
String glyphIconFileName,
String propertyKey,
org.vertexium.Authorizations authorizations) |
protected abstract void |
storeOntologyFile(InputStream inputStream,
org.semanticweb.owlapi.model.IRI documentIRI) |
void |
writePackage(File file,
org.semanticweb.owlapi.model.IRI documentIRI,
org.vertexium.Authorizations authorizations) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearCache, getConceptsWithProperties, getDisplayNameForLabel, getEntityConcept, getOrCreateConcept, getOrCreateConcept, getOrCreateRelationshipType, getParentConcept, getProperties, getRelationships, hasRelationshipByIRI, updatePropertyDependentIris, updatePropertyDomainIrispublic static final String BASE_OWL_IRI
public static final String COMMENT_OWL_IRI
public static final String RESOURCE_ENTITY_PNG
@Inject protected OntologyRepositoryBase(Configuration configuration, LockRepository lockRepository)
public static String getLabel(org.semanticweb.owlapi.model.OWLOntology o, org.semanticweb.owlapi.model.OWLEntity owlEntity)
public static String[] getIntents(org.semanticweb.owlapi.model.OWLOntology o, org.semanticweb.owlapi.model.OWLEntity owlEntity)
protected static String[] getAnnotationValuesByUri(org.semanticweb.owlapi.model.OWLOntology o, org.semanticweb.owlapi.model.OWLEntity owlEntity, String uri)
public void loadOntologies(Configuration config, org.vertexium.Authorizations authorizations) throws Exception
Exceptionpublic void importResourceOwl(Class baseClass, String fileName, String iri, org.vertexium.Authorizations authorizations)
importResourceOwl in interface OntologyRepositorypublic abstract boolean isOntologyDefined(String iri)
isOntologyDefined in interface OntologyRepositoryprotected abstract void addEntityGlyphIconToEntityConcept(Concept entityConcept, byte[] rawImg)
public String guessDocumentIRIFromPackage(File file) throws IOException, net.lingala.zip4j.exception.ZipException
guessDocumentIRIFromPackage in interface OntologyRepositoryIOExceptionnet.lingala.zip4j.exception.ZipExceptionpublic String guessDocumentIRIFromFile(File owlFile) throws IOException
IOExceptionpublic void importFile(File inFile, org.semanticweb.owlapi.model.IRI documentIRI, org.vertexium.Authorizations authorizations) throws Exception
importFile in interface OntologyRepositoryExceptionpublic void importFileData(byte[] inFileData,
org.semanticweb.owlapi.model.IRI documentIRI,
File inDir,
org.vertexium.Authorizations authorizations)
throws Exception
importFileData in interface OntologyRepositoryExceptionprotected void importOntologyAnnotationProperties(org.semanticweb.owlapi.model.OWLOntology o,
File inDir,
org.vertexium.Authorizations authorizations)
protected void importOntologyAnnotationProperty(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLAnnotationProperty annotationProperty,
File inDir,
org.vertexium.Authorizations authorizations)
public org.semanticweb.owlapi.model.OWLOntologyManager createOwlOntologyManager(org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration config,
org.semanticweb.owlapi.model.IRI excludeDocumentIRI)
throws Exception
createOwlOntologyManager in interface OntologyRepositoryExceptionprotected abstract void storeOntologyFile(InputStream inputStream, org.semanticweb.owlapi.model.IRI documentIRI)
protected abstract List<org.semanticweb.owlapi.model.OWLOntology> loadOntologyFiles(org.semanticweb.owlapi.model.OWLOntologyManager m, org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration config, org.semanticweb.owlapi.model.IRI excludedIRI) throws Exception
Exceptionprotected Concept importOntologyClass(org.semanticweb.owlapi.model.OWLOntology o, org.semanticweb.owlapi.model.OWLClass ontologyClass, File inDir, org.vertexium.Authorizations authorizations) throws IOException
IOExceptionprotected void setIconProperty(Concept concept, File inDir, String glyphIconFileName, String propertyKey, org.vertexium.Authorizations authorizations) throws IOException
IOExceptionprotected Concept getParentConcept(org.semanticweb.owlapi.model.OWLOntology o, org.semanticweb.owlapi.model.OWLClass ontologyClass, File inDir, org.vertexium.Authorizations authorizations) throws IOException
IOExceptionprotected void importDataProperty(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLDataProperty dataTypeProperty)
public OntologyProperty getOrCreateProperty(OntologyPropertyDefinition ontologyPropertyDefinition)
getOrCreateProperty in interface OntologyRepositoryprotected abstract OntologyProperty addPropertyTo(List<Concept> concepts, List<Relationship> relationships, String propertyIri, String displayName, PropertyType dataType, Map<String,String> possibleValues, Collection<org.vertexium.TextIndexHint> textIndexHints, boolean userVisible, boolean searchable, boolean addable, boolean sortable, String displayType, String propertyGroup, Double boost, String validationFormula, String displayFormula, com.google.common.collect.ImmutableList<String> dependentPropertyIris, String[] intents, boolean deleteable, boolean updateable)
protected Relationship importObjectProperty(org.semanticweb.owlapi.model.OWLOntology o, org.semanticweb.owlapi.model.OWLObjectProperty objectProperty, org.vertexium.Authorizations authorizations)
protected void importInverseOf(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLObjectProperty objectProperty)
protected abstract void getOrCreateInverseOfRelationship(Relationship fromRelationship, Relationship inverseOfRelationship)
protected PropertyType getPropertyType(org.semanticweb.owlapi.model.OWLOntology o, org.semanticweb.owlapi.model.OWLDataProperty dataTypeProperty)
protected Iterable<org.semanticweb.owlapi.model.OWLAnnotation> getObjectPropertyDomains(org.semanticweb.owlapi.model.OWLOntology o, org.semanticweb.owlapi.model.OWLDataProperty owlDataTypeProperty)
protected String getDisplayType(org.semanticweb.owlapi.model.OWLOntology o, org.semanticweb.owlapi.model.OWLEntity owlEntity)
protected String getPropertyGroup(org.semanticweb.owlapi.model.OWLOntology o, org.semanticweb.owlapi.model.OWLEntity owlEntity)
protected String getValidationFormula(org.semanticweb.owlapi.model.OWLOntology o, org.semanticweb.owlapi.model.OWLEntity owlEntity)
protected String getDisplayFormula(org.semanticweb.owlapi.model.OWLOntology o, org.semanticweb.owlapi.model.OWLEntity owlEntity)
protected com.google.common.collect.ImmutableList<String> getDependentPropertyIris(org.semanticweb.owlapi.model.OWLOntology o, org.semanticweb.owlapi.model.OWLEntity owlEntity)
protected Double getBoost(org.semanticweb.owlapi.model.OWLOntology o, org.semanticweb.owlapi.model.OWLEntity owlEntity)
protected boolean getUserVisible(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity)
protected boolean getSearchable(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity)
protected boolean getAddable(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity)
protected boolean getSortable(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity)
protected boolean getUpdateable(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity)
protected boolean getDeleteable(org.semanticweb.owlapi.model.OWLOntology o,
org.semanticweb.owlapi.model.OWLEntity owlEntity)
protected Map<String,String> getPossibleValues(org.semanticweb.owlapi.model.OWLOntology o, org.semanticweb.owlapi.model.OWLEntity owlEntity)
protected Collection<org.vertexium.TextIndexHint> getTextIndexHints(org.semanticweb.owlapi.model.OWLOntology o, org.semanticweb.owlapi.model.OWLDataProperty owlEntity)
protected String getAnnotationValueByUri(org.semanticweb.owlapi.model.OWLOntology o, org.semanticweb.owlapi.model.OWLEntity owlEntity, String uri)
protected com.google.common.collect.ImmutableList<String> getAnnotationValuesByUriOrNull(org.semanticweb.owlapi.model.OWLOntology o, org.semanticweb.owlapi.model.OWLEntity owlEntity, String uri)
public void writePackage(File file, org.semanticweb.owlapi.model.IRI documentIRI, org.vertexium.Authorizations authorizations) throws Exception
writePackage in interface OntologyRepositoryExceptionpublic Set<Concept> getConceptAndAllChildrenByIri(String conceptIRI)
getConceptAndAllChildrenByIri in interface OntologyRepositorypublic Set<Concept> getConceptAndAllChildren(Concept concept)
getConceptAndAllChildren in interface OntologyRepositorypublic Set<Relationship> getRelationshipAndAllChildren(Relationship relationship)
getRelationshipAndAllChildren in interface OntologyRepositoryprotected abstract List<Relationship> getChildRelationships(Relationship relationship)
public void resolvePropertyIds(org.json.JSONArray filterJson)
throws org.json.JSONException
resolvePropertyIds in interface OntologyRepositoryorg.json.JSONExceptionpublic Concept getConceptByIRI(String conceptIRI)
getConceptByIRI in interface OntologyRepositorypublic OntologyProperty getPropertyByIRI(String propertyIRI)
getPropertyByIRI in interface OntologyRepositorypublic OntologyProperty getRequiredPropertyByIRI(String propertyIRI)
getRequiredPropertyByIRI in interface OntologyRepositorypublic Relationship getRelationshipByIRI(String relationshipIRI)
getRelationshipByIRI in interface OntologyRepositorypublic Concept getConceptByIntent(String intent)
getConceptByIntent in interface OntologyRepositorypublic String getConceptIRIByIntent(String intent)
getConceptIRIByIntent in interface OntologyRepositorypublic Concept getRequiredConceptByIntent(String intent)
getRequiredConceptByIntent in interface OntologyRepositorypublic String getRequiredConceptIRIByIntent(String intent)
getRequiredConceptIRIByIntent in interface OntologyRepositorypublic Concept getRequiredConceptByIRI(String iri)
getRequiredConceptByIRI in interface OntologyRepositorypublic Relationship getRelationshipByIntent(String intent)
getRelationshipByIntent in interface OntologyRepositorypublic String getRelationshipIRIByIntent(String intent)
getRelationshipIRIByIntent in interface OntologyRepositorypublic Relationship getRequiredRelationshipByIntent(String intent)
getRequiredRelationshipByIntent in interface OntologyRepositorypublic String getRequiredRelationshipIRIByIntent(String intent)
getRequiredRelationshipIRIByIntent in interface OntologyRepositorypublic OntologyProperty getPropertyByIntent(String intent)
getPropertyByIntent in interface OntologyRepositorypublic String getPropertyIRIByIntent(String intent)
getPropertyIRIByIntent in interface OntologyRepositorypublic OntologyProperty getRequiredPropertyByIntent(String intent)
getRequiredPropertyByIntent in interface OntologyRepositorypublic String getRequiredPropertyIRIByIntent(String intent)
getRequiredPropertyIRIByIntent in interface OntologyRepositorypublic OntologyProperty getDependentPropertyParent(String iri)
getDependentPropertyParent in interface OntologyRepositorypublic <T extends VisalloProperty> T getVisalloPropertyByIntent(String intent, Class<T> visalloPropertyType)
getVisalloPropertyByIntent in interface OntologyRepositorypublic <T extends VisalloProperty> T getRequiredVisalloPropertyByIntent(String intent, Class<T> visalloPropertyType)
getRequiredVisalloPropertyByIntent in interface OntologyRepositorypublic List<OntologyProperty> getPropertiesByIntent(String intent)
getPropertiesByIntent in interface OntologyRepositorypublic ClientApiOntology getClientApiObject()
getClientApiObject in interface OntologyRepositorypublic final Configuration getConfiguration()
protected void definePropertyOnGraph(org.vertexium.Graph graph,
String propertyIri,
PropertyType dataType,
Collection<org.vertexium.TextIndexHint> textIndexHints,
Double boost,
boolean sortable)
protected boolean determineSearchable(String propertyIri, PropertyType dataType, Collection<org.vertexium.TextIndexHint> textIndexHints, boolean searchable)
public void addConceptTypeFilterToQuery(org.vertexium.query.Query query,
String conceptTypeIri,
boolean includeChildNodes)
addConceptTypeFilterToQuery in interface OntologyRepositorypublic void addEdgeLabelFilterToQuery(org.vertexium.query.Query query,
String edgeLabel,
boolean includeChildNodes)
addEdgeLabelFilterToQuery in interface OntologyRepositoryCopyright © 2013–2016 V5 Analytics. All rights reserved.