本文整理了Java中org.vertexium.Element.getProperty()
方法的一些代码示例,展示了Element.getProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getProperty()
方法的具体详情如下:
包路径:org.vertexium.Element
类名称:Element
方法名:getProperty
暂无
代码示例来源:origin: org.vertexium/vertexium-core
@Override
public ElementMutation<T> deleteProperty(String name, Visibility visibility) {
Property property = this.element.getProperty(name, visibility);
if (property != null) {
deleteProperty(property);
}
return this;
}
代码示例来源:origin: org.vertexium/vertexium-core
@Override
public ElementMutation<T> softDeleteProperty(String name, Visibility visibility) {
Property property = this.element.getProperty(name, visibility);
if (property != null) {
softDeleteProperty(property);
}
return this;
}
代码示例来源:origin: org.vertexium/vertexium-core
@Override
public ElementMutation<T> deleteProperty(String key, String name, Visibility visibility) {
Property property = this.element.getProperty(key, name, visibility);
if (property != null) {
deleteProperty(property);
}
return this;
}
代码示例来源:origin: org.vertexium/vertexium-core
@Override
public ElementMutation<T> softDeleteProperty(String key, String name, Visibility visibility) {
Property property = this.element.getProperty(key, name, visibility);
if (property != null) {
softDeleteProperty(property);
}
return this;
}
代码示例来源:origin: org.visallo/visallo-core
public Property getProperty(Element element) {
return element.getProperty(getPropertyName());
}
代码示例来源:origin: org.visallo/visallo-core
public boolean hasProperty(Element element, String propertyKey) {
return element.getProperty(propertyKey, getPropertyName()) != null;
}
代码示例来源:origin: visallo/vertexium
@Override
public ElementMutation<T> deleteProperty(String name, Visibility visibility) {
Property property = this.element.getProperty(name, visibility);
if (property != null) {
deleteProperty(property);
}
return this;
}
代码示例来源:origin: visallo/vertexium
@Override
public ElementMutation<T> deleteProperty(String key, String name, Visibility visibility) {
Property property = this.element.getProperty(key, name, visibility);
if (property != null) {
deleteProperty(property);
}
return this;
}
代码示例来源:origin: visallo/vertexium
@Override
public ElementMutation<T> softDeleteProperty(String name, Visibility visibility) {
Property property = this.element.getProperty(name, visibility);
if (property != null) {
softDeleteProperty(property);
}
return this;
}
代码示例来源:origin: visallo/vertexium
@Override
public ElementMutation<T> softDeleteProperty(String key, String name, Visibility visibility) {
Property property = this.element.getProperty(key, name, visibility);
if (property != null) {
softDeleteProperty(property);
}
return this;
}
代码示例来源:origin: org.visallo/visallo-core
public Property getProperty(Element element, String key) {
return element.getProperty(key, getPropertyName());
}
代码示例来源:origin: org.visallo/visallo-core
public boolean hasProperty(Element element) {
return element.getProperty(ElementMutation.DEFAULT_KEY, getPropertyName()) != null;
}
代码示例来源:origin: org.visallo/visallo-core
private Property getProperty(
Element element,
String propertyKey,
String propertyName,
String visibilitySource,
String workspaceId
) {
Property property = element.getProperty(
propertyKey,
propertyName,
getVisibilityWithWorkspace(visibilitySource, workspaceId)
);
// could be a public property, let's try fetching it without workspace id
if (property == null) {
property = element.getProperty(
propertyKey,
propertyName,
getVisibilityWithWorkspace(visibilitySource, null)
);
}
return property;
}
代码示例来源:origin: org.visallo/visallo-core
public boolean canHandle(Element element, String propertyKey, String propertyName, ElementOrPropertyStatus status) {
if (!this.isStarted()) {
//we are probably on a server and want to submit it to the architecture
return true;
}
Property property = element.getProperty(propertyKey, propertyName);
return canHandle(element, property, status);
}
代码示例来源:origin: org.visallo/visallo-core
protected final boolean isAuthor(Element element, String propertyKey, String propertyName, User user, String workspaceId) {
if (element == null) {
return false;
}
Property property = element.getProperty(propertyKey, propertyName);
if (property != null) {
String authorUserId = VisalloProperties.MODIFIED_BY_METADATA.getMetadataValue(property.getMetadata());
return user.getUserId().equals(authorUserId);
} else {
return false;
}
}
代码示例来源:origin: org.visallo/visallo-core
@Override
public void execute(ActionExecuteParameters parameters, User user, Authorizations authorizations) {
String propertyKey = parameters.getData().getString(PROPERTY_PROPERTY_KEY);
String propertyName = parameters.getData().getString(PROPERTY_PROPERTY_NAME);
String visibility = parameters.getData().getString(PROPERTY_VISIBILITY);
Object newValue = getNewValue(parameters);
Visibility vis = new Visibility(visibility);
LOGGER.debug("setting property %s:%s[%s] = %s", propertyName, propertyKey, vis, newValue);
parameters.getElement().addPropertyValue(propertyKey, propertyName, newValue, vis, authorizations);
graph.flush();
Property property = parameters.getElement().getProperty(propertyKey, propertyName);
workQueueRepository.pushGraphPropertyQueue(parameters.getElement(), property, Priority.NORMAL);
}
代码示例来源:origin: visallo/vertexium
new AddPropertyEvent(graph, saveVertices.get(0), saveVertices.get(0).getProperty("k1", "name")),
new AddExtendedDataEvent(graph, saveVertices.get(0), "table1", "row1", "col1", null, "extended", VISIBILITY_A),
new AddVertexEvent(graph, (Vertex) saveVertices.get(1)),
new AddPropertyEvent(graph, saveVertices.get(1), saveVertices.get(1).getProperty("k1", "name")),
new AddExtendedDataEvent(graph, saveVertices.get(1), "table1", "row1", "col1", null, "extended", VISIBILITY_A)
);
代码示例来源:origin: org.vertexium/vertexium-test
new AddPropertyEvent(graph, saveVertices.get(0), saveVertices.get(0).getProperty("k1", "name")),
new AddExtendedDataEvent(graph, saveVertices.get(0), "table1", "row1", "col1", null, "extended", VISIBILITY_A),
new AddVertexEvent(graph, (Vertex) saveVertices.get(1)),
new AddPropertyEvent(graph, saveVertices.get(1), saveVertices.get(1).getProperty("k1", "name")),
new AddExtendedDataEvent(graph, saveVertices.get(1), "table1", "row1", "col1", null, "extended", VISIBILITY_A)
);
代码示例来源:origin: org.visallo/visallo-core
if (StringUtils.isNotEmpty(propertyKey) || StringUtils.isNotEmpty(propertyName)) {
if (propertyKey == null) {
property = element.getProperty(propertyName);
} else {
property = element.getProperty(propertyKey, propertyName);
代码示例来源:origin: org.visallo/visallo-core
private void checkCanAddOrUpdateProperty(
Element element,
OntologyElement ontologyElement,
String propertyKey,
String propertyName,
Ontology ontology,
Set<String> privileges,
User user,
String workspaceId
) throws VisalloAccessDeniedException {
boolean isUpdate = element.getProperty(propertyKey, propertyName) != null;
boolean canAddOrUpdate = isUpdate
? internalCanUpdateProperty(element, ontologyElement, propertyKey, propertyName, ontology, privileges, user, workspaceId)
: internalCanAddProperty(element, ontologyElement, propertyKey, propertyName, ontology, privileges, user, workspaceId);
if (!canAddOrUpdate) {
throw new VisalloAccessDeniedException(
propertyName + " cannot be added or updated due to ACL restriction", user, element.getId());
}
}
内容来源于网络,如有侵权,请联系作者删除!