@Override protected Set<Attribute> retrieveRelationAttributeAll() { return parent.getAttributes(); }
/** * Return all of attribute names of the relations * contained in the collection * * @param cs * @return set of attribute names */ public static Set<AttributeName> getRelationAttNames(Collection<ONDEXRelation> cs) { Set<AttributeName> result = new HashSet<AttributeName>(); for (ONDEXRelation c : cs) { for (Attribute g : c.getAttributes()) { result.add(g.getOfType()); } } return result; }
/** * Return all of attribute names of the relations * contained in the collection * * @param cs * @return set of attribute names */ public static Set<AttributeName> getRelationAttNames(Collection<ONDEXRelation> cs) { Set<AttributeName> result = new HashSet<AttributeName>(); for (ONDEXRelation c : cs) { for (Attribute g : c.getAttributes()) { result.add(g.getOfType()); } } return result; }
private void step() { boolean match = false; next = null; while (!match && view.hasNext()) { ONDEXRelation r = view.next(); List<String> gds = new ArrayList<String>(); for (Attribute g : r.getAttributes()) { String name = g.getOfType().getId(); if (validArgs.contains(name)) gds.add(name); } if (gds.size() > 0) { match = true; next = gds.toArray(new String[gds.size()]); } } } }
/** * Copies all of the attributes from one relation to another (only if they * do not already exist at target) * * @param source * - relation to copy from * @param target * - relation to copy to * @throws AccessDeniedException * @throws NullValueException */ public static void copyRelationAttributes(ONDEXRelation source, ONDEXRelation target) throws NullValueException, AccessDeniedException { for (EvidenceType et : source.getEvidence()) addNewEvidence(target, et); for (Attribute attribute : source.getAttributes()) addNewAttribute(target, attribute); }
Set<Attribute> it_attribute = r.getAttributes ();
Set<Attribute> rel_attributes= rel.getAttributes(); // get all relation Attributes. for(Attribute attr : rel_attributes) {
.getAttributes () .stream () .map ( a ->
for (ONDEXRelation relation : graph.getRelations()) { for (Attribute attribute : relation.getAttributes()) {
Set<Attribute> attributes= rel.getAttributes();
Set<Attribute> attributes= rel.getAttributes();
/** * This method will create a copy of the original relation between the * concepts specified. * * @param graph * - graph where this things live * @param from * - source concept of the copied relation * @param to * - target concept of the copied relation * @param r * - relation that will be copied */ public static void copyRelation(ONDEXGraph graph, ONDEXConcept from, ONDEXConcept to, ONDEXRelation r) { ONDEXRelation nr = null; Collection<EvidenceType> evidence = r.getEvidence(); Collection<ONDEXConcept> tags = new HashSet<ONDEXConcept>(r.getTags()); Collection<Attribute> rgdss = r.getAttributes(); nr = graph.createRelation(from, to, r.getOfType(), evidence); for (ONDEXConcept tag : tags) nr.addTag(tag); for (Attribute rattribute : rgdss) { cloneAttributeWithAttName(graph, r, nr, rattribute.getOfType()); } }
/** * Copies all Attribute from old relation to new relation. * * @param oldR * old ONDEXRelation * @param newR * new ONDEXRelation */ private void copyGDS(ONDEXRelation oldR, ONDEXRelation newR) { // iterate over all old Attribute for (Attribute attribute : oldR.getAttributes()) { // clone old Attribute on new relation only if not yet exists if (newR.getAttribute(attribute.getOfType()) != null) // old Attribute gets overridden newR.deleteAttribute(attribute.getOfType()); else newR.createAttribute(attribute.getOfType(), attribute.getValue(), attribute.isDoIndex()); } } }
nr.addTag(co); for (Attribute rattribute : r.getAttributes()) { nr.createAttribute(rattribute.getOfType(), rattribute.getValue(), rattribute.isDoIndex());
.writeHeaders(xmlw, new String[]{"AttributeName", "Value"}); for (Attribute relationAttribute : relation.getAttributes()) { writeAttributeCell(xmlw, relativityToRoot + metadataDir, relationAttribute);
Collection<EvidenceType> evidence = r.getEvidence(); Collection<ONDEXConcept> tags = new HashSet<ONDEXConcept>(r.getTags()); Collection<Attribute> rgdss = r.getAttributes(); if (r.getFromConcept().equals(original) && r.getToConcept().equals(original)) {
for (Attribute attr : r.getAttributes()) { newr.createAttribute(attr.getOfType(), attr.getValue(), attr.isDoIndex());
Set<Attribute> itAttribute = r.getAttributes(); if (prettyPrint) xmlw.writeCharacters(newline);
for (Attribute oldAtt : oldRelation.getAttributes()) {
if ( sizeIsEmpty ( rel.getAttributes () ) && sizeIsEmpty ( rel.getEvidence () ) && sizeIsEmpty ( rel.getTags () ) )