public PsiElement setName(String newName) {
        ASTNode node;
        if (this instanceof SdImportFieldDefinition) {
            ASTNode asNode = this.getNode().findChildByType(SdTypes.AS);
            node = this.getNode().findChildByType(SdTypes.IDENTIFIER_VAL, asNode);
        } else {
            node = this.getNode().findChildByType(SdTypes.IDENTIFIER_VAL);
        }
        SdIdentifier elementName = null;
        if (node != null) {
            elementName = SdElementFactory.createIdentifierVal(this.getProject(), newName);
        } else {
            node = this.getNode().findChildByType(SdTypes.IDENTIFIER_WITH_DASH_VAL);
        }
        if (node != null) {
            elementName = SdElementFactory.createIdentifierWithDashVal(this.getProject(), newName);
        }
        if (elementName != null) {
            ASTNode newNode = elementName.getFirstChild().getNode();
            this.getNode().replaceChild(node, newNode);
        }
        return this;
    }
This abstract class is used to wrap a Psi Element with SdNamedElement interface, which enables the element to be a
"name owner" (like an identifier). It allows the element to take a part in references, find usages and more.

@author Shahar Ariel
integration/intellij/src/main/java/ai/vespa/intellij/schema/psi/impl/SdNamedElementImpl.java