public static boolean canIncorporate(CanonicalPath entityPath) { SegmentType entityType = entityPath.getSegment().getElementType(); SegmentType parentType = entityPath.up().getSegment().getElementType(); return SegmentType.t.equals(parentType) && (SegmentType.rt.equals(entityType) || SegmentType.mt.equals(entityType)); }
public Relationship(String id, String name, CanonicalPath source, CanonicalPath target, Map<String, Object> properties) { super(CanonicalPath.of().relationship(id).get(), properties); this.id = id; this.name = name; this.source = source; this.target = target; }
private static String segmentToString(Path.Segment segment) { return (segment.getElementType() == null ? "" : (segment.getElementType().getSerialized() + ";")) + segment.getElementId(); } }
public DataEntity(CanonicalPath path, StructuredData value, String identityHash, String contentHash, String syncHash, Map<String, Object> properties) { this(path.up(), DataRole.valueOf(path.getSegment().getElementId()), value, identityHash, contentHash, syncHash, properties); }
@Override public List<OperationType.Blueprint> getOperationTypes(ResourceType.Blueprint rt) { RelativePath p = rt.equals(structure.getRoot()) ? RelativePath.empty().get() : RelativePath.to().resourceType(rt.getId()).get(); try (Stream<OperationType.Blueprint> s = structure.getChildren(p, OperationType.class)) { return s.collect(toList()); } }
/** * @return the id of the element. */ public String getId() { return path.getSegment().getElementId(); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof DataAt)) return false; DataAt dataAt = (DataAt) o; return dataPath.equals(dataAt.dataPath); }
public RelationNotFoundException(SegmentType sourceEntityType, String nameOrId, Filter[][] filters, String message, Throwable cause) { this(sourceEntityType == null ? null : sourceEntityType.getSimpleName(), nameOrId, filters, message, cause); }
@Override public int hashCode() { return dataPath.hashCode(); } }
@Override public int hashCode() { return path.hashCode(); } }
public static boolean canIncorporate(CanonicalPath entityPath) { SegmentType entityType = entityPath.getSegment().getElementType(); SegmentType parentType = entityPath.up().getSegment().getElementType(); return SegmentType.t.equals(parentType) && (SegmentType.rt.equals(entityType) || SegmentType.mt.equals(entityType)); }
public DataEntity(CanonicalPath path, StructuredData value, Map<String, Object> properties) { this(path.up(), DataRole.valueOf(path.getSegment().getElementId()), value, properties); }
public Relationship(String id, String name, CanonicalPath source, CanonicalPath target, Map<String, Object> properties) { super(CanonicalPath.of().relationship(id).get(), properties); this.id = id; this.name = name; this.source = source; this.target = target; }
/** * @return the id of the element. */ public String getId() { return path.getSegment().getElementId(); }
public DataEntity(CanonicalPath owner, DataRole role, StructuredData value, String identityHash, String contentHash, String syncHash, Map<String, Object> properties) { super(owner.extend(DataEntity.SEGMENT_TYPE, role.name()).get(), identityHash, contentHash, syncHash, properties); this.value = value; }