public class TermAggregateBuilder extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TermAggregateBuilder.CopyAggregatePropertiesStatistics |
| Constructor and Description |
|---|
TermAggregateBuilder() |
| Modifier and Type | Method and Description |
|---|---|
static void |
buildAggregatesForEqualNames(org.neo4j.graphdb.GraphDatabaseService graphDb,
String termPropertyKey,
org.neo4j.shell.util.json.JSONArray propertyValues)
Aggregates terms that have equal preferred name and synonyms, after some
minor normalization.
|
static void |
buildAggregatesForMappings(org.neo4j.graphdb.GraphDatabaseService graphDb,
Set<String> allowedMappingTypes,
org.neo4j.graphdb.Label allowedTermLabel,
org.neo4j.graphdb.Label aggregatedTermsLabel) |
static void |
copyAggregateProperties(org.neo4j.graphdb.Node aggregate,
String[] copyProperties,
TermAggregateBuilder.CopyAggregatePropertiesStatistics copyStats)
Fills aggregate with property values from its elements.
|
static void |
deleteAggregates(org.neo4j.graphdb.GraphDatabaseService graphDb,
org.neo4j.graphdb.Label aggregateLabel) |
protected static void |
determineMappedSubgraph(Set<String> allowedMappingTypes,
org.neo4j.graphdb.Label allowedTermLabel,
org.neo4j.graphdb.Node term,
Set<org.neo4j.graphdb.Node> elements,
Set<org.neo4j.graphdb.Node> visited) |
protected static Set<org.neo4j.graphdb.Node> |
getMatchingAggregates(org.neo4j.graphdb.Node conceptNode,
Set<String> allowedMappingTypes,
org.neo4j.graphdb.Label aggregateLabel)
Returns all the aggregate nodes where conceptNode is an element of and
where the aggregate is exactly of the mapping types specified in
allowedMappingTypes.
|
public static void buildAggregatesForEqualNames(org.neo4j.graphdb.GraphDatabaseService graphDb,
String termPropertyKey,
org.neo4j.shell.util.json.JSONArray propertyValues)
throws org.neo4j.shell.util.json.JSONException
graphDb - The graph database to work on.termPropertyKey - actually not clear right now ;-)propertyValues - The properties to merge for aggregated nodes.org.neo4j.shell.util.json.JSONException - If propertyValues is not a valid JSON string.public static void deleteAggregates(org.neo4j.graphdb.GraphDatabaseService graphDb,
org.neo4j.graphdb.Label aggregateLabel)
public static void buildAggregatesForMappings(org.neo4j.graphdb.GraphDatabaseService graphDb,
Set<String> allowedMappingTypes,
org.neo4j.graphdb.Label allowedTermLabel,
org.neo4j.graphdb.Label aggregatedTermsLabel)
graphDb - The graph database to work on.allowedMappingTypes - The mapping types that will be used to build aggregates. This
relates to the property of mapping relationships that exposes
the type of mapping the relationships is part of. All edges
that are of at least one mapping type delivered by this
parameter will be traversed to build an aggregate. That means,
the more mapping types are allowed, the bigger the aggregates
become. Also, each distinguished set of allowed mapping types
defines a particular set of aggregations.allowedTermLabel - Label to restrict the terms for which aggregates are built.aggregatedTermsLabel - Label for terms that have been processed by the aggregation
algorithm. Such terms can be aggregate terms (with the label
ConceptManager.TermLabel.AGGREGATE) or just plain terms (with the label
ConceptManager.TermLabel.TERM) that are not an element of an aggregate.protected static void determineMappedSubgraph(Set<String> allowedMappingTypes, org.neo4j.graphdb.Label allowedTermLabel, org.neo4j.graphdb.Node term, Set<org.neo4j.graphdb.Node> elements, Set<org.neo4j.graphdb.Node> visited)
protected static Set<org.neo4j.graphdb.Node> getMatchingAggregates(org.neo4j.graphdb.Node conceptNode, Set<String> allowedMappingTypes, org.neo4j.graphdb.Label aggregateLabel)
conceptNode - The concept node that is an element of the sought aggregates.allowedMappingTypes - The mapping type for which aggregates are requested.aggregateLabel - The aggregate label for requested aggregate nodes.public static void copyAggregateProperties(org.neo4j.graphdb.Node aggregate,
String[] copyProperties,
TermAggregateBuilder.CopyAggregatePropertiesStatistics copyStats)
aggregate - The aggregate node to assembly element properties to.copyProperties - The properties that should be copied into the aggregate.copyStats - An object to collect statistics over the copy process.Copyright © 2018 JULIE Lab Jena, Germany. All rights reserved.