![JAR search and dependency download from the Maven repository](/logo.png)
com.mercateo.common.rest.schemagen.link.relation.Relation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common.rest.schemagen Show documentation
Show all versions of common.rest.schemagen Show documentation
Jersey add-on for dynamic link and schema building
package com.mercateo.common.rest.schemagen.link.relation;
public interface Relation {
RelationType DEFAULT_TYPE = RelType.SELF.getRelationType();
String getName();
RelationType getType();
static & RelationContainer> Relation of(E relation) {
return of(relation, DEFAULT_TYPE);
}
static & RelationContainer> Relation of(E relation, RelationTypeContainer typeContainer) {
return of(relation, typeContainer.getRelationType());
}
static & RelationContainer> Relation of(E relation, RelationType type) {
return of(relation.name().toLowerCase().replace('_', '-'), type);
}
static Relation of(String name, RelationTypeContainer typeContainer) {
return of(name, typeContainer.getRelationType());
}
static Relation of(String name) {
return new RelationDefault(name, DEFAULT_TYPE);
}
static Relation of(String name, RelationType type) {
return new RelationDefault(name, type);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy