Add a relationship to the target level.

@param level The target level that is to be related to.
@param type  The type of the relationship.
768370
public void addRelationshipToTarget(final Level level, final RelationshipType type) {
        final TargetRelationship relationship = new TargetRelationship(this, level, type);
        levelRelationships.add(relationship);
        relationships.add(relationship);
    }
1164994
private void addRelatedType(JSType type, JSTypeBitSet related) {
    computeRelatedTypesForNonUnionType(type);
    related.or(relatedBitsets.get(type));
  }
940179
public void addType(final Type... _type)
        throws EFapsException
    {
        final List<Type> allType = new ArrayList<>();
        if (this.types.isEmpty()) {
            final Type type = Type.get(this.typeUUID);
            if (type.isAbstract()) {
                final List<Type> childTypes = type.getChildTypes()
                                .stream()
                                .filter(t -> !t.isAbstract())
                                .collect(Collectors.toList());
                allType.addAll(childTypes);
            } else {
                allType.add(type);
            }
        }
        for (final UUID type : this.types) {
            allType.add(Type.get(type));
        }
        for (final Type type : _type) {
            if (type.isAbstract()) {
                final List<Type> childTypes = type.getChildTypes()
                                .stream()
                                .filter(t -> !t.isAbstract())
                                .collect(Collectors.toList());
                allType.addAll(childTypes);
            } else {
                allType.add(type);
            }
        }

        //make for every type a list of types up to the parent
        final List<List<Type>> typeLists = new ArrayList<>();
        for (final Type type : allType) {
            final List<Type> typesTmp = new ArrayList<>();
            typeLists.add(typesTmp);
            Type tmpType = type;
            while (tmpType != null) {
                typesTmp.add(tmpType);
                tmpType = tmpType.getParentType();
            }
        }

        final Set<Type> common = new LinkedHashSet<>();
        if (!typeLists.isEmpty()) {
            final Iterator<List<Type>> iterator = typeLists.iterator();
            common.addAll(iterator.next());
            while (iterator.hasNext()) {
                common.retainAll(iterator.next());
            }
        }
        if (common.isEmpty()) {
            throw new EFapsException(QueryBuilder.class, "noCommon", allType);
        } else {
            // first common type
            this.typeUUID = common.iterator().next().getUUID();
            for (final Type type : allType) {
                this.types.add(type.getUUID());
            }
        }
        // special case handling
        if (this.types.size() == 1 && this.types.iterator().next().equals(this.typeUUID)) {
            this.types.clear();
        }
    }
1019342
private void createRelation(CmsResource resource, CmsResource target, String relationType, boolean importCase)
    throws CmsException {

        CmsRelationType type = CmsRelationType.valueOf(relationType);
        m_securityManager.addRelationToResource(m_context, resource, target, type, importCase);
    }
1226062
public final <A extends NodeInterface, B extends NodeInterface, S extends Source, T extends Target> boolean hasRelationship(final Class<? extends Relation<A, B, S, T>> type) {
		return this.getRelationships(type).iterator().hasNext();
	}
148550
public void createTypeAssociations() {
		// Connect the child to the parent rtype and interface rtypes
		ClassLoader classLoader = getClazz().getClassLoader();
		if (classLoader == null) {
			return;
		}
		ReloadableType srtype = getSuperRtype();
		if (srtype != null) {
			srtype.recordSubtype(this);
		}
		ReloadableType[] irtypes = getInterfacesRtypes();
		if (irtypes != null) {
			for (ReloadableType irtype : irtypes) {
				irtype.recordSubtype(this);
			}
		}
	}
577495
public void setLevel(String logger, Level level) {
      Logger log = getLogger(logger);
      log.setLevel(level);
      for (String loggerName : getLoggerNames()) {
         if (loggerName.startsWith(logger) && !loggerName.equals(logger)) {
            getLogger(loggerName).setLevel(level);
         }
      }
   }
719525
private static void setLevel(ArrayList level) {
        _syncLevel = nextLevel();

        if (_syncLevel == _syncLevels.size()) {
            _syncLevels.add(level);
        } else {
            _syncLevels.set(_syncLevel, level);
        }
    }
599957
public void setLoggerLevel(String level) {
        if ("TRACE".equalsIgnoreCase(level)) {
            this.level = TRACE;
        } else if ("DEBUG".equalsIgnoreCase(level)) {
            this.level = DEBUG;
        } else if ("INFO".equalsIgnoreCase(level)) {
            this.level = INFO;
        } else if ("WARN".equalsIgnoreCase(level)) {
            this.level = WARN;
        } else if ("ERROR".equalsIgnoreCase(level)) {
            this.level = ERROR;
        }
    }
85226
public void addRelationLabel(Relation e0, HashMap<String,String> properties) {
        String label=null;
        if (!(e0 instanceof QualifiedRelation)) return;
        QualifiedRelation e=(QualifiedRelation)e0;
        List<Type> type=pf.getType(e);
        if ((type!=null) && (!type.isEmpty())) {
            label=type.get(0).getValue().toString();
        } else if (getRelationPrintRole(e)) {
            String role=pf.getRole(e);
            if (role!=null) {
                label=displayRole(role);
                properties.put("fontsize","8");
            }
        }
        if (label!=null) {
            properties.put("label",convertRelationLabel(label));
            if (properties.get("fontsize")==null) {
                properties.put("fontsize","10");
            }
        }
    }
1030582
public void register(Type<?> type) {
        jdbcTypeMapping.register(type.getSQLTypes()[0], type.getReturnedClass());
        javaTypeMapping.register(type);
    }
580743
public void updateAssociations(JMFType type) {
    super.updateAssociations(type);
    itemType.updateAssociations(((JSRepeated)type).getItemType());
  }
1246428
public void setWarningLevel(int level) {
        if (level < WarningMessage.NONE || level > WarningMessage.PARANOIA) {
            this.warningLevel = WarningMessage.LIKELY_ERRORS;
        }
        else {
            this.warningLevel = level;
        }
    }
716195
public static void addLevelsToDatabase(final BuildDatabase buildDatabase, final Level level) {
        // Add the level to the database
        buildDatabase.add(level);

        // Add the child levels to the database
        for (final Level childLevel : level.getChildLevels()) {
            addLevelsToDatabase(buildDatabase, childLevel);
        }
    }
783958
public void addRelation(RelationType relationType, RelationDirection direction) {
	int idx = relationType.ordinal();
	directions[idx] = directions[idx].sum(direction);
    }
981825
public void addRelationship(int iLinkType, Record recLeft, Record recRight, int ifldLeft1, int ifldRight1)
    {
        String fldLeft1 = recLeft.getField(ifldLeft1).getFieldName();
        String fldRight1 = recRight.getField(ifldRight1).getFieldName();
        this.addRelationship(iLinkType, recLeft, recRight, fldLeft1, fldRight1);
    }
966310
public static void addCustomLevel(Level level, String id) {
        if (level == null) {
            throw new IllegalArgumentException("Parameter level can not be 'null' in this call");
        }
        if (id == null) {
            id = level.getName().substring(0, 1);
        }
        customLevels.put(level, id);
    }