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

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

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

Element.markPropertyHidden介绍

[英]Marks a property as hidden for a given visibility.
[中]针对给定可见性将属性标记为隐藏。

代码示例

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

  1. /**
  2. * Marks a property as hidden for a given visibility.
  3. *
  4. * @param property The property.
  5. * @param visibility The visibility string under which this property is hidden.
  6. * This visibility can be a superset of the property visibility to mark
  7. * it as hidden for only a subset of authorizations.
  8. * @param authorizations The authorizations used.
  9. */
  10. default void markPropertyHidden(Property property, Visibility visibility, Authorizations authorizations) {
  11. markPropertyHidden(property, null, visibility, authorizations);
  12. }

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

  1. /**
  2. * Marks a property as hidden for a given visibility.
  3. *
  4. * @param property The property.
  5. * @param visibility The visibility string under which this property is hidden.
  6. * This visibility can be a superset of the property visibility to mark
  7. * it as hidden for only a subset of authorizations.
  8. * @param authorizations The authorizations used.
  9. */
  10. default void markPropertyHidden(Property property, Visibility visibility, Authorizations authorizations) {
  11. markPropertyHidden(property, null, visibility, authorizations);
  12. }

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

  1. /**
  2. * Marks a property as hidden for a given visibility.
  3. *
  4. * @param key The key of the property.
  5. * @param name The name of the property.
  6. * @param propertyVisibility The visibility of the property.
  7. * @param visibility The visibility string under which this property is hidden.
  8. * This visibility can be a superset of the property visibility to mark
  9. * it as hidden for only a subset of authorizations.
  10. * @param authorizations The authorizations used.
  11. */
  12. default void markPropertyHidden(String key, String name, Visibility propertyVisibility, Visibility visibility, Authorizations authorizations) {
  13. markPropertyHidden(key, name, propertyVisibility, null, visibility, authorizations);
  14. }

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

  1. /**
  2. * Marks a property as hidden for a given visibility.
  3. *
  4. * @param key The key of the property.
  5. * @param name The name of the property.
  6. * @param propertyVisibility The visibility of the property.
  7. * @param visibility The visibility string under which this property is hidden.
  8. * This visibility can be a superset of the property visibility to mark
  9. * it as hidden for only a subset of authorizations.
  10. * @param authorizations The authorizations used.
  11. */
  12. default void markPropertyHidden(String key, String name, Visibility propertyVisibility, Visibility visibility, Authorizations authorizations) {
  13. markPropertyHidden(key, name, propertyVisibility, null, visibility, authorizations);
  14. }

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

  1. public void hideProperty(
  2. List<VisalloPropertyUpdate> changedPropertiesOut,
  3. Element element,
  4. Property propertyToHide,
  5. String workspaceId,
  6. Authorizations authorizations
  7. ) {
  8. long beforeDeletionTimestamp = System.currentTimeMillis() - 1;
  9. element.markPropertyHidden(propertyToHide, new Visibility(workspaceId), authorizations);
  10. changedPropertiesOut.add(new VisalloPropertyUpdateRemove(this, propertyToHide.getKey(), beforeDeletionTimestamp, false, true));
  11. }

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

  1. /**
  2. * Marks a property as hidden for a given visibility.
  3. *
  4. * @param key The key of the property.
  5. * @param name The name of the property.
  6. * @param propertyVisibility The visibility of the property.
  7. * @param timestamp The timestamp.
  8. * @param visibility The visibility string under which this property is hidden.
  9. * This visibility can be a superset of the property visibility to mark
  10. * it as hidden for only a subset of authorizations.
  11. * @param authorizations The authorizations used.
  12. */
  13. default void markPropertyHidden(String key, String name, Visibility propertyVisibility, Long timestamp, Visibility visibility, Authorizations authorizations) {
  14. Iterable<Property> properties = getProperties(key, name);
  15. for (Property property : properties) {
  16. if (property.getVisibility().equals(propertyVisibility)) {
  17. markPropertyHidden(property, timestamp, visibility, authorizations);
  18. return;
  19. }
  20. }
  21. throw new IllegalArgumentException("Could not find property " + key + " : " + name + " : " + propertyVisibility);
  22. }

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

  1. /**
  2. * Marks a property as hidden for a given visibility.
  3. *
  4. * @param key The key of the property.
  5. * @param name The name of the property.
  6. * @param propertyVisibility The visibility of the property.
  7. * @param timestamp The timestamp.
  8. * @param visibility The visibility string under which this property is hidden.
  9. * This visibility can be a superset of the property visibility to mark
  10. * it as hidden for only a subset of authorizations.
  11. * @param authorizations The authorizations used.
  12. */
  13. default void markPropertyHidden(String key, String name, Visibility propertyVisibility, Long timestamp, Visibility visibility, Authorizations authorizations) {
  14. Iterable<Property> properties = getProperties(key, name);
  15. for (Property property : properties) {
  16. if (property.getVisibility().equals(propertyVisibility)) {
  17. markPropertyHidden(property, timestamp, visibility, authorizations);
  18. return;
  19. }
  20. }
  21. throw new IllegalArgumentException("Could not find property " + key + " : " + name + " : " + propertyVisibility);
  22. }

代码示例来源: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. long beforeDeletionTimestamp = System.currentTimeMillis() - 1;
  2. element.markPropertyHidden(publicProperty, new Visibility(workspaceId), authorizations);
  3. graph.flush();
  4. workQueueRepository.pushGraphPropertyQueueHiddenOrDeleted(element, publicProperty, ElementOrPropertyStatus.HIDDEN, beforeDeletionTimestamp, workspaceId, Priority.HIGH);

相关文章