org.vertexium.Graph.getPropertyDefinitions()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(8.2k)|赞(0)|评价(0)|浏览(131)

本文整理了Java中org.vertexium.Graph.getPropertyDefinitions()方法的一些代码示例,展示了Graph.getPropertyDefinitions()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.getPropertyDefinitions()方法的具体详情如下:
包路径:org.vertexium.Graph
类名称:Graph
方法名:getPropertyDefinitions

Graph.getPropertyDefinitions介绍

[英]Gets all property definitions.
[中]获取所有属性定义。

代码示例

代码示例来源:origin: org.vertexium/vertexium-core

@Override
public <T> Query hasNot(String propertyName, T value) {
  this.parameters.addHasContainer(new HasValueContainer(propertyName, Contains.NOT_IN, new Object[]{value}, getGraph().getPropertyDefinitions()));
  return this;
}

代码示例来源:origin: org.vertexium/vertexium-core

@Override
public <T> Query has(String propertyName, T value) {
  this.parameters.addHasContainer(new HasValueContainer(propertyName, Compare.EQUAL, value, getGraph().getPropertyDefinitions()));
  return this;
}

代码示例来源:origin: org.vertexium/vertexium-core

@Override
public <T> Query has(Class dataType) {
  this.parameters.addHasContainer(new HasPropertyContainer(dataType, getGraph().getPropertyDefinitions()));
  return this;
}

代码示例来源:origin: org.vertexium/vertexium-core

@Override
public <T> Query has(Iterable<String> propertyNames, Predicate predicate, T value) {
  this.parameters.addHasContainer(new HasValueContainer(propertyNames, predicate, value, getGraph().getPropertyDefinitions()));
  return this;
}

代码示例来源:origin: visallo/vertexium

@Override
public <T> Query has(Class dataType, Predicate predicate, T value) {
  this.parameters.addHasContainer(new HasValueContainer(dataType, predicate, value, getGraph().getPropertyDefinitions()));
  return this;
}

代码示例来源:origin: visallo/vertexium

@Override
public <T> Query hasNot(Class dataType) {
  this.parameters.addHasContainer(new HasNotPropertyContainer(dataType, getGraph().getPropertyDefinitions()));
  return this;
}

代码示例来源:origin: org.vertexium/vertexium-core

@Override
public <T> Query hasNot(Class dataType) {
  this.parameters.addHasContainer(new HasNotPropertyContainer(dataType, getGraph().getPropertyDefinitions()));
  return this;
}

代码示例来源:origin: visallo/vertexium

@Override
public <T> Query has(Class dataType) {
  this.parameters.addHasContainer(new HasPropertyContainer(dataType, getGraph().getPropertyDefinitions()));
  return this;
}

代码示例来源:origin: visallo/vertexium

@Override
public <T> Query range(String propertyName, T startValue, boolean inclusiveStartValue, T endValue, boolean inclusiveEndValue) {
  if (startValue != null) {
    this.parameters.addHasContainer(new HasValueContainer(propertyName, inclusiveStartValue ? Compare.GREATER_THAN_EQUAL : Compare.GREATER_THAN, startValue, getGraph().getPropertyDefinitions()));
  }
  if (endValue != null) {
    this.parameters.addHasContainer(new HasValueContainer(propertyName, inclusiveEndValue ? Compare.LESS_THAN_EQUAL : Compare.LESS_THAN, endValue, getGraph().getPropertyDefinitions()));
  }
  return this;
}

代码示例来源:origin: visallo/vertexium

@Override
public <T> Query has(String propertyName, T value) {
  this.parameters.addHasContainer(new HasValueContainer(propertyName, Compare.EQUAL, value, getGraph().getPropertyDefinitions()));
  return this;
}

代码示例来源:origin: visallo/vertexium

@Override
public <T> Query has(String propertyName, Predicate predicate, T value) {
  this.parameters.addHasContainer(new HasValueContainer(propertyName, predicate, value, getGraph().getPropertyDefinitions()));
  return this;
}

代码示例来源:origin: org.vertexium/vertexium-core

@Override
public <T> Query range(String propertyName, T startValue, boolean inclusiveStartValue, T endValue, boolean inclusiveEndValue) {
  if (startValue != null) {
    this.parameters.addHasContainer(new HasValueContainer(propertyName, inclusiveStartValue ? Compare.GREATER_THAN_EQUAL : Compare.GREATER_THAN, startValue, getGraph().getPropertyDefinitions()));
  }
  if (endValue != null) {
    this.parameters.addHasContainer(new HasValueContainer(propertyName, inclusiveEndValue ? Compare.LESS_THAN_EQUAL : Compare.LESS_THAN, endValue, getGraph().getPropertyDefinitions()));
  }
  return this;
}

代码示例来源:origin: org.vertexium/vertexium-core

@Override
public <T> Query has(String propertyName, Predicate predicate, T value) {
  this.parameters.addHasContainer(new HasValueContainer(propertyName, predicate, value, getGraph().getPropertyDefinitions()));
  return this;
}

