org.vertexium.Element.softDeleteProperty()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(615)

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

Element.softDeleteProperty介绍

[英]Soft deletes a property given it's key and name from the element. Only properties which you have access to can be soft deleted using this method.
[中]Soft从元素中删除给定键和名称的属性。使用此方法只能软删除您有权访问的属性。

代码示例

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

  1. /**
  2. * Soft deletes a property given it's key and name from the element. Only properties which you have access
  3. * to can be soft deleted using this method.
  4. *
  5. * @param key The property key.
  6. * @param name The property name.
  7. */
  8. default void softDeleteProperty(String key, String name, Authorizations authorizations) {
  9. softDeleteProperty(key, name, null, authorizations);
  10. }

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

  1. /**
  2. * Soft deletes a property given it's key and name from the element. Only properties which you have access
  3. * to can be soft deleted using this method.
  4. *
  5. * @param key The property key.
  6. * @param name The property name.
  7. */
  8. default void softDeleteProperty(String key, String name, Authorizations authorizations) {
  9. softDeleteProperty(key, name, null, authorizations);
  10. }

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

  1. public void removeProperty(Element element, Authorizations authorizations) {
  2. element.softDeleteProperty(ElementMutation.DEFAULT_KEY, getPropertyName(), authorizations);
  3. }

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

  1. public void removeProperty(Element element, String key, Authorizations authorizations) {
  2. element.softDeleteProperty(key, getPropertyName(), authorizations);
  3. }

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

  1. /**
  2. * Soft deletes all properties with the given name that you have access to. Only properties which you have
  3. * access to will be soft deleted.
  4. *
  5. * @param name The name of the property to delete.
  6. */
  7. default void softDeleteProperties(String name, Authorizations authorizations) {
  8. for (Property property : getProperties(name)) {
  9. softDeleteProperty(property.getKey(), property.getName(), property.getVisibility(), authorizations);
  10. }
  11. }

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

  1. /**
  2. * Soft deletes all properties with the given name that you have access to. Only properties which you have
  3. * access to will be soft deleted.
  4. *
  5. * @param name The name of the property to delete.
  6. */
  7. default void softDeleteProperties(String name, Authorizations authorizations) {
  8. for (Property property : getProperties(name)) {
  9. softDeleteProperty(property.getKey(), property.getName(), property.getVisibility(), authorizations);
  10. }
  11. }

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

  1. public void deleteProperty(
  2. Element e,
  3. Property property,
  4. boolean propertyIsPublic,
  5. String workspaceId,
  6. Priority priority,
  7. Authorizations authorizations
  8. ) {
  9. long beforeActionTimestamp = System.currentTimeMillis() - 1;
  10. ElementOrPropertyStatus status;
  11. if (propertyIsPublic && workspaceId != null) {
  12. e.markPropertyHidden(property, new Visibility(workspaceId), authorizations);
  13. status = ElementOrPropertyStatus.HIDDEN;
  14. } else {
  15. e.softDeleteProperty(property.getKey(), property.getName(), property.getVisibility(), authorizations);
  16. status = ElementOrPropertyStatus.DELETION;
  17. }
  18. if (e instanceof Vertex) {
  19. unresolveTermMentionsForProperty((Vertex) e, property, authorizations);
  20. }
  21. graph.flush();
  22. workQueueRepository.pushGraphPropertyQueueHiddenOrDeleted(e, property, status, beforeActionTimestamp, workspaceId, priority);
  23. }

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

  1. } else if (propertySandboxStatus == SandboxStatus.PUBLIC_CHANGED) {
  2. long beforeActionTimestamp = System.currentTimeMillis() - 1;
  3. element.softDeleteProperty(propertyKey, propertyName, property.getVisibility(), authorizations);
  4. if (publicProperty != null) {
  5. element.markPropertyVisible(publicProperty, new Visibility(workspaceId), authorizations);

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

  1. long beforeActionTimestamp = System.currentTimeMillis() - 1;
  2. if (action == ClientApiPublishItem.Action.DELETE) {
  3. element.softDeleteProperty(key, name, authorizations);
  4. graph.flush();
  5. workQueueRepository.pushPublishedPropertyDeletion(element, key, name, beforeActionTimestamp, Priority.HIGH);
  6. element.softDeleteProperty(key, name, new Visibility(workspaceId), authorizations);
  7. graph.flush();
  8. workQueueRepository.pushPublishedPropertyDeletion(
  9. element.softDeleteProperty(key, name, propertyVisibility, authorizations);
  10. workQueueRepository.pushPublishedPropertyDeletion(
  11. element,
  12. element.softDeleteProperty(key, name, publicVisibility, authorizations);
  13. } else {
  14. newVisibility = publicVisibility;

相关文章