adding licence to classes, removing sparql feed related classes

This commit is contained in:
hudajkhan 2013-08-13 12:23:49 -04:00
parent ad0ae3c09a
commit 6ea7d9ef37
26 changed files with 58 additions and 326 deletions

View file

@ -203,7 +203,9 @@ var addConceptForm = {
var definedBy = conceptResult.definedBy; var definedBy = conceptResult.definedBy;
var type = conceptResult.type; var type = conceptResult.type;
var uri = conceptResult.uri; var uri = conceptResult.uri;
return addConceptForm.generateIndividualConceptDisplay(uri, label, definition, type, definedBy, isBestMatch); //this will be null if there are no alternate labels
var altLabels = conceptResult.altLabelList;
return addConceptForm.generateIndividualConceptDisplay(uri, label, altLabels, definition, type, definedBy, isBestMatch);
}, },
//This should now return all best matches in one array and other results in another //This should now return all best matches in one array and other results in another
parseResults:function(resultsArray) { parseResults:function(resultsArray) {
@ -260,12 +262,12 @@ var addConceptForm = {
this.externalConceptSemanticTypeLabel.val(conceptSemanticTypes); this.externalConceptSemanticTypeLabel.val(conceptSemanticTypes);
return true; return true;
}, },
generateIndividualConceptDisplay: function(cuiURI, label, definition, type, definedBy, isBestMatch) { generateIndividualConceptDisplay: function(cuiURI, label, altLabels, definition, type, definedBy, isBestMatch) {
var htmlAdd = "<li class='concepts'>" + var htmlAdd = "<li class='concepts'>" +
"<div class='row'>" + "<div class='row'>" +
"<div class='column conceptLabel'>" + "<div class='column conceptLabel'>" +
addConceptForm.generateIndividualCUIInput(cuiURI, label, type, definedBy) + addConceptForm.generateIndividualCUIInput(cuiURI, label, type, definedBy) +
label + addConceptForm.generateIndividualTypeDisplay(type) + "</div>" + addConceptForm.generateIndividualLabelsDisplay(label, altLabels) + addConceptForm.generateIndividualTypeDisplay(type) + "</div>" +
addConceptForm.generateIndividualDefinitionDisplay(definition) + addConceptForm.generateIndividualDefinitionDisplay(definition) +
addConceptForm.generateBestOrAlternate(isBestMatch) + addConceptForm.generateBestOrAlternate(isBestMatch) +
"</div>" + "</div>" +
@ -275,6 +277,14 @@ var addConceptForm = {
generateIndividualCUIInput:function(cuiURI, label, type, definedBy) { generateIndividualCUIInput:function(cuiURI, label, type, definedBy) {
return "<input type='checkbox' name='CUI' value='" + cuiURI + "' label='" + label + "' conceptType='" + type + "' conceptDefinedBy='" + definedBy + "'/>"; return "<input type='checkbox' name='CUI' value='" + cuiURI + "' label='" + label + "' conceptType='" + type + "' conceptDefinedBy='" + definedBy + "'/>";
}, },
//In case there are multiple labels display those
generateIndividualLabelsDisplay:function(label, altLabels) {
var labelDisplay = label;
if(altLabels != null && altLabels.length > 0) {
labelDisplay += "<br>(" + altLabels + ")";
}
return labelDisplay;
},
generateIndividualTypeDisplay:function(type) { generateIndividualTypeDisplay:function(type) {
if(type != null && type.length > 0) { if(type != null && type.length > 0) {
return " (" + type + ")"; return " (" + type + ")";

View file

@ -1,3 +1,4 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.bo; package edu.cornell.mannlib.semservices.bo;
public class BaseObject { public class BaseObject {

View file

@ -1,3 +1,5 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.bo; package edu.cornell.mannlib.semservices.bo;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -1,3 +1,5 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.bo; package edu.cornell.mannlib.semservices.bo;

View file

@ -1,3 +1,5 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.bo; package edu.cornell.mannlib.semservices.bo;
import java.util.Calendar; import java.util.Calendar;

View file

@ -1,3 +1,5 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.bo; package edu.cornell.mannlib.semservices.bo;
public class SemanticServicesError { public class SemanticServicesError {

View file

@ -1,3 +1,5 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.bo; package edu.cornell.mannlib.semservices.bo;
public class SemanticServicesInfoBase { public class SemanticServicesInfoBase {

View file

@ -1,208 +0,0 @@
package edu.cornell.mannlib.semservices.bo;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
public class SparqlFeed extends BaseObject implements Serializable {
/**
*
*/
private static final long serialVersionUID = 6024170338796859330L;
private String name;
private String endpoint;
private String repository;
private String query;
private int mapperId;
private int fetcherId;
private Map<String, String> parameterMap;
/**
* Constructor
*/
public SparqlFeed() {
super();
parameterMap = new HashMap<String, String>();
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the endpoint
*/
public String getEndpoint() {
return endpoint;
}
/**
* @param endpoint the endpoint to set
*/
public void setEndpoint(String endpoint) {
this.endpoint = endpoint;
}
/**
* @return the repository
*/
public String getRepository() {
return repository;
}
/**
* @param repository the repository to set
*/
public void setRepository(String repository) {
this.repository = repository;
}
/**
* @return the query
*/
public String getQuery() {
return query;
}
/**
* @param query the query to set
*/
public void setQuery(String query) {
this.query = query;
}
/**
* @return the mapperId
*/
public int getMapperId() {
return mapperId;
}
/**
* @param mapperId the mapperId to set
*/
public void setMapperId(int mapperId) {
this.mapperId = mapperId;
}
/**
* @return the fetcherId
*/
public int getFetcherId() {
return fetcherId;
}
/**
* @param fetcherId the fetcherId to set
*/
public void setFetcherId(int fetcherId) {
this.fetcherId = fetcherId;
}
/**
* @return the parameterMap
*/
public Map<String, String> getParameterMap() {
return parameterMap;
}
/**
* @param parameterMap the parameterMap to set
*/
public void setParameterMap(Map<String, String> parameterMap) {
this.parameterMap = parameterMap;
}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((endpoint == null) ? 0 : endpoint.hashCode());
result = prime * result + fetcherId;
result = prime * result + mapperId;
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result
+ ((parameterMap == null) ? 0 : parameterMap.hashCode());
result = prime * result + ((query == null) ? 0 : query.hashCode());
result = prime * result
+ ((repository == null) ? 0 : repository.hashCode());
return result;
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
SparqlFeed other = (SparqlFeed) obj;
if (endpoint == null) {
if (other.endpoint != null) {
return false;
}
} else if (!endpoint.equals(other.endpoint)) {
return false;
}
if (fetcherId != other.fetcherId) {
return false;
}
if (mapperId != other.mapperId) {
return false;
}
if (name == null) {
if (other.name != null) {
return false;
}
} else if (!name.equals(other.name)) {
return false;
}
if (parameterMap == null) {
if (other.parameterMap != null) {
return false;
}
} else if (!parameterMap.equals(other.parameterMap)) {
return false;
}
if (query == null) {
if (other.query != null) {
return false;
}
} else if (!query.equals(other.query)) {
return false;
}
if (repository == null) {
if (other.repository != null) {
return false;
}
} else if (!repository.equals(other.repository)) {
return false;
}
return true;
}
}

View file

@ -1,61 +0,0 @@
package edu.cornell.mannlib.semservices.bo;
import java.io.Serializable;
public class SparqlFeedParam extends BaseObject implements Serializable {
/**
*
*/
private static final long serialVersionUID = 4602167398212576479L;
private int sparqlFeedId;
private String param;
private String value;
public SparqlFeedParam() {
// default constructor
}
/**
* @return the sparqlFeedId
*/
public int getSparqlFeedId() {
return sparqlFeedId;
}
/**
* @param sparqlFeedId the sparqlFeedId to set
*/
public void setSparqlFeedId(int sparqlFeedId) {
this.sparqlFeedId = sparqlFeedId;
}
/**
* @return the param
*/
public String getParam() {
return param;
}
/**
* @param param the param to set
*/
public void setParam(String param) {
this.param = param;
}
/**
* @return the value
*/
public String getValue() {
return value;
}
/**
* @param value the value to set
*/
public void setValue(String value) {
this.value = value;
}
}

View file

@ -1,54 +0,0 @@
package edu.cornell.mannlib.semservices.bo;
import java.util.HashMap;
import java.util.Map;
public class SparqlPlugin extends BaseObject {
private String type;
private String name;
private String classname;
/**
*
*/
public SparqlPlugin() {
super();
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the type
*/
public String getType() {
return type;
}
/**
* @param type the type to set
*/
public void setType(String type) {
this.type = type;
}
/**
* @return the classname
*/
public String getClassname() {
return classname;
}
/**
* @param classname the classname to set
*/
public void setClassname(String classname) {
this.classname = classname;
}
}

View file

@ -1,3 +1,5 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.bo; package edu.cornell.mannlib.semservices.bo;
import java.util.Date; import java.util.Date;

View file

@ -1,3 +1,5 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.exceptions; package edu.cornell.mannlib.semservices.exceptions;
public class ConceptsNotFoundException extends Exception { public class ConceptsNotFoundException extends Exception {

View file

@ -1,3 +1,5 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.service; package edu.cornell.mannlib.semservices.service;
import java.util.List; import java.util.List;

View file

@ -1,3 +1,5 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.service.impl; package edu.cornell.mannlib.semservices.service.impl;

View file

@ -1,3 +1,5 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.service.impl; package edu.cornell.mannlib.semservices.service.impl;
import java.io.BufferedReader; import java.io.BufferedReader;

View file

@ -1,3 +1,5 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
/* /*
* $Id$ * $Id$
* CONFIDENTIAL AND PROPRIETARY. ? 2007 Revolution Health Group LLC. All rights reserved. * CONFIDENTIAL AND PROPRIETARY. ? 2007 Revolution Health Group LLC. All rights reserved.

View file

@ -1,3 +1,5 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
/* /*
* $Id: DateConverter.java 50408 2007-03-28 19:14:46Z jdamick $ * $Id: DateConverter.java 50408 2007-03-28 19:14:46Z jdamick $
* *

View file

@ -1,3 +1,5 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.util; package edu.cornell.mannlib.semservices.util;
import java.text.ParsePosition; import java.text.ParsePosition;

View file

@ -1,3 +1,5 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.util; package edu.cornell.mannlib.semservices.util;

View file

@ -1,3 +1,5 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.util; package edu.cornell.mannlib.semservices.util;
import java.util.Iterator; import java.util.Iterator;
import javax.xml.XMLConstants; import javax.xml.XMLConstants;

View file

@ -1,4 +1,7 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
/* /*
* $Id$ * $Id$
* CONFIDENTIAL AND PROPRIETARY. © 2007 Revolution Health Group LLC. All rights reserved. * CONFIDENTIAL AND PROPRIETARY. © 2007 Revolution Health Group LLC. All rights reserved.
* This source code may not be disclosed to others, used or reproduced without the written permission of Revolution Health Group. * This source code may not be disclosed to others, used or reproduced without the written permission of Revolution Health Group.

View file

@ -1,3 +1,5 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.util; package edu.cornell.mannlib.semservices.util;
import edu.cornell.mannlib.semservices.bo.Time; import edu.cornell.mannlib.semservices.bo.Time;
import java.util.Date; import java.util.Date;

View file

@ -1,3 +1,5 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.util; package edu.cornell.mannlib.semservices.util;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;

View file

@ -1,4 +1,7 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
/* /*
* $Id: XMLGregorianCalendarConverter.java 28642 2006-10-25 13:41:54Z jdamick $ * $Id: XMLGregorianCalendarConverter.java 28642 2006-10-25 13:41:54Z jdamick $
* *
* Copyright 2006- Revolution Health Group. All rights reserved. * Copyright 2006- Revolution Health Group. All rights reserved.

View file

@ -1,3 +1,5 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.util; package edu.cornell.mannlib.semservices.util;
import java.io.BufferedWriter; import java.io.BufferedWriter;

View file

@ -1,3 +1,5 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
/* /*
* $Id: BeanToJsonSerializer.java 66350 2007-08-20 21:11:41Z xluan $ * $Id: BeanToJsonSerializer.java 66350 2007-08-20 21:11:41Z xluan $
* *