代码示例来源:origin: org.vertexium/vertexium-core

@Override
public <T> Query has(Class dataType, Predicate predicate, T value) {
  this.parameters.addHasContainer(new HasValueContainer(dataType, predicate, value, getGraph().getPropertyDefinitions()));
  return this;
}

代码示例来源:origin: visallo/vertexium

@Override
public <T> Query hasNot(String propertyName, T value) {
  this.parameters.addHasContainer(new HasValueContainer(propertyName, Contains.NOT_IN, new Object[]{value}, getGraph().getPropertyDefinitions()));
  return this;
}

代码示例来源:origin: visallo/vertexium

@Override
public <T> Query has(Iterable<String> propertyNames, Predicate predicate, T value) {
  this.parameters.addHasContainer(new HasValueContainer(propertyNames, predicate, value, getGraph().getPropertyDefinitions()));
  return this;
}

代码示例来源:origin: visallo/vertexium

public Collection<String> getQueryablePropertyNames(Graph graph, Authorizations authorizations) {
  Set<String> propertyNames = new HashSet<>();
  for (PropertyDefinition propertyDefinition : graph.getPropertyDefinitions()) {
    List<String> queryableTypeSuffixes = getQueryableTypeSuffixes(propertyDefinition);
    if (queryableTypeSuffixes.size() == 0) {
      continue;
    }
    String propertyNameNoVisibility = removeVisibilityFromPropertyName(propertyDefinition.getPropertyName()); // could have visibility
    if (isReservedFieldName(propertyNameNoVisibility)) {
      continue;
    }
    for (String hash : propertyNameVisibilitiesStore.getHashes(graph, propertyNameNoVisibility, authorizations)) {
      for (String typeSuffix : queryableTypeSuffixes) {
        propertyNames.add(propertyNameNoVisibility + "_" + hash + typeSuffix);
      }
    }
  }
  return propertyNames;
}

代码示例来源:origin: org.vertexium/vertexium-elasticsearch-singledocument

public Collection<String> getQueryablePropertyNames(Graph graph, Authorizations authorizations) {
  Set<String> propertyNames = new HashSet<>();
  for (PropertyDefinition propertyDefinition : graph.getPropertyDefinitions()) {
    List<String> queryableTypeSuffixes = getQueryableTypeSuffixes(propertyDefinition);
    if (queryableTypeSuffixes.size() == 0) {
      continue;
    }
    String inflatedPropertyName = removeVisibilityFromPropertyName(propertyDefinition.getPropertyName()); // could be stored deflated
    if (isReservedFieldName(inflatedPropertyName)) {
      continue;
    }
    for (String hash : propertyNameVisibilitiesStore.getHashes(graph, inflatedPropertyName, authorizations)) {
      for (String typeSuffix : queryableTypeSuffixes) {
        propertyNames.add(inflatedPropertyName + "_" + hash + typeSuffix);
      }
    }
  }
  return propertyNames;
}

代码示例来源:origin: org.vertexium/vertexium-elasticsearch5

public Collection<String> getQueryablePropertyNames(Graph graph, Authorizations authorizations) {
  Set<String> propertyNames = new HashSet<>();
  for (PropertyDefinition propertyDefinition : graph.getPropertyDefinitions()) {
    List<String> queryableTypeSuffixes = getQueryableTypeSuffixes(propertyDefinition);
    if (queryableTypeSuffixes.size() == 0) {
      continue;
    }
    String propertyNameNoVisibility = removeVisibilityFromPropertyName(propertyDefinition.getPropertyName()); // could have visibility
    if (isReservedFieldName(propertyNameNoVisibility)) {
      continue;
    }
    for (String hash : propertyNameVisibilitiesStore.getHashes(graph, propertyNameNoVisibility, authorizations)) {
      for (String typeSuffix : queryableTypeSuffixes) {
        propertyNames.add(propertyNameNoVisibility + "_" + hash + typeSuffix);
      }
    }
  }
  return propertyNames;
}

代码示例来源:origin: org.vertexium/vertexium-elasticsearch2

public Collection<String> getQueryablePropertyNames(Graph graph, Authorizations authorizations) {
  Set<String> propertyNames = new HashSet<>();
  for (PropertyDefinition propertyDefinition : graph.getPropertyDefinitions()) {
    List<String> queryableTypeSuffixes = getQueryableTypeSuffixes(propertyDefinition);
    if (queryableTypeSuffixes.size() == 0) {
      continue;
    }
    String inflatedPropertyName = inflatePropertyName(propertyDefinition.getPropertyName()); // could be stored deflated
    String deflatedPropertyName = nameSubstitutionStrategy.deflate(inflatedPropertyName);
    if (isReservedFieldName(inflatedPropertyName)) {
      continue;
    }
    for (String hash : propertyNameVisibilitiesStore.getHashes(graph, inflatedPropertyName, authorizations)) {
      for (String typeSuffix : queryableTypeSuffixes) {
        propertyNames.add(deflatedPropertyName + "_" + hash + typeSuffix);
      }
    }
  }
  return propertyNames;
}

相关文章