io.apicurio.datamodels.asyncapi.models.AaiCorrelationId Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of data-models-test Show documentation
Show all versions of data-models-test Show documentation
Open Source API Design Studio
package io.apicurio.datamodels.asyncapi.models;
import io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor;
import io.apicurio.datamodels.core.models.ExtensibleNode;
import io.apicurio.datamodels.core.models.IReferenceNode;
import io.apicurio.datamodels.core.models.Node;
import io.apicurio.datamodels.core.models.common.INamed;
import io.apicurio.datamodels.core.visitors.IVisitor;
/**
* @author Jakub Senko
*/
public abstract class AaiCorrelationId extends ExtensibleNode implements IReferenceNode, INamed {
public String _name;
public String $ref;
public String location;
public String description;
/**
* Constructor.
*/
public AaiCorrelationId(String name) {
this._name = name;
}
public AaiCorrelationId(Node parent) {
if(parent != null) {
this._parent = parent;
this._ownerDocument = parent.ownerDocument();
}
}
public AaiCorrelationId(Node parent, String name) {
this(parent);
this._name = name;
}
@Override
public void accept(IVisitor visitor) {
IAaiVisitor v = (IAaiVisitor) visitor;
v.visitCorrelationId(this);
}
/**
* @see io.apicurio.datamodels.core.models.common.INamed#getName()
*/
@Override
public String getName() {
return this._name;
}
/**
* @see io.apicurio.datamodels.core.models.common.INamed#rename(java.lang.String)
*/
@Override
public void rename(String newName) {
this._name = newName;
}
@Override
public String getReference() {
return $ref;
}
@Override
public void setReference(String reference) {
$ref = reference;
}
}