Fixed queries and test

This commit is contained in:
luca.frosini 2023-11-09 17:21:21 +01:00
parent 00e0fc2a55
commit dfccd87a62
5 changed files with 7 additions and 7 deletions

View File

@ -769,14 +769,14 @@ public abstract class EntityManagement<E extends Entity, ET extends EntityType>
StringBuilder selectStringBuilder = new StringBuilder("SELECT FROM (TRAVERSE "); StringBuilder selectStringBuilder = new StringBuilder("SELECT FROM (TRAVERSE ");
selectStringBuilder.append(direction.opposite().name().toLowerCase()); selectStringBuilder.append(direction.name().toLowerCase());
selectStringBuilder.append("V('"); selectStringBuilder.append("V('");
selectStringBuilder.append(typeName); selectStringBuilder.append(typeName);
selectStringBuilder.append("')"); selectStringBuilder.append("')");
selectStringBuilder.append(", "); selectStringBuilder.append(", ");
selectStringBuilder.append(direction.name().toLowerCase()); selectStringBuilder.append(direction.opposite().name().toLowerCase());
selectStringBuilder.append("E('"); selectStringBuilder.append("E('");
selectStringBuilder.append(relationType); selectStringBuilder.append(relationType);
selectStringBuilder.append("')"); selectStringBuilder.append("')");
@ -803,7 +803,7 @@ public abstract class EntityManagement<E extends Entity, ET extends EntityType>
selectStringBuilder.append(" WHERE @class"); selectStringBuilder.append(" WHERE @class");
if(polymorphic) { if(polymorphic) {
selectStringBuilder.append(" INSTANCEOF "); selectStringBuilder.append(" INSTANCEOF '");
} else { } else {
selectStringBuilder.append("='"); selectStringBuilder.append("='");
} }

View File

@ -430,7 +430,7 @@ public class Access extends BaseRest {
* *
* All the EService having an incoming (IN) Hosts relation (i.e. hosted by) the HostingNode with UUID * All the EService having an incoming (IN) Hosts relation (i.e. hosted by) the HostingNode with UUID
* 16032d09-3823-444e-a1ff-a67de4f350a * 16032d09-3823-444e-a1ff-a67de4f350a
* * GET /access/query/EService/hosts/HostingNode?_reference=16032d09-3823-444e-a1ff-a67de4f350a8&_polymorphic=true&_direction=in * * GET /access/query/EService/Hosts/HostingNode?_reference=16032d09-3823-444e-a1ff-a67de4f350a8&_polymorphic=true&_direction=in
* *
*/ */
@SuppressWarnings({"rawtypes"}) @SuppressWarnings({"rawtypes"})

View File

@ -63,7 +63,6 @@ public class ContextTest {
try { try {
// load the properties file // load the properties file
properties.load(input); properties.load(input);
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }

View File

@ -337,7 +337,7 @@ public class QueryTest extends ERManagementTest {
@Test @Test
public void getAllResourcesHavingFacet() throws ObjectNotFound, Exception { public void getAllResourcesHavingFacet() throws ObjectNotFound, Exception {
String[] names = new String[]{"MyTest", "MyTest", "Aux", "MyID", "MyID"}; String[] names = new String[]{"MyTest", "MyTest", "Aux", "MyID", "MyID"};
Object[] additionalProperties = new Object[] {5, 5.0, false, "test", null}; Object[] additionalProperties = new Object[] {5, 6.0, false, "test", null};
List<Configuration> createdConfigurations = new ArrayList<>(); List<Configuration> createdConfigurations = new ArrayList<>();

View File

@ -14,8 +14,9 @@
<logger name="org.gcube.informationsystem.types" level="INFO" /> <logger name="org.gcube.informationsystem.types" level="INFO" />
<logger name="org.gcube.informationsystem.resourceregistry.dbinitialization" level="INFO" /> <logger name="org.gcube.informationsystem.resourceregistry.dbinitialization" level="INFO" />
<logger name="org.gcube.informationsystem.utils.discovery" level="ERROR" /> <logger name="org.gcube.informationsystem.utils.discovery" level="ERROR" />
<logger name="org.gcube.informationsystem.resourceregistry" level="TRACE" />
<logger name="org.gcube.informationsystem.resourceregistry.contexts" level="INFO" /> <logger name="org.gcube.informationsystem.resourceregistry.contexts" level="INFO" />
<logger name="org.gcube.informationsystem.resourceregistry.types" level="TRACE" /> <logger name="org.gcube.informationsystem.resourceregistry.types" level="INFO" />
<logger name="org.gcube.informationsystem.resourceregistry.instances" level="TRACE" /> <logger name="org.gcube.informationsystem.resourceregistry.instances" level="TRACE" />
<root level="WARN"> <root level="WARN">