public class GeSchemaRepository extends SchemaRepositoryBase
SchemaRepository.ElementTypeFilter| Modifier and Type | Field and Description |
|---|---|
static String |
ID_PREFIX |
static String |
ID_PREFIX_CONCEPT |
static String |
ID_PREFIX_PROPERTY |
static String |
ID_PREFIX_RELATIONSHIP |
authorizations, MAX_DISPLAY_NAME, TOP_OBJECT_PROPERTY_NAMECONFIG_INTENT_CONCEPT_PREFIX, CONFIG_INTENT_PROPERTY_PREFIX, CONFIG_INTENT_RELATIONSHIP_PREFIX, PUBLIC, ROOT_CONCEPT_NAME, THING_CONCEPT_NAME, TYPE_CONCEPT, TYPE_PROPERTY, TYPE_RELATIONSHIP, VISIBILITY, VISIBILITY_STRING| Constructor and Description |
|---|
GeSchemaRepository(Graph graph,
GraphRepository graphRepository,
VisibilityTranslator visibilityTranslator,
Configuration config,
GraphAuthorizationRepository graphAuthorizationRepository,
CacheService cacheService) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDomainConceptsToRelationshipType(String relationshipName,
List<String> conceptNames,
User user,
String namespace) |
SchemaProperty |
addPropertyTo(List<Concept> concepts,
List<Relationship> relationships,
List<String> extendedDataTableNames,
String propertyName,
String displayName,
PropertyType dataType,
Map<String,String> possibleValues,
Collection<TextIndexHint> textIndexHints,
boolean userVisible,
boolean searchFacet,
boolean systemProperty,
String aggType,
int aggPrecision,
String aggInterval,
long aggMinDocumentCount,
String aggTimeZone,
String aggCalendarField,
boolean searchable,
boolean addable,
boolean sortable,
Integer sortPriority,
String displayType,
String propertyGroup,
Double boost,
String validationFormula,
String displayFormula,
com.google.common.collect.ImmutableList<String> dependentPropertyNames,
String[] intents,
boolean deleteable,
boolean updateable,
User user,
String namespace) |
void |
addRangeConceptsToRelationshipType(String relationshipName,
List<String> conceptNames,
User user,
String namespace) |
void |
clearCache() |
void |
clearCache(String namespace) |
protected Concept |
createConcept(Vertex vertex,
List<SchemaProperty> conceptProperties,
String parentConceptName,
String namespace)
Overridable so subclasses can supply a custom implementation of Concept.
|
protected Concept |
createConcept(Vertex vertex,
String namespace)
Overridable so subclasses can supply a custom implementation of Concept.
|
protected SchemaProperty |
createOntologyProperty(Vertex propertyVertex,
com.google.common.collect.ImmutableList<String> dependentPropertyNames,
PropertyType propertyType,
String namespace)
Overridable so subclasses can supply a custom implementation of OntologyProperty.
|
protected Relationship |
createRelationship(String parentName,
Vertex relationshipVertex,
List<String> inverseOfNames,
List<String> domainConceptNames,
List<String> rangeConceptNames,
Collection<SchemaProperty> properties,
String namespace)
Overridable so subclasses can supply a custom implementation of Relationship.
|
protected void |
deleteChangeableProperties(SchemaElement element,
Authorizations authorizations) |
protected void |
deleteChangeableProperties(SchemaProperty property,
Authorizations authorizations) |
protected void |
findOrAddEdge(GraphUpdateContext ctx,
String fromVertexId,
String toVertexId,
String edgeLabel) |
protected void |
findOrAddEdge(GraphUpdateContext ctx,
Vertex fromVertex,
Vertex toVertex,
String edgeLabel) |
protected void |
findOrAddEdge(Vertex fromVertex,
Vertex toVertex,
String edgeLabel,
User user,
String namespace) |
Authorizations |
getAuthorizations() |
Authorizations |
getAuthorizations(String namespace,
String... otherAuthorizations) |
List<Concept> |
getChildConcepts(Concept concept,
String namespace) |
protected List<Relationship> |
getChildRelationships(Relationship relationship,
String namespace) |
ClientApiSchema |
getClientApiObject(String namespace) |
Concept |
getConceptById(String id) |
Iterable<Concept> |
getConcepts(Iterable<String> ids,
String namespace) |
Iterable<Concept> |
getConceptsByName(List<String> conceptNames,
String namespace) |
Iterable<Concept> |
getConceptsWithProperties(String namespace) |
protected com.google.common.collect.ImmutableList<String> |
getDependentPropertyNames(Vertex vertex,
String namespace) |
String |
getDisplayNameForLabel(String relationshipName,
String namespace) |
protected Graph |
getGraph() |
void |
getOrCreateInverseOfRelationship(Relationship fromRelationship,
Relationship inverseOfRelationship) |
Concept |
getParentConcept(Concept concept,
String namespace) |
Relationship |
getParentRelationship(Relationship relationship,
String namespace) |
Iterable<SchemaProperty> |
getProperties(Iterable<String> ids,
String namespace) |
Iterable<SchemaProperty> |
getProperties(String namespace) |
List<SchemaProperty> |
getPropertiesByIntent(String intent,
String namespace) |
Iterable<SchemaProperty> |
getPropertiesByName(List<String> propertyNames,
String namespace) |
SchemaProperty |
getPropertyById(String id) |
Relationship |
getRelationshipById(String id) |
Iterable<Relationship> |
getRelationships(Iterable<String> ids,
String namespace) |
Iterable<Relationship> |
getRelationships(String namespace) |
Iterable<Relationship> |
getRelationshipsByName(List<String> relationshipNames,
String namespace) |
Concept |
getRootConcept(String namespace) |
Concept |
getThingConcept(String namespace) |
boolean |
hasConceptByName(String conceptName,
String namespace) |
protected void |
internalDeleteConcept(Concept concept,
String namespace) |
protected void |
internalDeleteProperty(SchemaProperty property,
String namespace) |
protected void |
internalDeleteRelationship(Relationship relationship,
String namespace) |
protected Concept |
internalGetOrCreateConcept(Concept parent,
String conceptName,
String displayName,
String glyphIconHref,
String color,
boolean deleteChangeableProperties,
boolean isCoreConcept,
User user,
String namespace) |
protected Relationship |
internalGetOrCreateRelationshipType(Relationship parent,
Iterable<Concept> domainConcepts,
Iterable<Concept> rangeConcepts,
String relationshipName,
String displayName,
boolean isDeclaredInOntology,
boolean coreConcept,
User user,
String namespace) |
void |
internalPublishConcept(Concept concept,
User user,
String namespace) |
void |
internalPublishProperty(SchemaProperty property,
User user,
String namespace) |
void |
internalPublishRelationship(Relationship relationship,
User user,
String namespace) |
protected void |
removeEdge(GraphUpdateContext ctx,
String fromVertexId,
String toVertexId) |
void |
removeInverseOfRelationship(Relationship fromRelationship,
Relationship inverseOfRelationship) |
void |
updatePropertyDependentNames(SchemaProperty property,
Collection<String> dependentPropertyNames,
User user,
String namespace) |
void |
updatePropertyDomainNames(SchemaProperty property,
Set<String> domainNames,
User user,
String namespace) |
addConceptTypeFilterToQuery, addConceptTypeFilterToQuery, addEdgeLabelFilterToQuery, addEdgeLabelFilterToQuery, addEntityGlyphIconToEntityConcept, checkDeletePrivileges, checkPrivileges, definePropertyOnGraph, definePropertyOnGraph, defineRequiredProperties, deleteConcept, deleteProperty, deleteRelationship, determineSearchable, generateDynamicName, generatePropertyDynamicName, getAncestorConcepts, getAncestorRelationships, getConceptAndAllChildren, getConceptAndAllChildrenByName, getConceptAndAncestors, getConceptByIntent, getConceptByName, getConceptNameByIntent, getConfiguration, getDependentPropertyParent, getOntology, getOrCreateConcept, getOrCreateConcept, getOrCreateConcept, getOrCreateConcept, getOrCreateConcept, getOrCreateProperty, getOrCreateRelationshipType, getOrCreateRelationshipType, getOrCreateRootRelationship, getPrivilegeRepository, getPropertyByIntent, getPropertyByIntent, getPropertyByName, getPropertyNameByIntent, getRelationshipAndAllChildren, getRelationshipAndAllChildrenByName, getRelationshipAndAncestors, getRelationshipByIntent, getRelationshipByName, getRelationshipNameByIntent, getRequiredConceptByIntent, getRequiredConceptByName, getRequiredConceptNameByIntent, getRequiredPropertyByIntent, getRequiredPropertyByIntent, getRequiredPropertyByName, getRequiredPropertyNameByIntent, getRequiredRelationshipByIntent, getRequiredRelationshipNameByIntent, getSystemUser, getTopObjectPropertyRelationship, getVisibleProperties, getWorkspaceRepository, hasRelationshipByName, isPublic, loadOntologies, publishConcept, publishProperty, publishRelationship, resolvePropertyIds, setAuthorizations, setIconProperty, validateRelationshipclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddConceptTypeFilterToQuery, addConceptTypeFilterToQuery, addEdgeLabelFilterToQuery, addEdgeLabelFilterToQuery, getChildConcepts, getClientApiObject, getConceptAndAllChildren, getConceptAndAllChildrenByName, getConceptByIntent, getConceptByName, getConceptNameByIntent, getConceptsWithProperties, getDependentPropertyParent, getDisplayNameForLabel, getOrCreateConcept, getOrCreateProperty, getOrCreateRelationshipType, getParentConcept, getProperties, getPropertiesByIntent, getPropertyByIntent, getPropertyByIntent, getPropertyByName, getPropertyNameByIntent, getRelationshipAndAllChildren, getRelationshipByIntent, getRelationshipByName, getRelationshipNameByIntent, getRelationships, getRequiredConceptByIntent, getRequiredConceptByName, getRequiredConceptNameByIntent, getRequiredPropertyByIntent, getRequiredPropertyByIntent, getRequiredPropertyByName, getRequiredPropertyNameByIntent, getRequiredRelationshipByIntent, getRequiredRelationshipNameByIntent, getThingConcept, hasRelationshipByName, resolvePropertyIds, updatePropertyDependentNames, updatePropertyDomainNamespublic static final String ID_PREFIX
public static final String ID_PREFIX_PROPERTY
public static final String ID_PREFIX_RELATIONSHIP
public static final String ID_PREFIX_CONCEPT
@Inject public GeSchemaRepository(Graph graph, GraphRepository graphRepository, VisibilityTranslator visibilityTranslator, Configuration config, GraphAuthorizationRepository graphAuthorizationRepository, CacheService cacheService) throws Exception
Exceptionpublic ClientApiSchema getClientApiObject(String namespace)
getClientApiObject in interface SchemaRepositorygetClientApiObject in class SchemaRepositoryBasepublic void clearCache()
clearCache in interface SchemaRepositoryclearCache in class SchemaRepositoryBasepublic void clearCache(String namespace)
clearCache in interface SchemaRepositoryclearCache in class SchemaRepositoryBasepublic Authorizations getAuthorizations()
getAuthorizations in interface SchemaRepositorygetAuthorizations in class SchemaRepositoryBasepublic Iterable<Relationship> getRelationships(Iterable<String> ids, String namespace)
public Iterable<Relationship> getRelationships(String namespace)
public String getDisplayNameForLabel(String relationshipName, String namespace)
public Iterable<SchemaProperty> getProperties(Iterable<String> ids, String namespace)
public Iterable<SchemaProperty> getProperties(String namespace)
protected com.google.common.collect.ImmutableList<String> getDependentPropertyNames(Vertex vertex, String namespace)
public List<Concept> getChildConcepts(Concept concept, String namespace)
getChildConcepts in interface SchemaRepositorygetChildConcepts in class SchemaRepositoryBaseprotected List<Relationship> getChildRelationships(Relationship relationship, String namespace)
getChildRelationships in class SchemaRepositoryBasepublic Relationship getParentRelationship(Relationship relationship, String namespace)
public Iterable<Concept> getConceptsByName(List<String> conceptNames, String namespace)
getConceptsByName in interface SchemaRepositorygetConceptsByName in class SchemaRepositoryBasepublic boolean hasConceptByName(String conceptName, String namespace)
hasConceptByName in interface SchemaRepositoryhasConceptByName in class SchemaRepositoryBasepublic Iterable<SchemaProperty> getPropertiesByName(List<String> propertyNames, String namespace)
getPropertiesByName in interface SchemaRepositorygetPropertiesByName in class SchemaRepositoryBasepublic Iterable<Relationship> getRelationshipsByName(List<String> relationshipNames, String namespace)
getRelationshipsByName in interface SchemaRepositorygetRelationshipsByName in class SchemaRepositoryBasepublic List<SchemaProperty> getPropertiesByIntent(String intent, String namespace)
getPropertiesByIntent in interface SchemaRepositorygetPropertiesByIntent in class SchemaRepositoryBaseprotected void internalDeleteConcept(Concept concept, String namespace)
internalDeleteConcept in class SchemaRepositoryBaseprotected void internalDeleteProperty(SchemaProperty property, String namespace)
internalDeleteProperty in class SchemaRepositoryBaseprotected void internalDeleteRelationship(Relationship relationship, String namespace)
internalDeleteRelationship in class SchemaRepositoryBaseprotected Concept internalGetOrCreateConcept(Concept parent, String conceptName, String displayName, String glyphIconHref, String color, boolean deleteChangeableProperties, boolean isCoreConcept, User user, String namespace)
internalGetOrCreateConcept in class SchemaRepositoryBaseprotected void findOrAddEdge(Vertex fromVertex, Vertex toVertex, String edgeLabel, User user, String namespace)
protected void removeEdge(GraphUpdateContext ctx, String fromVertexId, String toVertexId)
protected void findOrAddEdge(GraphUpdateContext ctx, String fromVertexId, String toVertexId, String edgeLabel)
protected void findOrAddEdge(GraphUpdateContext ctx, Vertex fromVertex, Vertex toVertex, String edgeLabel)
public void addDomainConceptsToRelationshipType(String relationshipName, List<String> conceptNames, User user, String namespace)
public void addRangeConceptsToRelationshipType(String relationshipName, List<String> conceptNames, User user, String namespace)
public SchemaProperty addPropertyTo(List<Concept> concepts, List<Relationship> relationships, List<String> extendedDataTableNames, String propertyName, String displayName, PropertyType dataType, Map<String,String> possibleValues, Collection<TextIndexHint> textIndexHints, boolean userVisible, boolean searchFacet, boolean systemProperty, String aggType, int aggPrecision, String aggInterval, long aggMinDocumentCount, String aggTimeZone, String aggCalendarField, boolean searchable, boolean addable, boolean sortable, Integer sortPriority, String displayType, String propertyGroup, Double boost, String validationFormula, String displayFormula, com.google.common.collect.ImmutableList<String> dependentPropertyNames, String[] intents, boolean deleteable, boolean updateable, User user, String namespace)
addPropertyTo in class SchemaRepositoryBasepublic void getOrCreateInverseOfRelationship(Relationship fromRelationship, Relationship inverseOfRelationship)
public void removeInverseOfRelationship(Relationship fromRelationship, Relationship inverseOfRelationship)
protected Relationship internalGetOrCreateRelationshipType(Relationship parent, Iterable<Concept> domainConcepts, Iterable<Concept> rangeConcepts, String relationshipName, String displayName, boolean isDeclaredInOntology, boolean coreConcept, User user, String namespace)
internalGetOrCreateRelationshipType in class SchemaRepositoryBasepublic void updatePropertyDependentNames(SchemaProperty property, Collection<String> dependentPropertyNames, User user, String namespace)
public void updatePropertyDomainNames(SchemaProperty property, Set<String> domainNames, User user, String namespace)
public Authorizations getAuthorizations(String namespace, String... otherAuthorizations)
protected Graph getGraph()
getGraph in class SchemaRepositoryBaseprotected SchemaProperty createOntologyProperty(Vertex propertyVertex, com.google.common.collect.ImmutableList<String> dependentPropertyNames, PropertyType propertyType, String namespace)
protected Relationship createRelationship(String parentName, Vertex relationshipVertex, List<String> inverseOfNames, List<String> domainConceptNames, List<String> rangeConceptNames, Collection<SchemaProperty> properties, String namespace)
protected Concept createConcept(Vertex vertex, List<SchemaProperty> conceptProperties, String parentConceptName, String namespace)
protected Concept createConcept(Vertex vertex, String namespace)
protected void deleteChangeableProperties(SchemaProperty property, Authorizations authorizations)
deleteChangeableProperties in class SchemaRepositoryBaseprotected void deleteChangeableProperties(SchemaElement element, Authorizations authorizations)
deleteChangeableProperties in class SchemaRepositoryBasepublic void internalPublishConcept(Concept concept, User user, String namespace)
internalPublishConcept in class SchemaRepositoryBasepublic void internalPublishRelationship(Relationship relationship, User user, String namespace)
internalPublishRelationship in class SchemaRepositoryBasepublic void internalPublishProperty(SchemaProperty property, User user, String namespace)
internalPublishProperty in class SchemaRepositoryBasepublic Relationship getRelationshipById(String id)
public SchemaProperty getPropertyById(String id)
Copyright © 2016–2021 MWARE SOLUTIONS. All rights reserved.