From bb85bb6e9bcda20b4a7c2b9c3f74a3a4835fbf52 Mon Sep 17 00:00:00 2001 From: Rena Tsantouli Date: Thu, 9 Apr 2009 11:56:20 +0000 Subject: [PATCH] git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerCore@11226 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../core/commons/model/CollectionInfo.java | 189 ------------------ .../core/commons/model/IndexInfo.java | 73 ------- .../core/commons/model/SearchField.java | 54 ----- 3 files changed, 316 deletions(-) delete mode 100644 src/org/gcube/application/framework/core/commons/model/CollectionInfo.java delete mode 100644 src/org/gcube/application/framework/core/commons/model/IndexInfo.java delete mode 100644 src/org/gcube/application/framework/core/commons/model/SearchField.java diff --git a/src/org/gcube/application/framework/core/commons/model/CollectionInfo.java b/src/org/gcube/application/framework/core/commons/model/CollectionInfo.java deleted file mode 100644 index 74d0a76..0000000 --- a/src/org/gcube/application/framework/core/commons/model/CollectionInfo.java +++ /dev/null @@ -1,189 +0,0 @@ -package org.gcube.application.framework.core.commons.model; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.List; -import java.util.Vector; -import org.apache.axis.message.addressing.EndpointReferenceType; - - - -/** - * Collection's information - * @author valia, giotak, UoA - * - */ -public class CollectionInfo implements Serializable{ - - private static final long serialVersionUID = 1L; - protected String id; - protected String name; - protected String shortName; - protected String description; - protected String reference; - protected Vector schemata; - protected Vector metadataIDs; - protected Vector languages; - protected Vector indices; - protected HashMap> forward; - - /** - * @return collection's description - */ - public String getDescription() { - return description; - } - /** - * @param description collection's description - */ - public void setDescription(String description) { - this.description = description; - } - /** - * @return collection's ID - */ - public String getId() { - return id; - } - /** - * @param id collection's ID - */ - public void setId(String id) { - this.id = id; - } - /** - * @return collection's name - */ - public String getName() { - return name; - } - /** - * @param name collection's name - */ - public void setName(String name) { - this.name = name; - } - /** - * Constructor of the class - */ - public CollectionInfo() { - id = ""; - name = ""; - shortName = ""; - description = ""; - reference = ""; - schemata = new Vector(); - metadataIDs = new Vector(); - languages = new Vector(); - indices = new Vector(); - forward = new HashMap>(); - } - - /** - * @param i the position of the metadata schema - * @return the schema in the specified position. - */ - public String getSchema(int i) { - return schemata.get(i); - } - - /** - * @param i the position of the metadata schema - * @return metadata's ID - */ - public String getMetadataID(int i) { - return metadataIDs.get(i); - } - - /** - * @param i the position of the metadata schema - * @return the language for this schema - */ - public String getLanguage(int i) { - return languages.get(i); - } - - /** - * @param i the position of the metadata schema - * @return an object that contains info about the existence or not of specific indices - */ - public IndexInfo getIndexInfo(int i) { - return indices.get(i); - } - - /** - * @return the collection's short name - */ - public String getShortName() { - return shortName; - } - - /** - * @param shortName the collection's short name - */ - public void setShortName(String shortName) { - this.shortName = shortName; - } - - /** - * @param schema collection's schema name (e.g. dc, tei) - * @param metaID the ID of the metadata collection - * @param language metadata collection's language - * @param index the indices that collection has - */ - public void setMetadataCollection(String schema, String metaID, String language, IndexInfo index) - { - this.schemata.add(schema); - this.metadataIDs.add(metaID); - this.languages.add(language); - this.indices.add(index); - } - - /** - * @return the reference to this collection (usually a url) - */ - public String getReference() { - return reference; - } - - /** - * @param reference the reference to this collection (usually a url) - */ - public void setReference(String reference) { - this.reference = reference; - } - - /** - * @param schema metadata collection's schema - * @return true if this collection has a corresponding metadata collection with this schema, otherwise false. - */ - public boolean hasSchema(String schema) - { - return this.schemata.contains(schema); - } - - /** - * @param schema metadata collection's schema - * @return true if this collection has a corresponding metadata collection with this schema, otherwise false. - */ - public int getIndexOfSchema(String schema) - { - return this.schemata.indexOf(schema); - } - - /** - * @return the number of corrsponding metadata collections - */ - public int getMetadataSize() - { - return this.metadataIDs.size(); - } - - /** - * @return the forward indices stored in a hasmap. The key to the hasmap is collection together with the field, and the value is an EPR to the index. - */ - public HashMap> getForward() { - return forward; - } - -} diff --git a/src/org/gcube/application/framework/core/commons/model/IndexInfo.java b/src/org/gcube/application/framework/core/commons/model/IndexInfo.java deleted file mode 100644 index 4584d88..0000000 --- a/src/org/gcube/application/framework/core/commons/model/IndexInfo.java +++ /dev/null @@ -1,73 +0,0 @@ -package org.gcube.application.framework.core.commons.model; - -import java.io.Serializable; - -/** - * @author Valia Tsagkalidou (NKUA) - * - */ -public class IndexInfo implements Serializable{ - /** - * - */ - private static final long serialVersionUID = 1L; - protected boolean fts; - protected boolean geospatial; - protected boolean similarity; - - /** - * The constructor of the class - * - */ - public IndexInfo() { - super(); - fts = false; - geospatial = false; - similarity = false; - } - - /** - * @return whether an FTS index exists for this collection - */ - public boolean isFts() { - return fts; - } - - /** - * @return whether a geospatial index exists for this collection - */ - public boolean isGeospatial() { - return geospatial; - } - - /** - * @return whether a similarity index exists for this collection - */ - public boolean isSimilarity() { - return similarity; - } - - /** - * Sets the value whether a full text index exists - * @param fts true or false - */ - public void setFts(boolean fts) { - this.fts = fts; - } - - /** - * Sets the value whether a geo-spatial index exists - * @param geospatial true or false - */ - public void setGeospatial(boolean geospatial) { - this.geospatial = geospatial; - } - - /** - * Sets the value whether a similarity index exists - * @param similarity true or false - */ - public void setSimilarity(boolean similarity) { - this.similarity = similarity; - } -} diff --git a/src/org/gcube/application/framework/core/commons/model/SearchField.java b/src/org/gcube/application/framework/core/commons/model/SearchField.java deleted file mode 100644 index 1d2f55c..0000000 --- a/src/org/gcube/application/framework/core/commons/model/SearchField.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.gcube.application.framework.core.commons.model; - -import java.io.Serializable; - -/** - * - * @author Panagiota Koltsida (NKUA) - * @author Valia Tsagkalidou (NKUA) - * - */ -//TODO: Done!!! -public class SearchField implements Serializable, Cloneable{ - /** - * - */ - private static final long serialVersionUID = 1L; - - /** - * Name of the criterion - */ - public String name; - - /** - * Value of the criterion - */ - public String value; - - /** - * Type of the criterion - */ - public String type; - - /** - * The x-path to apply for sorting the results - */ - public String sort; - - public SearchField() { - name = ""; - value = ""; - type = ""; - sort = ""; - } - - /* (non-Javadoc) - * @see java.lang.Object#clone() - */ - @Override - public SearchField clone() throws CloneNotSupportedException { - // TODO Auto-generated method stub - return (SearchField) super.clone(); - } - -}