Gets a list of related relationships for the topic.
189732
public List<Relationship> getRelatedRelationships() {
        final List<Relationship> relatedRelationships = new LinkedList<Relationship>();
        for (final Relationship r : relationships) {
            if (r.getType() == RelationshipType.REFER_TO) {
                relatedRelationships.add(r);
            }
        }
        return relatedRelationships;
    }
470609
def _get_related_fields(self, model):
        ""
        reverse_fk = self._get_all_related_objects(model)
        reverse_m2m = self._get_all_related_many_to_many_objects(model)

        fields = tuple(reverse_fk + reverse_m2m)
        names = tuple([x.get_accessor_name() for x in fields])

        return {
            ':related': dict(list(zip(names, fields))),
        }
916167
private function getRelationships()
    {
        $r = '';

        $relationships = (array)$this->xml->xpath('/draggy/relationships/relation');

        foreach ($relationships as $relation) {
            $relationAttributes = (array)$relation;
            $relationAttributes = $relationAttributes['@attributes'];

            $this->checkMandatoryAttributes('Relationship', $relationAttributes, ['from', 'to', 'type']);

            $r .= 'var l = new Link(\'' . str_replace(
                '\\',
                '\\\\',
                $relationAttributes['from']
            ) . '\',\'' . str_replace(
                '\\',
                '\\\\',
                $relationAttributes['to']
            ) . '\',\'' . $relationAttributes['type'] . '\',' . ( isset( $relationAttributes['fromAttribute'] ) ? '\'' . $relationAttributes['fromAttribute'] . '\'' : 'undefined' ) . ', ' . ( isset( $relationAttributes['toAttribute'] ) ? '\'' . $relationAttributes['toAttribute'] . '\'' : 'undefined' ) . ')' . PHP_EOL;

            if (isset( $relationAttributes['broken'] )) {
                $r .= 'l.setBroken(' . $relationAttributes['broken'] . ');' . PHP_EOL;
            }

            if (isset( $relationAttributes['persist'] )) {
                if ('true' === $relationAttributes['persist']) { // Backwards compatibility
                    $relationAttributes['persist'] = 'both';
                }

                $r .= 'l.setPersist("' . $relationAttributes['persist'] . '");' . PHP_EOL;
            } else { // Backwards compatibility
                $r .= 'l.setPersist(true);' . PHP_EOL;
            }

            if (isset( $relationAttributes['remove'] )) {
                if ('true' === $relationAttributes['remove']) { // Backwards compatibility
                    $relationAttributes['remove'] = 'both';
                }
                $r .= 'l.setRemove("' . $relationAttributes['remove'] . '");' . PHP_EOL;
            } else { // Backwards compatibility
                $r .= 'l.setRemove(true);' . PHP_EOL;
            }
        }

        return $r;
    }
337686
public Relation getRelations(int i) {
    if (Document_Type.featOkTst && ((Document_Type)jcasType).casFeat_relations == null)
      jcasType.jcas.throwFeatMissing("relations", "de.julielab.jules.types.ace.Document");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Document_Type)jcasType).casFeatCode_relations), i);
    return (Relation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Document_Type)jcasType).casFeatCode_relations), i)));}
416545
public TreeSet<String> getAllRelations() {
		TreeSet<String> set = new TreeSet<String>(); 
		Iterator<FNLPDoc> it1 = docs.iterator();
		while(it1.hasNext()){
			FNLPDoc doc = it1.next();
			Iterator<FNLPSent> it2 = doc.sentences.iterator();
			while(it2.hasNext()){
				FNLPSent sent = it2.next();
				if(!sent.hasRelation())
					continue;
				for(int i=0;i<sent.size();i++){					
					set.add(sent.relations[i]);
				}
			}

		}
		return set;
		
	}
1168957
def relations(cls):
        
        return [c.key for c in cls.__mapper__.iterate_properties
                if isinstance(c, RelationshipProperty)]
