git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerCore@11226 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
59273a62b8
commit
bb85bb6e9b
|
@ -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<String> schemata;
|
||||
protected Vector<String> metadataIDs;
|
||||
protected Vector<String> languages;
|
||||
protected Vector<IndexInfo> indices;
|
||||
protected HashMap<String, List<EndpointReferenceType>> 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<String>();
|
||||
metadataIDs = new Vector<String>();
|
||||
languages = new Vector<String>();
|
||||
indices = new Vector<IndexInfo>();
|
||||
forward = new HashMap<String, List<EndpointReferenceType>>();
|
||||
}
|
||||
|
||||
/**
|
||||
* @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<String, List<EndpointReferenceType>> getForward() {
|
||||
return forward;
|
||||
}
|
||||
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue