org.vertexium.Property.getKey()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(7.1k)|赞(0)|评价(0)|浏览(92)

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

Property.getKey介绍

暂无

代码示例

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

@Override
public String getKey() {
  return property.getKey();
}

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

@Override
  protected boolean isIncluded(Property property) {
    if (key != null && !property.getKey().equals(key)) {
      return false;
    }
    return property.getName().equals(name);
  }
};

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

private JSONObject getProductDataJson(Vertex productVertex) {
  JSONObject data = new JSONObject();
  Iterable<Property> dataProperties = WorkspaceProperties.PRODUCT_DATA.getProperties(productVertex);
  for (Property dataProperty : dataProperties) {
    data.put(dataProperty.getKey(), dataProperty.getValue());
  }
  return data;
}

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

private boolean isMatch(Property property, String key, String name, Visibility visibility) {
  if (name != null && !property.getName().equals(name)) {
    return false;
  }
  if (key != null && !property.getKey().equals(key)) {
    return false;
  }
  if (visibility != null && !property.getVisibility().equals(visibility)) {
    return false;
  }
  return true;
}

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

@Override
public int compareTo(Property o) {
  int i = getName().compareTo(o.getName());
  if (i != 0) {
    return i;
  }
  i = getKey().compareTo(o.getKey());
  if (i != 0) {
    return i;
  }
  return getVisibility().compareTo(o.getVisibility());
}

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

@Override
  public String toString() {
    return "[" + getName() + ":" + getKey() + ":" + getVisibility() + "]";
  }
}

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

public SoftDeletePropertyEvent(Graph graph, Element element, Property property) {
  super(graph);
  this.element = element;
  this.key = property.getKey();
  this.name = property.getName();
  this.visibility = property.getVisibility();
}

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

public void hideProperty(
    List<VisalloPropertyUpdate> changedPropertiesOut,
    Element element,
    Property propertyToHide,
    String workspaceId,
    Authorizations authorizations
) {
  long beforeDeletionTimestamp = System.currentTimeMillis() - 1;
  element.markPropertyHidden(propertyToHide, new Visibility(workspaceId), authorizations);
  changedPropertiesOut.add(new VisalloPropertyUpdateRemove(this, propertyToHide.getKey(), beforeDeletionTimestamp, false, true));
}

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

public DeletePropertyEvent(Graph graph, Element element, Property property) {
  super(graph);
  this.element = element;
  this.key = property.getKey();
  this.name = property.getName();
  this.visibility = property.getVisibility();
}

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

public DeletePropertyEvent(Graph graph, Element element, Property property) {
  super(graph);
  this.element = element;
  this.key = property.getKey();
  this.name = property.getName();
  this.visibility = property.getVisibility();
}

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

public static VideoFrameInfo getVideoFrameInfoFromProperty(Property property) {
  String mimeType = VisalloProperties.MIME_TYPE_METADATA.getMetadataValueOrDefault(property.getMetadata(), null);
  if (mimeType == null || !mimeType.equals("text/plain")) {
    return null;
  }
  return getVideoFrameInfo(property.getKey());
}

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

@Override
public ExistingElementMutation<T> setPropertyMetadata(Property property, String metadataName, Object newValue, Visibility visibility) {
  this.setPropertyMetadatas.add(new SetPropertyMetadata(property.getKey(), property.getName(), property.getVisibility(), metadataName, newValue, visibility));
  return this;
}

代码示例来源:origin: org.visallo/visallo-gpw-tika-text-extractor

private String getPropertyKey(GraphPropertyWorkData data) {
  // To support legacy code that stored the extracted text into a predefined multi-valued key we need
  //   to look for the old text property with MULTI_VALUE_KEY and use that key if we find it
  if (VisalloProperties.TEXT.getProperty(data.getElement(), MULTI_VALUE_KEY) != null) {
    return MULTI_VALUE_KEY;
  }
  return data.getProperty().getKey();
}

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

/**
 * Permanently deletes a property from the element. Only properties which you have access to can be deleted using
 * this method.
 *
 * @param property The property to delete.
 */
default void deleteProperty(Property property, Authorizations authorizations) {
  deleteProperty(property.getKey(), property.getName(), property.getVisibility(), authorizations);
}

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

private String createHdfsFileName(String rowKey, Property property) throws IOException {
  String fileName = HdfsLargeDataStore.encodeFileName(property.getName() + "_" + property.getKey() + "_" + property.getTimestamp());
  return rowKey + "/" + fileName;
}

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

private void deleteChangeableProperties(Vertex vertex, Authorizations authorizations) {
  for (Property property : vertex.getProperties()) {
    if (OntologyProperties.CHANGEABLE_PROPERTY_IRI.contains(property.getName())) {
      vertex.softDeleteProperty(property.getKey(), property.getName(), authorizations);
    }
  }
  graph.flush();
}

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

/**
 * Permanently deletes all properties with the given name that you have access to. Only properties which you have
 * access to will be deleted.
 *
 * @param name The name of the property to delete.
 */
default void deleteProperties(String name, Authorizations authorizations) {
  for (Property p : getProperties(name)) {
    deleteProperty(p.getKey(), p.getName(), p.getVisibility(), authorizations);
  }
}

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

private void unresolveTermMentionsForProperty(Vertex vertex, Property property, Authorizations authorizations) {
  for (Vertex termMention : termMentionRepository.findResolvedTo(vertex.getId(), authorizations)) {
    String key = VisalloProperties.TERM_MENTION_REF_PROPERTY_KEY.getPropertyValue(termMention);
    String name = VisalloProperties.TERM_MENTION_REF_PROPERTY_NAME.getPropertyValue(termMention);
    String visibility = VisalloProperties.TERM_MENTION_REF_PROPERTY_VISIBILITY.getPropertyValue(termMention);
    if (property.getKey().equals(key) && property.getName().equals(name) &&
        property.getVisibility().getVisibilityString().equals(visibility)) {
      unresolveTerm(termMention, authorizations);
    }
  }
}

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

@Override
public ExistingElementMutation<T> alterPropertyVisibility(Property property, Visibility visibility) {
  if (!element.getFetchHints().isIncludePropertyAndMetadata(property.getName())) {
    throw new VertexiumMissingFetchHintException(element.getFetchHints(), "Property " + property.getName() + " needs to be included with metadata");
  }
  this.alterPropertyVisibilities.add(new AlterPropertyVisibility(property.getKey(), property.getName(), property.getVisibility(), visibility));
  return this;
}

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

@Override
public ExistingElementMutation<T> alterPropertyVisibility(Property property, Visibility visibility) {
  if (!element.getFetchHints().isIncludePropertyAndMetadata(property.getName())) {
    throw new VertexiumMissingFetchHintException(element.getFetchHints(), "Property " + property.getName() + " needs to be included with metadata");
  }
  this.alterPropertyVisibilities.add(new AlterPropertyVisibility(property.getKey(), property.getName(), property.getVisibility(), visibility));
  return this;
}

相关文章