Improving class

This commit is contained in:
luca.frosini 2023-10-26 17:59:10 +02:00
parent 58b688a9ad
commit b3cb92f55a
1 changed files with 13 additions and 2 deletions

View File

@ -3,14 +3,15 @@ package org.gcube.informationsystem.discovery.knowledge;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.Set; import java.util.Set;
import org.gcube.informationsystem.base.reference.AccessType;
import org.gcube.informationsystem.base.reference.Element; import org.gcube.informationsystem.base.reference.Element;
import org.gcube.informationsystem.tree.NodeInformation; import org.gcube.informationsystem.model.knowledge.TypeInformation;
import org.gcube.informationsystem.types.TypeMapper; import org.gcube.informationsystem.types.TypeMapper;
/** /**
* @author Luca Frosini (ISTI - CNR) * @author Luca Frosini (ISTI - CNR)
*/ */
public class ClassInformation implements NodeInformation<Class<Element>> { public class ClassInformation implements TypeInformation<Class<Element>> {
@Override @Override
public String getIdentifier(Class<Element> clz) { public String getIdentifier(Class<Element> clz) {
@ -35,4 +36,14 @@ public class ClassInformation implements NodeInformation<Class<Element>> {
return ret; return ret;
} }
@Override
public AccessType getAccessType(Class<Element> clz) {
return AccessType.getAccessType(clz);
}
@Override
public Class<Element> getRoot(AccessType accessType) {
return accessType.getTypeClass();
}
} }