Creates a new {@link Entity} with provided identifier and label
@param id a {@link QualifiedName} for the entity
@param label a String for the label property (see {@link HasLabel#getLabel()}
@return an object of type {@link Entity}
10571
public Entity newEntity(QualifiedName id, String label) {
	Entity res = newEntity(id);
	if (label != null)
	    res.getLabel().add(newInternationalizedString(label));
	return res;
    }
677848
public void addLabel(Label label)
    {
        // Add the label to any applications it is associated with
        List<Long> applicationIds = label.getLinks().getApplications();
        for(long applicationId : applicationIds)
        {
            Application application = applications.get(applicationId);
            if(application != null)
                labels(applicationId).add(label);
            else
                logger.severe(String.format("Unable to find application for label '%s': %d", label.getKey(), applicationId));
        }
    }
70606
static LabelId getVertexTypeId(Vertex vertex) {
        if (vertex.property(Schema.VertexProperty.THING_TYPE_LABEL_ID.name()).isPresent()) {
            return LabelId.of(vertex.value(Schema.VertexProperty.THING_TYPE_LABEL_ID.name()));
        }
        return LabelId.invalid();
    }
874384
public static Label.Builder generateLabelBuilder(final Locale locale, final String label) {
        return addLabel(Label.newBuilder(), locale.getLanguage(), label);
    }
341369
function (object, label, callback) {

                var labelObject = this.$.dataSource.createEntity(ObjectLabel);

                labelObject.set({
                    object: object,
                    objectType: this.$.dataSource.createEntity(ObjectType, this.getObjectTypeIdForElement(object)),
                    label: label
                });

                labelObject.save(callback);
            }
425204
public static LabelList make(Collection<String> labels) {
    int size = labels.size();
    if(size == 0) {
      return EMPTY_LABELS;
    }
    return new LabelList(labels.toArray(new String[size]));
  }
643514
public EntityContainer getEntityContainer(String id) {
        EntityContainer ec = (EntityContainer) getPmsession().getContainer(id);
        if (ec == null) {
            ec = getPresentationManager().newEntityContainer(id);
            getPmsession().setContainer(id, ec);
        }
        return ec;
    }
891135
public void storeLabel(String label) {
        if (labels == null)
            labels = new ArrayList<>();

        if (!uniq.contains(label)) {
            uniq.add(label);
            labels.add(label);
        }
    }
968271
public void trySetIdentity(Object entity, String id) {
        Class<?> entityType = entity.getClass();
        Field identityProperty = _conventions.getIdentityProperty(entityType);

        if (identityProperty == null) {
            return;
        }

        setPropertyOrField(identityProperty.getType(), entity, identityProperty, id);
    }
65581
private <T extends IEntity> Object verifyEntityId(T entity) throws FMSException {
        Class<?> objectClass = entity.getClass();
        Object rid = null;
        Method m;

        try {
            m = objectClass.getMethod("getId");
            rid = m.invoke(entity);
        } catch (Exception e) {
            throw new FMSException("Unable to read the method getId", e);
        }

        if (rid == null) {
            throw new FMSException("Id is required.");
        }
        return rid;
    }
195367
protected D createModelWithId(Object id, T entity) {
		return createModelWithId(id, entity, new Object[0]);
	}
949557
public JRadioButton createRadioButton(String labelKey) {
		return (JRadioButton) getButtonLabelInfo(getRequiredMessage(labelKey)).configure(createNewRadioButton());
	}
764392
protected Label newAddTabButtonLabel(final String id, final IModel<String> model)
	{
		return ComponentFactory.newLabel(id, model);
	}
1135909
public static TransactionException invalidLabelStart(Label label) {
        return create(String.format("Cannot create a label {%s} starting with character {%s} as it is a reserved starting character", label, Schema.ImplicitType.RESERVED.getValue()));
    }
216356
public final Statement labelStart(final Label label) {
    return new Statement() {
      @Override
      protected void doGen(CodeBuilder adapter) {
        adapter.mark(label);
        Statement.this.gen(adapter);
      }
    };
  }
143169
public void addLabel(Label label) {
        assertNotNull(label);
        labels.add(label);
        label.setParent(this);
    }
628233
protected Label newChildLabel(final String forId, final IModel<String> model) {
		return ComponentFactory.newLabel("childLabel", forId, model);
	}