Adding JAR task to vitro. Changing visibility levels on IndividualToSolrDocument.

This commit is contained in:
briancaruso 2011-07-28 22:22:00 +00:00
parent a477c2face
commit fa8b6db07e
3 changed files with 284 additions and 275 deletions

View file

@ -370,6 +370,8 @@ deploy - Deploy the application directly into the Tomcat webapps directory.
<jar basedir="${build.dir}/war" destfile="${build.dir}/${webapp.name}.war" />
</target>
<!-- =================================
target: licenser

View file

@ -252,6 +252,13 @@
<jar basedir="${build.dir}/war" destfile="${build.dir}/${webapp.name}.war"/>
</target>
<!-- =================================
target: jar
================================= -->
<target name="jar" depends="revisionInfo" description="--> Build the app and create a JAR file">
<jar basedir="${build.dir}/war/WEB-INF/classes" destfile="${build.dir}/${webapp.name}.jar" />
</target>
<!-- =================================
target: licenser

View file

@ -34,15 +34,15 @@ public class IndividualToSolrDocument {
public static VitroSearchTermNames term = new VitroSearchTermNames();
private static String entClassName = Individual.class.getName();
protected static String entClassName = Individual.class.getName();
private ClassProhibitedFromSearch classesProhibitedFromSearch;
protected ClassProhibitedFromSearch classesProhibitedFromSearch;
private IndividualProhibitedFromSearch individualProhibitedFromSearch;
protected IndividualProhibitedFromSearch individualProhibitedFromSearch;
private final String label = "http://www.w3.org/2000/01/rdf-schema#label";
protected final String label = "http://www.w3.org/2000/01/rdf-schema#label";
public List<DocumentModifier> documentModifiers = new ArrayList<DocumentModifier>();
protected List<DocumentModifier> documentModifiers = new ArrayList<DocumentModifier>();
public IndividualToSolrDocument(
ClassProhibitedFromSearch classesProhibitedFromSearch,
@ -130,7 +130,7 @@ public class IndividualToSolrDocument {
}
private void runAdditionalDocModifers( Individual ind, SolrInputDocument doc, StringBuffer addUri )
protected void runAdditionalDocModifers( Individual ind, SolrInputDocument doc, StringBuffer addUri )
throws SkipIndividualException{
//run the document modifiers
if( documentModifiers != null && !documentModifiers.isEmpty()){
@ -140,7 +140,7 @@ public class IndividualToSolrDocument {
}
}
private void checkForSkipBasedOnNS(Individual ind) throws SkipIndividualException {
protected void checkForSkipBasedOnNS(Individual ind) throws SkipIndividualException {
String id = ind.getURI();
if(id == null){
throw new SkipIndividualException("cannot add individuals without URIs to search index");
@ -152,7 +152,7 @@ public class IndividualToSolrDocument {
}
}
private void addAllText(Individual ind, SolrInputDocument doc, StringBuffer classPublicNames, StringBuffer objectNames) {
protected void addAllText(Individual ind, SolrInputDocument doc, StringBuffer classPublicNames, StringBuffer objectNames) {
String t=null;
//ALLTEXT, all of the 'full text'
StringBuffer allTextValue = new StringBuffer();
@ -191,7 +191,7 @@ public class IndividualToSolrDocument {
doc.addField(term.ALLTEXT_PHONETIC, alltext);
}
private void addLabel(Individual ind, SolrInputDocument doc) {
protected void addLabel(Individual ind, SolrInputDocument doc) {
String value = "";
String label = ind.getRdfsLabel();
if (label != null) {
@ -211,7 +211,7 @@ public class IndividualToSolrDocument {
/**
* Adds if the individual has a thumbnail image or not.
*/
private void addThumbnailExistance(Individual ind, SolrInputDocument doc) {
protected void addThumbnailExistance(Individual ind, SolrInputDocument doc) {
try{
if(ind.hasThumb())
doc.addField(term.THUMBNAIL, "1");
@ -226,7 +226,7 @@ public class IndividualToSolrDocument {
* Get the rdfs:labes for objects of statements and put in objectNames.
* Get the URIs for objects of statements and put in addUri.
*/
private void addObjectPropertyText(Individual ind, SolrInputDocument doc,
protected void addObjectPropertyText(Individual ind, SolrInputDocument doc,
StringBuffer objectNames, StringBuffer addUri) {
List<ObjectPropertyStatement> objectPropertyStatements = ind.getObjectPropertyStatements();
if (objectPropertyStatements != null) {