Updates for add role to person two stage logic

This commit is contained in:
hjkhjk54 2011-11-02 21:04:19 +00:00
parent babd610e03
commit 75eb9952d0
4 changed files with 317 additions and 158 deletions

View file

@ -2,6 +2,7 @@
package org.vivoweb.webapp.util;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@ -19,10 +20,10 @@ public class ModelUtils {
private static final Log log = LogFactory.getLog(ModelUtils.class.getName());
public static final String processPropertyURI = "http://vivoweb.org/ontology/core#roleRealizedIn";
public static final String processPropertyInverseURI = "http://vivoweb.org/ontology/core#realizedRole";
public static final String nonProcessPropertyURI = "http://vivoweb.org/ontology/core#roleContributesTo";
public static final String nonProcessPropertyInverseURI = "http://vivoweb.org/ontology/core#ContributingRole";
private static final String processPropertyURI = "http://vivoweb.org/ontology/core#roleRealizedIn";
private static final String processPropertyInverseURI = "http://vivoweb.org/ontology/core#realizedRole";
private static final String nonProcessPropertyURI = "http://vivoweb.org/ontology/core#roleContributesTo";
private static final String nonProcessPropertyInverseURI = "http://vivoweb.org/ontology/core#ContributingRole";
private static Set<String> processClass = new HashSet<String>();
static {
@ -79,4 +80,19 @@ public class ModelUtils {
return op;
}
//Return list of all possible predicates
public static List<String> getPossiblePropertiesForRole() {
List<String> properties = new ArrayList<String>();
properties.add(processPropertyURI);
properties.add(nonProcessPropertyURI);
return properties;
}
public static List<String> getPossibleInversePropertiesForRole() {
List<String> properties = new ArrayList<String>();
properties.add(processPropertyInverseURI);
properties.add(nonProcessPropertyInverseURI);
return properties;
}
}