Reoganinizing library
This commit is contained in:
parent
7a3a98549f
commit
c7985f7aad
|
@ -80,6 +80,10 @@ public class Discovery<E extends Element> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addRegistrationProvider(RegistrationProvider registrationProvider) {
|
||||||
|
addPackages(registrationProvider.getPackagesToRegister());
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
protected void add(Class<E> clz) throws Exception {
|
protected void add(Class<E> clz) throws Exception {
|
||||||
if(!discoveredElement.contains(clz)) {
|
if(!discoveredElement.contains(clz)) {
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class ModelExtensionKnowledge {
|
||||||
AddElementToTreeAction aetta = new AddElementToTreeAction(tree);
|
AddElementToTreeAction aetta = new AddElementToTreeAction(tree);
|
||||||
|
|
||||||
Discovery<? extends Element> discovery = new Discovery<>(clz, false);
|
Discovery<? extends Element> discovery = new Discovery<>(clz, false);
|
||||||
discovery.addPackages(registrationProvider.getPackagesToRegister());
|
discovery.addRegistrationProvider(registrationProvider);
|
||||||
discovery.addDiscoveredElementActions(new ElementMappingAction());
|
discovery.addDiscoveredElementActions(new ElementMappingAction());
|
||||||
discovery.addDiscoveredElementActions(aetta);
|
discovery.addDiscoveredElementActions(aetta);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
package org.gcube.informationsystem.discovery.knowledge;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.gcube.informationsystem.base.reference.AccessType;
|
||||||
|
import org.gcube.informationsystem.base.reference.Element;
|
||||||
|
import org.gcube.informationsystem.tree.Tree;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
|
*/
|
||||||
|
public class ModelKnowledge {
|
||||||
|
|
||||||
|
protected Map<AccessType, Tree<Class<Element>>> trees;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -101,7 +101,7 @@ public abstract class ElementMapper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void registerPackages(List<Package> packages) {
|
public static void registerPackages(List<Package> packages) {
|
||||||
DiscoveredElementAction schemaAction = new ElementMappingAction();
|
DiscoveredElementAction<Element> schemaAction = new ElementMappingAction();
|
||||||
try {
|
try {
|
||||||
DiscoveryUtility.manageISM(schemaAction, packages);
|
DiscoveryUtility.manageISM(schemaAction, packages);
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.gcube.informationsystem.types.knowledge;
|
package org.gcube.informationsystem.types.knowledge.toBeRemoved;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.gcube.informationsystem.types.knowledge;
|
package org.gcube.informationsystem.types.knowledge.toBeRemoved;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
|
@ -1,4 +1,4 @@
|
||||||
package org.gcube.informationsystem.types.knowledge;
|
package org.gcube.informationsystem.types.knowledge.toBeRemoved;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.gcube.informationsystem.types.knowledge;
|
package org.gcube.informationsystem.types.knowledge.toBeRemoved;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
Loading…
Reference in New Issue