minor fix

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/catalogue-ws@148287 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2017-05-03 16:25:57 +00:00
parent 1e5a5593ac
commit b9d2d30552
5 changed files with 15 additions and 12 deletions

View File

@ -18,10 +18,15 @@
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -1,8 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.compiler.source=1.8

View File

@ -3,6 +3,7 @@
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<property name="context-root" value="catalogue-ws"/>
<property name="java-output-path" value="/catalogue-ws/target/classes"/>
</wb-module>

View File

@ -3,6 +3,6 @@
<fixed facet="wst.jsdt.web"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="java" version="1.7"/>
<installed facet="jst.jaxrs" version="2.0"/>
<installed facet="java" version="1.8"/>
</faceted-project>

View File

@ -397,13 +397,10 @@ public class CatalogueUtils {
// fetch the profile by metadata type specified above
MetadataFormat profile = null;
String profileNameMatched = null;
for (String profileName : profiles) {
profile = getMetadataProfile(profileName);
if(profile.getType().equals(metadataTypeCF.getValue())){
profileNameMatched = profileName;
if(profile.getType().equals(metadataTypeCF.getValue()))
break;
}
else
profile = null;
}
@ -422,9 +419,9 @@ public class CatalogueUtils {
extrasArrayUpdated = new JSONArray();
List<NamespaceCategory> categories = getNamespaceCategories();
List<String> categoriesIds = new ArrayList<String>(categories.size());
List<String> categoriesIds = new ArrayList<String>(categories == null ? 0 : categories.size());
if(categoriesIds.isEmpty())
logger.warn("No category defined into profile " + profileNameMatched);
logger.warn("No category defined");
else{
for (NamespaceCategory metadataCategory : categories)
categoriesIds.add(metadataCategory.getId()); // save them later for matching with custom fields
@ -536,7 +533,7 @@ public class CatalogueUtils {
List<CustomField> toReturn = new ArrayList<CustomField>();
String metadataFieldName = metadataField.getFieldName();
// maintain status about: is this the first time this field is parsed?
// keep track of the number of elements with this key
int fieldsFoundWithThisKey = 0;
Iterator<CustomField> iterator = customFields.iterator();