1280379
public List<TargetRelationship> getPrerequisiteLevelRelationships() {
        final ArrayList<TargetRelationship> relationships = new ArrayList<TargetRelationship>();
        for (final TargetRelationship relationship : levelRelationships) {
            if (relationship.getType() == RelationshipType.PREREQUISITE) {
                relationships.add(relationship);
            }
        }
        return relationships;
    }
289037
def get_related_node(self, node, relation):
        """"""
        G = self.G
        for edge in G.edges(node):
            to = edge[1]

            to_relation = G.edges[node, to]['relation']
            if to_relation == relation:
                return to
        return None
358513
public List<TargetRelationship> getRelatedLevelRelationships() {
        final ArrayList<TargetRelationship> relationships = new ArrayList<TargetRelationship>();
        for (final TargetRelationship relationship : levelRelationships) {
            if (relationship.getType() == RelationshipType.REFER_TO) {
                relationships.add(relationship);
            }
        }
        return relationships;
    }
370556
public function getRelationships()
    {
        $relationships = array();

        foreach ($this->getProperty() as $name => $property) {
            if ($property->isRelationship()) {
                $relationships[$name] = $property;
            }
        }

        return $relationships;
    }
658359
def get_topic_tree(rs, topic, depth=0):
    

    # Break if we're in too deep.
    if depth > rs._depth:
        rs._warn("Deep recursion while scanning topic trees!")
        return []

    # Collect an array of all topics.
    topics = [topic]

    # Does this topic include others?
    if topic in rs._includes:
        # Try each of these.
        for includes in sorted(rs._includes[topic]):
            topics.extend(get_topic_tree(rs, includes, depth + 1))

    # Does this topic inherit others?
    if topic in rs._lineage:
        # Try each of these.
        for inherits in sorted(rs._lineage[topic]):
            topics.extend(get_topic_tree(rs, inherits, depth + 1))

    return topics
1094884
public Set<RelationshipTuple> getRelationships(PredicateNode predicate,
                                                   ObjectNode object) {
        return getRelationships(PID.toURIReference(m_pid), predicate, object);
    }
1363404
public List<Link> getLinks(LinkRelation relation) {

		Assert.notNull(relation, "Link relation must not be null!");

		return getLinks(relation.value());
	}
798873
public function getRelationships(): array
    {
        $relationships = [];
        if ($this->hasTransformer()) {
            if (($transformer = $this->getTransformer()) instanceof TransformerInterface) {
                $relationships = $transformer->getRelationships();
            }
        }

        return $relationships;
    }
427281
def get_relationships(module_name, id, related_to, opts={})
    login! unless logged_in?
    options = { 
      :query => '',
      :fields => [], 
      :link_fields => [],
      :related_fields => [], 
      :deleted => 0
    }.merge! opts  

    json = <<-EOF
      {
        "session": "#{@sugar_session_id}",
        "module_name": "#{module_name}",
        "module_id": "#{id}",
        "link_field_name": "#{related_to.downcase}",
        "related_module_query": "#{options[:query]}",
        "related_fields": #{((options and options[:related_fields].present?) ? options[:related_fields] : resolve_related_fields(module_name, related_to) ).to_json},     
        "related_module_link_name_to_fields_array": #{options[:link_fields].to_json},
        "deleted": #{options[:deleted]}
      }
    EOF
    #puts "#{json}"
    json.gsub!(/^\s{6}/,'')
    SugarCRM::Response.new(send!(:get_relationships, json), @session, {:always_return_array => true}).to_obj
  end
1077978
@Override
	public ObjectList getObjectRelationships(String repositoryId, String objectId, Boolean includeSubRelationshipTypes, RelationshipDirection relationshipDirection, String typeId, String filter, Boolean includeAllowableActions, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
		return relationshipService.getObjectRelationships(repositoryId, objectId, includeSubRelationshipTypes, relationshipDirection, typeId, filter, includeAllowableActions, maxItems, skipCount, extension);
	}
721826
def get_relations(self, rel_id=None, **kwargs):
        
        return self.get_elements(Relation, elem_id=rel_id, **kwargs)