final OClass cls = db.getMetadata().getSchema().getClass(urlParts[2]);
final String propertyName = urlParts[3];
final OType propertyType = urlParts.length > 4 ? OType.valueOf(urlParts[4]) : OType.STRING;
switch (propertyType) {
case LINKLIST:
case LINKMAP:
case LINKSET: {
if (urlParts.length < 6) {
throw new OHttpRequestException("Syntax error: property named " + propertyName + " is declared as " + propertyType
+ " but linked type is not declared: property/<database>/<class-name>/<property-name>/<property-type>/<link-type>");
}
final OType linkType = OType.valueOf(urlParts[5]);
final OClass linkClass = db.getMetadata().getSchema().getClass(urlParts[5]);
if (linkType != null && linkClass != null) {
throw new IllegalArgumentException(
"linked type declared as "
+ urlParts[5]