com.sap.cloud.sdk.service.csn2jpa.cds.model.CdsContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of csn-reader Show documentation
Show all versions of csn-reader Show documentation
API for reading CDS models in CSN format
package com.sap.cloud.sdk.service.csn2jpa.cds.model;
public class CdsContext extends CdsAnnotatable {
public static final CdsContext DEFAULT_CONTEXT = new CdsContext(null);
private final String name;
private CdsContext parent;
public CdsContext(String name) {
this.name = name;
}
public String getCanonicalName() {
return name;
}
public String getName() {
if (name != null) {
return name.substring(name.lastIndexOf('.') + 1);
}
return name;
}
public String getPath() {
if (name != null && name.contains(".")) {
return name.substring(0, name.lastIndexOf('.'));
}
return "";
}
public void setParent(CdsContext parent) {
this.parent = parent;
}
public CdsContext getParent() {
return parent;
}
@Override
public void accept(CdsVisitor visitor) {
visitor.visit(this);
}
@Override
public String toString() {
return name;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy