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

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

本文整理了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

/**
 * Marks a property as hidden for a given visibility.
 *
 * @param property       The property.
 * @param visibility     The visibility string under which this property is hidden.
 *                       This visibility can be a superset of the property visibility to mark
 *                       it as hidden for only a subset of authorizations.
 * @param authorizations The authorizations used.
 */
default void markPropertyHidden(Property property, Visibility visibility, Authorizations authorizations) {
  markPropertyHidden(property, null, visibility, authorizations);
}

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

/**
 * Marks a property as hidden for a given visibility.
 *
 * @param property       The property.
 * @param visibility     The visibility string under which this property is hidden.
 *                       This visibility can be a superset of the property visibility to mark
 *                       it as hidden for only a subset of authorizations.
 * @param authorizations The authorizations used.
 */
default void markPropertyHidden(Property property, Visibility visibility, Authorizations authorizations) {
  markPropertyHidden(property, null, visibility, authorizations);
}

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

/**
 * Marks a property as hidden for a given visibility.
 *
 * @param key                The key of the property.
 * @param name               The name of the property.
 * @param propertyVisibility The visibility of the property.
 * @param visibility         The visibility string under which this property is hidden.
 *                           This visibility can be a superset of the property visibility to mark
 *                           it as hidden for only a subset of authorizations.
 * @param authorizations     The authorizations used.
 */
default void markPropertyHidden(String key, String name, Visibility propertyVisibility, Visibility visibility, Authorizations authorizations) {
  markPropertyHidden(key, name, propertyVisibility, null, visibility, authorizations);
}

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

/**
 * Marks a property as hidden for a given visibility.
 *
 * @param key                The key of the property.
 * @param name               The name of the property.
 * @param propertyVisibility The visibility of the property.
 * @param visibility         The visibility string under which this property is hidden.
 *                           This visibility can be a superset of the property visibility to mark
 *                           it as hidden for only a subset of authorizations.
 * @param authorizations     The authorizations used.
 */
default void markPropertyHidden(String key, String name, Visibility propertyVisibility, Visibility visibility, Authorizations authorizations) {
  markPropertyHidden(key, name, propertyVisibility, null, visibility, authorizations);
}

代码示例来源: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

/**
 * Marks a property as hidden for a given visibility.
 *
 * @param key                The key of the property.
 * @param name               The name of the property.
 * @param propertyVisibility The visibility of the property.
 * @param timestamp          The timestamp.
 * @param visibility         The visibility string under which this property is hidden.
 *                           This visibility can be a superset of the property visibility to mark
 *                           it as hidden for only a subset of authorizations.
 * @param authorizations     The authorizations used.
 */
default void markPropertyHidden(String key, String name, Visibility propertyVisibility, Long timestamp, Visibility visibility, Authorizations authorizations) {
  Iterable<Property> properties = getProperties(key, name);
  for (Property property : properties) {
    if (property.getVisibility().equals(propertyVisibility)) {
      markPropertyHidden(property, timestamp, visibility, authorizations);
      return;
    }
  }
  throw new IllegalArgumentException("Could not find property " + key + " : " + name + " : " + propertyVisibility);
}

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

/**
 * Marks a property as hidden for a given visibility.
 *
 * @param key                The key of the property.
 * @param name               The name of the property.
 * @param propertyVisibility The visibility of the property.
 * @param timestamp          The timestamp.
 * @param visibility         The visibility string under which this property is hidden.
 *                           This visibility can be a superset of the property visibility to mark
 *                           it as hidden for only a subset of authorizations.
 * @param authorizations     The authorizations used.
 */
default void markPropertyHidden(String key, String name, Visibility propertyVisibility, Long timestamp, Visibility visibility, Authorizations authorizations) {
  Iterable<Property> properties = getProperties(key, name);
  for (Property property : properties) {
    if (property.getVisibility().equals(propertyVisibility)) {
      markPropertyHidden(property, timestamp, visibility, authorizations);
      return;
    }
  }
  throw new IllegalArgumentException("Could not find property " + key + " : " + name + " : " + propertyVisibility);
}

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

public void deleteProperty(
    Element e,
    Property property,
    boolean propertyIsPublic,
    String workspaceId,
    Priority priority,
    Authorizations authorizations
) {
  long beforeActionTimestamp = System.currentTimeMillis() - 1;
  ElementOrPropertyStatus status;
  if (propertyIsPublic && workspaceId != null) {
    e.markPropertyHidden(property, new Visibility(workspaceId), authorizations);
    status = ElementOrPropertyStatus.HIDDEN;
  } else {
    e.softDeleteProperty(property.getKey(), property.getName(), property.getVisibility(), authorizations);
    status = ElementOrPropertyStatus.DELETION;
  }
  if (e instanceof Vertex) {
    unresolveTermMentionsForProperty((Vertex) e, property, authorizations);
  }
  graph.flush();
  workQueueRepository.pushGraphPropertyQueueHiddenOrDeleted(e, property, status, beforeActionTimestamp, workspaceId, priority);
}

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

long beforeDeletionTimestamp = System.currentTimeMillis() - 1;
element.markPropertyHidden(publicProperty, new Visibility(workspaceId), authorizations);
graph.flush();
workQueueRepository.pushGraphPropertyQueueHiddenOrDeleted(element, publicProperty, ElementOrPropertyStatus.HIDDEN, beforeDeletionTimestamp, workspaceId, Priority.HIGH);

相关文章