NIHVIVO-2254 Create unit tests for IndividualFiltering
This commit is contained in:
parent
14a027b803
commit
d070c84453
6 changed files with 6557 additions and 16 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
package edu.cornell.mannlib.vitro.testing;
|
||||
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
import static junit.framework.Assert.fail;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
|
@ -21,6 +22,8 @@ import java.io.Writer;
|
|||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
|
@ -360,4 +363,25 @@ public abstract class AbstractTestClass {
|
|||
return result.toString().replaceAll(">\\s+<", "><");
|
||||
}
|
||||
|
||||
protected <T extends Comparable<T>> void assertEqualSets(String label,
|
||||
Set<T> expected, Set<T> actual) {
|
||||
if (expected.equals(actual)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Set<T> missing = new TreeSet<T>(expected);
|
||||
missing.removeAll(actual);
|
||||
Set<T> extras = new TreeSet<T>(actual);
|
||||
extras.removeAll(expected);
|
||||
|
||||
String message = label;
|
||||
if (!missing.isEmpty()) {
|
||||
message += ", missing: " + missing;
|
||||
}
|
||||
if (!extras.isEmpty()) {
|
||||
message += ", extra: " + extras;
|
||||
}
|
||||
assertEquals(message, expected, actual);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,105 @@
|
|||
# $This file is distributed under the terms of the license in /doc/license.txt$
|
||||
|
||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
||||
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
|
||||
@prefix bib: <http://purl.org/ontology/bibo/> .
|
||||
@prefix core: <http://vivoweb.org/ontology/core#> .
|
||||
@prefix mydomain: <http://vivo.mydomain.edu/individual/> .
|
||||
@prefix vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> .
|
||||
@prefix role: <http://vitro.mannlib.cornell.edu/ns/vitro/role#> .
|
||||
|
||||
### This file is for the test IndividualFilteringTest.java.
|
||||
|
||||
#
|
||||
# Bozo
|
||||
#
|
||||
mydomain:bozo
|
||||
a foaf:Person ;
|
||||
|
||||
foaf:firstName "Bozo" ;
|
||||
foaf:lastName "Person" ;
|
||||
core:hrJobTitle "Clown" ;
|
||||
core:primaryEmail "bozo@Comedy.com" ;
|
||||
core:phoneNumber "555-9999" ;
|
||||
core:email "bozo@clowncollege.edu";
|
||||
|
||||
core:editorOf mydomain:publicObject ;
|
||||
core:editorOf mydomain:selfObject ;
|
||||
core:editorOf mydomain:editorObject ;
|
||||
core:editorOf mydomain:curatorObject ;
|
||||
core:editorOf mydomain:dbaObject ;
|
||||
core:editorOf mydomain:hiddenObject ;
|
||||
|
||||
core:roleIn mydomain:publicObject ;
|
||||
core:roleIn mydomain:selfObject ;
|
||||
core:roleIn mydomain:editorObject ;
|
||||
core:roleIn mydomain:curatorObject ;
|
||||
core:roleIn mydomain:dbaObject ;
|
||||
core:roleIn mydomain:hiddenObject ;
|
||||
|
||||
core:roleOf mydomain:publicObject ;
|
||||
core:roleOf mydomain:selfObject ;
|
||||
core:roleOf mydomain:editorObject ;
|
||||
core:roleOf mydomain:curatorObject ;
|
||||
core:roleOf mydomain:dbaObject ;
|
||||
core:roleOf mydomain:hiddenObject ;
|
||||
|
||||
core:partOf mydomain:publicObject ;
|
||||
core:partOf mydomain:selfObject ;
|
||||
core:partOf mydomain:editorObject ;
|
||||
core:partOf mydomain:curatorObject ;
|
||||
core:partOf mydomain:dbaObject ;
|
||||
core:partOf mydomain:hiddenObject ;
|
||||
|
||||
core:offers mydomain:publicObject ;
|
||||
core:offers mydomain:selfObject ;
|
||||
core:offers mydomain:editorObject ;
|
||||
core:offers mydomain:curatorObject ;
|
||||
core:offers mydomain:dbaObject ;
|
||||
core:offers mydomain:hiddenObject ;
|
||||
|
||||
core:featuredIn mydomain:publicObject ;
|
||||
core:featuredIn mydomain:selfObject ;
|
||||
core:featuredIn mydomain:editorObject ;
|
||||
core:featuredIn mydomain:curatorObject ;
|
||||
core:featuredIn mydomain:dbaObject ;
|
||||
core:featuredIn mydomain:hiddenObject ;
|
||||
.
|
||||
|
||||
#
|
||||
# public Homepage
|
||||
#
|
||||
mydomain:publicHomepage
|
||||
a foaf:Document ;
|
||||
rdfs:label "public homepage" ;
|
||||
.
|
||||
|
||||
#
|
||||
# Objects of object properties
|
||||
#
|
||||
mydomain:publicObject
|
||||
a core:Student ;
|
||||
rdfs:label "public file" ;
|
||||
.
|
||||
mydomain:selfObject
|
||||
a core:Presentation ;
|
||||
rdfs:label "self file" ;
|
||||
.
|
||||
mydomain:editorObject
|
||||
a core:SeminarSeries ;
|
||||
rdfs:label "editor file" ;
|
||||
.
|
||||
mydomain:curatorObject
|
||||
a core:Video ;
|
||||
rdfs:label "curator file" ;
|
||||
.
|
||||
mydomain:dbaObject
|
||||
a core:ClinicalRole ;
|
||||
rdfs:label "dba file" ;
|
||||
.
|
||||
mydomain:hiddenObject
|
||||
a core:Facility ;
|
||||
rdfs:label "hidden file" ;
|
||||
.
|
|
@ -0,0 +1,44 @@
|
|||
# $This file is distributed under the terms of the license in /doc/license.txt$
|
||||
|
||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
||||
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
|
||||
@prefix bib: <http://purl.org/ontology/bibo/> .
|
||||
@prefix core: <http://vivoweb.org/ontology/core#> .
|
||||
@prefix mydomain: <http://vivo.mydomain.edu/individual/> .
|
||||
@prefix vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> .
|
||||
@prefix role: <http://vitro.mannlib.cornell.edu/ns/vitro/role#> .
|
||||
|
||||
|
||||
### This file is for the test IndividualFilteringTest.java.
|
||||
|
||||
#
|
||||
# restrict the data properties.
|
||||
#
|
||||
foaf:lastName vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public .
|
||||
foaf:firstName vitro:hiddenFromDisplayBelowRoleLevelAnnot role:selfEditor .
|
||||
core:email vitro:hiddenFromDisplayBelowRoleLevelAnnot role:editor .
|
||||
core:hrJobTitle vitro:hiddenFromDisplayBelowRoleLevelAnnot role:curator .
|
||||
core:phoneNumber vitro:hiddenFromDisplayBelowRoleLevelAnnot role:dbAdmin .
|
||||
core:primaryEmail vitro:hiddenFromDisplayBelowRoleLevelAnnot role:nobody .
|
||||
|
||||
#
|
||||
# restrict the object properties.
|
||||
#
|
||||
core:editorOf vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public .
|
||||
core:roleIn vitro:hiddenFromDisplayBelowRoleLevelAnnot role:selfEditor .
|
||||
core:roleOf vitro:hiddenFromDisplayBelowRoleLevelAnnot role:editor .
|
||||
core:partOf vitro:hiddenFromDisplayBelowRoleLevelAnnot role:curator .
|
||||
core:offers vitro:hiddenFromDisplayBelowRoleLevelAnnot role:dbAdmin .
|
||||
core:featuredIn vitro:hiddenFromDisplayBelowRoleLevelAnnot role:nobody .
|
||||
|
||||
#
|
||||
# restrict the classes of the objects.
|
||||
#
|
||||
core:Student vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public .
|
||||
core:Presentation vitro:hiddenFromDisplayBelowRoleLevelAnnot role:selfEditor .
|
||||
core:SeminarSeries vitro:hiddenFromDisplayBelowRoleLevelAnnot role:editor .
|
||||
core:Video vitro:hiddenFromDisplayBelowRoleLevelAnnot role:curator .
|
||||
core:ClinicalRole vitro:hiddenFromDisplayBelowRoleLevelAnnot role:dbAdmin .
|
||||
core:Facility vitro:hiddenFromDisplayBelowRoleLevelAnnot role:nobody .
|
|
@ -0,0 +1,610 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
package edu.cornell.mannlib.vitro.webapp.dao.filtering;
|
||||
|
||||
import static edu.cornell.mannlib.vitro.webapp.beans.BaseResourceBean.RoleLevel.CURATOR;
|
||||
import static edu.cornell.mannlib.vitro.webapp.beans.BaseResourceBean.RoleLevel.DB_ADMIN;
|
||||
import static edu.cornell.mannlib.vitro.webapp.beans.BaseResourceBean.RoleLevel.EDITOR;
|
||||
import static edu.cornell.mannlib.vitro.webapp.beans.BaseResourceBean.RoleLevel.PUBLIC;
|
||||
import static edu.cornell.mannlib.vitro.webapp.beans.BaseResourceBean.RoleLevel.SELF;
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
import static junit.framework.Assert.fail;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.Parameterized;
|
||||
import org.junit.runners.Parameterized.Parameters;
|
||||
|
||||
import com.hp.hpl.jena.ontology.OntModel;
|
||||
import com.hp.hpl.jena.ontology.OntModelSpec;
|
||||
import com.hp.hpl.jena.rdf.model.ModelFactory;
|
||||
import com.hp.hpl.jena.rdf.model.Statement;
|
||||
import com.hp.hpl.jena.rdf.model.StmtIterator;
|
||||
|
||||
import edu.cornell.mannlib.vitro.testing.AbstractTestClass;
|
||||
import edu.cornell.mannlib.vitro.webapp.beans.BaseResourceBean.RoleLevel;
|
||||
import edu.cornell.mannlib.vitro.webapp.beans.DataProperty;
|
||||
import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement;
|
||||
import edu.cornell.mannlib.vitro.webapp.beans.Individual;
|
||||
import edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty;
|
||||
import edu.cornell.mannlib.vitro.webapp.beans.ObjectPropertyStatement;
|
||||
import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
|
||||
import edu.cornell.mannlib.vitro.webapp.dao.filtering.filters.HiddenFromDisplayBelowRoleLevelFilter;
|
||||
import edu.cornell.mannlib.vitro.webapp.dao.jena.OntModelSelectorImpl;
|
||||
import edu.cornell.mannlib.vitro.webapp.dao.jena.WebappDaoFactoryJena;
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@RunWith(value = Parameterized.class)
|
||||
public class IndividualFilteringTest extends AbstractTestClass {
|
||||
private static final Log log = LogFactory
|
||||
.getLog(IndividualFilteringTest.class);
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Data elements and creating the model.
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Files that will create the TBOX.
|
||||
*/
|
||||
private static final String TBOX_VITRO_CORE_FILENAME = "vitro-0.7.owl";
|
||||
private static final String TBOX_VIVO_CORE_FILENAME = "vivo-core-1.2.owl";
|
||||
private static final String TBOX_ANNOTATIONS_FILENAME = "IndividualFilteringTest-TBoxAnnotations.n3";
|
||||
|
||||
/**
|
||||
* Where the model statements are stored for this test.
|
||||
*/
|
||||
private static final String ABOX_DATA_FILENAME = "IndividualFilteringTest-Abox.n3";
|
||||
|
||||
/**
|
||||
* The individual we are reading.
|
||||
*/
|
||||
private static final String NS = "http://vivo.mydomain.edu/individual/";
|
||||
private static final String INDIVIDUAL_URI = NS + "bozo";
|
||||
|
||||
/**
|
||||
* Data properties to look for.
|
||||
*/
|
||||
private static final String PUBLIC_DATA_PROPERTY = "http://xmlns.com/foaf/0.1/lastName";
|
||||
private static final String SELF_DATA_PROPERTY = "http://xmlns.com/foaf/0.1/firstName";
|
||||
private static final String EDITOR_DATA_PROPERTY = "http://vivoweb.org/ontology/core#email";
|
||||
private static final String CURATOR_DATA_PROPERTY = "http://vivoweb.org/ontology/core#hrJobTitle";
|
||||
private static final String DBA_DATA_PROPERTY = "http://vivoweb.org/ontology/core#phoneNumber";
|
||||
private static final String HIDDEN_DATA_PROPERTY = "http://vivoweb.org/ontology/core#primaryEmail";
|
||||
private static final String[] DATA_PROPERTIES = { PUBLIC_DATA_PROPERTY,
|
||||
SELF_DATA_PROPERTY, EDITOR_DATA_PROPERTY, CURATOR_DATA_PROPERTY,
|
||||
DBA_DATA_PROPERTY, HIDDEN_DATA_PROPERTY };
|
||||
|
||||
/**
|
||||
* Object properties to look for.
|
||||
*/
|
||||
private static final String PUBLIC_OBJECT_PROPERTY = "http://vivoweb.org/ontology/core#editorOf";
|
||||
private static final String SELF_OBJECT_PROPERTY = "http://vivoweb.org/ontology/core#roleIn";
|
||||
private static final String EDITOR_OBJECT_PROPERTY = "http://vivoweb.org/ontology/core#roleOf";
|
||||
private static final String CURATOR_OBJECT_PROPERTY = "http://vivoweb.org/ontology/core#partOf";
|
||||
private static final String DBA_OBJECT_PROPERTY = "http://vivoweb.org/ontology/core#offers";
|
||||
private static final String HIDDEN_OBJECT_PROPERTY = "http://vivoweb.org/ontology/core#featuredIn";
|
||||
private static final String[] OBJECT_PROPERTIES = { PUBLIC_OBJECT_PROPERTY,
|
||||
SELF_OBJECT_PROPERTY, EDITOR_OBJECT_PROPERTY,
|
||||
CURATOR_OBJECT_PROPERTY, DBA_OBJECT_PROPERTY,
|
||||
HIDDEN_OBJECT_PROPERTY };
|
||||
|
||||
/**
|
||||
* Objects to look for.
|
||||
*/
|
||||
private static final String PUBLIC_OBJECT = "http://vivo.mydomain.edu/individual/publicObject";
|
||||
private static final String SELF_OBJECT = "http://vivo.mydomain.edu/individual/selfObject";
|
||||
private static final String EDITOR_OBJECT = "http://vivo.mydomain.edu/individual/editorObject";
|
||||
private static final String CURATOR_OBJECT = "http://vivo.mydomain.edu/individual/curatorObject";
|
||||
private static final String DBA_OBJECT = "http://vivo.mydomain.edu/individual/dbaObject";
|
||||
private static final String HIDDEN_OBJECT = "http://vivo.mydomain.edu/individual/hiddenObject";
|
||||
private static final String[] OBJECTS = { PUBLIC_OBJECT, SELF_OBJECT,
|
||||
EDITOR_OBJECT, CURATOR_OBJECT, DBA_OBJECT, HIDDEN_OBJECT };
|
||||
|
||||
private static TestData publicTestData() {
|
||||
TestData data = new TestData(PUBLIC);
|
||||
data.addExpectedDataProperties(PUBLIC_DATA_PROPERTY);
|
||||
data.addExpectedObjectProperties(PUBLIC_OBJECT_PROPERTY);
|
||||
data.addExpectedObjects(PUBLIC_OBJECT);
|
||||
return data;
|
||||
}
|
||||
|
||||
private static TestData selfTestData() {
|
||||
TestData data = new TestData(SELF);
|
||||
data.addExpectedDataProperties(PUBLIC_DATA_PROPERTY, SELF_DATA_PROPERTY);
|
||||
data.addExpectedObjectProperties(PUBLIC_OBJECT_PROPERTY,
|
||||
SELF_OBJECT_PROPERTY);
|
||||
data.addExpectedObjects(PUBLIC_OBJECT, SELF_OBJECT);
|
||||
return data;
|
||||
}
|
||||
|
||||
private static TestData editorTestData() {
|
||||
TestData data = new TestData(EDITOR);
|
||||
data.addExpectedDataProperties(PUBLIC_DATA_PROPERTY,
|
||||
SELF_DATA_PROPERTY, EDITOR_DATA_PROPERTY);
|
||||
data.addExpectedObjectProperties(PUBLIC_OBJECT_PROPERTY,
|
||||
SELF_OBJECT_PROPERTY, EDITOR_OBJECT_PROPERTY);
|
||||
data.addExpectedObjects(PUBLIC_OBJECT, SELF_OBJECT, EDITOR_OBJECT);
|
||||
return data;
|
||||
}
|
||||
|
||||
private static TestData curatorTestData() {
|
||||
TestData data = new TestData(CURATOR);
|
||||
data.addExpectedDataProperties(PUBLIC_DATA_PROPERTY,
|
||||
SELF_DATA_PROPERTY, EDITOR_DATA_PROPERTY, CURATOR_DATA_PROPERTY);
|
||||
data.addExpectedObjectProperties(PUBLIC_OBJECT_PROPERTY,
|
||||
SELF_OBJECT_PROPERTY, EDITOR_OBJECT_PROPERTY,
|
||||
CURATOR_OBJECT_PROPERTY);
|
||||
data.addExpectedObjects(PUBLIC_OBJECT, SELF_OBJECT, EDITOR_OBJECT,
|
||||
CURATOR_OBJECT);
|
||||
return data;
|
||||
}
|
||||
|
||||
private static TestData dbaTestData() {
|
||||
TestData data = new TestData(DB_ADMIN);
|
||||
data.addExpectedDataProperties(PUBLIC_DATA_PROPERTY,
|
||||
SELF_DATA_PROPERTY, EDITOR_DATA_PROPERTY,
|
||||
CURATOR_DATA_PROPERTY, DBA_DATA_PROPERTY);
|
||||
data.addExpectedObjectProperties(PUBLIC_OBJECT_PROPERTY,
|
||||
SELF_OBJECT_PROPERTY, EDITOR_OBJECT_PROPERTY,
|
||||
CURATOR_OBJECT_PROPERTY, DBA_OBJECT_PROPERTY);
|
||||
data.addExpectedObjects(PUBLIC_OBJECT, SELF_OBJECT, EDITOR_OBJECT,
|
||||
CURATOR_OBJECT, DBA_OBJECT);
|
||||
return data;
|
||||
}
|
||||
|
||||
private static OntModelSelectorImpl ontModelSelector;
|
||||
|
||||
@BeforeClass
|
||||
public static void createTheModels() throws IOException {
|
||||
ontModelSelector = new OntModelSelectorImpl();
|
||||
ontModelSelector.setABoxModel(createAboxModel());
|
||||
ontModelSelector.setTBoxModel(createTboxModel());
|
||||
ontModelSelector.setFullModel(mergeModels(ontModelSelector));
|
||||
}
|
||||
|
||||
private static OntModel createAboxModel() throws IOException {
|
||||
OntModel ontModel = ModelFactory
|
||||
.createOntologyModel(OntModelSpec.OWL_DL_MEM);
|
||||
readFileIntoModel(ontModel, ABOX_DATA_FILENAME, "N3");
|
||||
|
||||
dumpModel(ontModel);
|
||||
|
||||
return ontModel;
|
||||
}
|
||||
|
||||
private static OntModel createTboxModel() throws IOException {
|
||||
OntModel ontModel = ModelFactory
|
||||
.createOntologyModel(OntModelSpec.OWL_DL_MEM);
|
||||
|
||||
readFileIntoModel(ontModel, TBOX_VITRO_CORE_FILENAME, "RDF/XML");
|
||||
readFileIntoModel(ontModel, TBOX_VIVO_CORE_FILENAME, "RDF/XML");
|
||||
readFileIntoModel(ontModel, TBOX_ANNOTATIONS_FILENAME, "N3");
|
||||
|
||||
return ontModel;
|
||||
}
|
||||
|
||||
private static OntModel mergeModels(OntModelSelectorImpl selector) {
|
||||
OntModel ontModel = ModelFactory
|
||||
.createOntologyModel(OntModelSpec.OWL_DL_MEM);
|
||||
|
||||
ontModel.add(selector.getABoxModel());
|
||||
ontModel.add(selector.getTBoxModel());
|
||||
|
||||
return ontModel;
|
||||
}
|
||||
|
||||
private static void readFileIntoModel(OntModel ontModel, String filename,
|
||||
String format) throws IOException {
|
||||
InputStream stream = IndividualFilteringTest.class
|
||||
.getResourceAsStream(filename);
|
||||
ontModel.read(stream, null, format);
|
||||
stream.close();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Set up for each test
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
@Parameters
|
||||
public static Collection<Object[]> data() {
|
||||
// return Arrays.asList(new Object[][] { { dbaTestData() } });
|
||||
return Arrays.asList(new Object[][] { { publicTestData() },
|
||||
{ selfTestData() }, { editorTestData() },
|
||||
{ curatorTestData() }, { dbaTestData() } });
|
||||
}
|
||||
|
||||
private final TestData testData;
|
||||
private WebappDaoFactory wadf;
|
||||
private Individual ind;
|
||||
|
||||
@Before
|
||||
public void createTheFilteredIndividual() {
|
||||
WebappDaoFactory rawWadf = new WebappDaoFactoryJena(ontModelSelector);
|
||||
wadf = new WebappDaoFactoryFiltering(rawWadf,
|
||||
new HiddenFromDisplayBelowRoleLevelFilter(testData.loginRole,
|
||||
rawWadf));
|
||||
ind = wadf.getIndividualDao().getIndividualByURI(INDIVIDUAL_URI);
|
||||
}
|
||||
|
||||
public IndividualFilteringTest(TestData testData) {
|
||||
this.testData = testData;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// The tests
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
@Test
|
||||
public void testGetDataPropertyList() {
|
||||
assertEqualSets("data property list",
|
||||
testData.expectedDataPropertyUris,
|
||||
extractDataPropUris(ind.getDataPropertyList()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetPopulatedDataPropertyList() {
|
||||
assertEqualSets("populated data property list",
|
||||
testData.expectedDataPropertyUris,
|
||||
extractDataPropUris(ind.getPopulatedDataPropertyList()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDataPropertyStatements() {
|
||||
assertEqualSets("data property statments",
|
||||
testData.expectedDataPropertyUris,
|
||||
extractDataPropStmtUris(ind.getDataPropertyStatements()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDataPropertyStatements2() {
|
||||
for (String propUri : DATA_PROPERTIES) {
|
||||
Set<String> uris = extractDataPropStmtUris(ind
|
||||
.getDataPropertyStatements(propUri));
|
||||
if (testData.expectedDataPropertyUris.contains(propUri)) {
|
||||
assertEquals("selected data property: " + propUri,
|
||||
Collections.singleton(propUri), uris);
|
||||
} else {
|
||||
assertEquals("selected data property: " + propUri,
|
||||
Collections.emptySet(), uris);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDataPropertyMap() {
|
||||
assertEqualSets("data property map", testData.expectedDataPropertyUris,
|
||||
ind.getDataPropertyMap().keySet());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testObjectPropertyList() {
|
||||
assertEqualSets("object properties",
|
||||
testData.expectedObjectPropertyUris,
|
||||
extractObjectPropUris(ind.getObjectPropertyList()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPopulatedObjectPropertyList() {
|
||||
assertEqualSets("populated object properties",
|
||||
testData.expectedObjectPropertyUris,
|
||||
extractObjectPropUris(ind.getPopulatedObjectPropertyList()));
|
||||
}
|
||||
|
||||
/**
|
||||
* We expect to see an object property statment for each permitted property
|
||||
* and each permitted object. If class filtering is disabled, then all
|
||||
* objects are permitted.
|
||||
*/
|
||||
@Test
|
||||
public void testObjectPropertyStatements() {
|
||||
Collection<String> expectedObjects = filteringOnClasses() ? testData.expectedObjectUris
|
||||
: Arrays.asList(OBJECTS);
|
||||
assertExpectedObjectPropertyStatements("object property statements",
|
||||
testData.expectedObjectPropertyUris, expectedObjects,
|
||||
ind.getObjectPropertyStatements());
|
||||
}
|
||||
|
||||
/**
|
||||
* We expect to see an object property statment for each permitted property
|
||||
* and each permitted object. If class filtering is disabled, then all
|
||||
* objects are permitted.
|
||||
*/
|
||||
@Test
|
||||
public void testObjectPropertyStatements2() {
|
||||
Collection<String> expectedObjects = filteringOnClasses() ? testData.expectedObjectUris
|
||||
: Arrays.asList(OBJECTS);
|
||||
for (String propUri : OBJECT_PROPERTIES) {
|
||||
if (testData.expectedObjectPropertyUris.contains(propUri)) {
|
||||
assertExpectedObjectPropertyStatements(
|
||||
"object property statements for " + propUri,
|
||||
Collections.singleton(propUri), expectedObjects,
|
||||
ind.getObjectPropertyStatements(propUri));
|
||||
} else {
|
||||
assertExpectedObjectPropertyStatements(
|
||||
"object property statements for " + propUri,
|
||||
Collections.<String> emptySet(), expectedObjects,
|
||||
ind.getObjectPropertyStatements(propUri));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testObjectPropertyMap() {
|
||||
assertEqualSets("object property map",
|
||||
testData.expectedObjectPropertyUris, ind.getObjectPropertyMap()
|
||||
.keySet());
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// helper methods
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Are we filtering on VClasses? Use reflection to read that protected
|
||||
* constant.
|
||||
*/
|
||||
private boolean filteringOnClasses() {
|
||||
try {
|
||||
Class<?> clazz = HiddenFromDisplayBelowRoleLevelFilter.class;
|
||||
Field field = clazz
|
||||
.getDeclaredField("FILTER_ON_INDIVIDUAL_VCLASSES");
|
||||
field.setAccessible(true);
|
||||
return (Boolean) field.get(null);
|
||||
} catch (Exception e) {
|
||||
fail("Can't decide on class filtering: " + e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/** Get the URIs from these DataProperties */
|
||||
private Set<String> extractDataPropUris(
|
||||
Collection<DataProperty> dataProperties) {
|
||||
Set<String> uris = new TreeSet<String>();
|
||||
if (dataProperties != null) {
|
||||
for (DataProperty dp : dataProperties) {
|
||||
uris.add(dp.getURI());
|
||||
}
|
||||
}
|
||||
return uris;
|
||||
}
|
||||
|
||||
/** Get the URIs from these DataPropertyStatements */
|
||||
private Set<String> extractDataPropStmtUris(
|
||||
Collection<DataPropertyStatement> dataPropertyStatements) {
|
||||
Set<String> uris = new TreeSet<String>();
|
||||
if (dataPropertyStatements != null) {
|
||||
for (DataPropertyStatement dps : dataPropertyStatements) {
|
||||
uris.add(dps.getDatapropURI());
|
||||
}
|
||||
}
|
||||
return uris;
|
||||
}
|
||||
|
||||
/** Get the URIs from these ObjectProperties */
|
||||
private Set<String> extractObjectPropUris(
|
||||
Collection<ObjectProperty> objectProperties) {
|
||||
Set<String> uris = new TreeSet<String>();
|
||||
if (objectProperties != null) {
|
||||
for (ObjectProperty op : objectProperties) {
|
||||
uris.add(op.getURI());
|
||||
}
|
||||
}
|
||||
return uris;
|
||||
}
|
||||
|
||||
/** Get the URIs from these DataPropertyStatements */
|
||||
private Set<String> extractObjectPropStmtUris(
|
||||
Collection<ObjectPropertyStatement> objectPropertyStatements) {
|
||||
Set<String> uris = new TreeSet<String>();
|
||||
if (objectPropertyStatements != null) {
|
||||
for (ObjectPropertyStatement ops : objectPropertyStatements) {
|
||||
uris.add(ops.getPropertyURI());
|
||||
}
|
||||
}
|
||||
return uris;
|
||||
}
|
||||
|
||||
/**
|
||||
* We expect one statement for each combination of expected object
|
||||
* properties and expected object.
|
||||
*/
|
||||
private void assertExpectedObjectPropertyStatements(String label,
|
||||
Collection<String> expectedPropertyUris,
|
||||
Collection<String> expectedObjectUris,
|
||||
List<ObjectPropertyStatement> actualStmts) {
|
||||
Set<ObjectPropertyStatementUris> actualStmtUris = new HashSet<ObjectPropertyStatementUris>();
|
||||
for (ObjectPropertyStatement actualStmt : actualStmts) {
|
||||
actualStmtUris.add(new ObjectPropertyStatementUris(actualStmt));
|
||||
}
|
||||
|
||||
Set<ObjectPropertyStatementUris> expectedStmtUris = new HashSet<ObjectPropertyStatementUris>();
|
||||
for (String propertyUri : expectedPropertyUris) {
|
||||
for (String objectUri : expectedObjectUris) {
|
||||
expectedStmtUris.add(new ObjectPropertyStatementUris(ind
|
||||
.getURI(), propertyUri, objectUri));
|
||||
}
|
||||
}
|
||||
|
||||
assertEqualSets(label, expectedStmtUris, actualStmtUris);
|
||||
}
|
||||
|
||||
private static void dumpModel(OntModel ontModel) {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Dumping the model:");
|
||||
StmtIterator stmtIt = ontModel.listStatements();
|
||||
while (stmtIt.hasNext()) {
|
||||
Statement stmt = stmtIt.next();
|
||||
log.debug("stmt: " + stmt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The testing parameter. Each different role level will have different
|
||||
* expectations of visible properties and objects.
|
||||
*/
|
||||
private static class TestData {
|
||||
final RoleLevel loginRole;
|
||||
final Set<String> expectedDataPropertyUris = new TreeSet<String>();
|
||||
final Set<String> expectedObjectPropertyUris = new TreeSet<String>();
|
||||
final Set<String> expectedObjectUris = new TreeSet<String>();
|
||||
|
||||
public TestData(RoleLevel loginRole) {
|
||||
this.loginRole = loginRole;
|
||||
|
||||
}
|
||||
|
||||
public void addExpectedDataProperties(String... uris) {
|
||||
expectedDataPropertyUris.addAll(Arrays.asList(uris));
|
||||
}
|
||||
|
||||
public void addExpectedObjectProperties(String... uris) {
|
||||
expectedObjectPropertyUris.addAll(Arrays.asList(uris));
|
||||
}
|
||||
|
||||
public void addExpectedObjects(String... uris) {
|
||||
expectedObjectUris.addAll(Arrays.asList(uris));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Capture the essence of an DataPropertyStatement for comparison and
|
||||
* display.
|
||||
*/
|
||||
private static class DataPropertyStatementUris implements
|
||||
Comparable<DataPropertyStatementUris> {
|
||||
private final String subjectUri;
|
||||
private final String propertyUri;
|
||||
private final String data;
|
||||
|
||||
DataPropertyStatementUris(DataPropertyStatement stmt) {
|
||||
this.subjectUri = stmt.getIndividualURI();
|
||||
this.propertyUri = stmt.getDatapropURI();
|
||||
this.data = stmt.getData();
|
||||
}
|
||||
|
||||
public DataPropertyStatementUris(String subjectUri, String propertyUri,
|
||||
String data) {
|
||||
this.subjectUri = subjectUri;
|
||||
this.propertyUri = propertyUri;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(DataPropertyStatementUris that) {
|
||||
int first = this.subjectUri.compareTo(that.subjectUri);
|
||||
if (first != 0) {
|
||||
return first;
|
||||
}
|
||||
|
||||
int second = this.propertyUri.compareTo(that.propertyUri);
|
||||
if (second != 0) {
|
||||
return second;
|
||||
}
|
||||
|
||||
int third = this.data.compareTo(that.data);
|
||||
return third;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof DataPropertyStatementUris)) {
|
||||
return false;
|
||||
}
|
||||
DataPropertyStatementUris that = (DataPropertyStatementUris) o;
|
||||
return this.compareTo(that) == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return subjectUri.hashCode() ^ propertyUri.hashCode()
|
||||
^ data.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "[" + subjectUri + " ==> " + propertyUri + " ==> " + data
|
||||
+ "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Capture the essence of an ObjectPropertyStatement for comparison and
|
||||
* display.
|
||||
*/
|
||||
private static class ObjectPropertyStatementUris implements
|
||||
Comparable<ObjectPropertyStatementUris> {
|
||||
private final String subjectUri;
|
||||
private final String propertyUri;
|
||||
private final String objectUri;
|
||||
|
||||
ObjectPropertyStatementUris(ObjectPropertyStatement stmt) {
|
||||
this.subjectUri = stmt.getSubjectURI();
|
||||
this.propertyUri = stmt.getPropertyURI();
|
||||
this.objectUri = stmt.getObjectURI();
|
||||
}
|
||||
|
||||
public ObjectPropertyStatementUris(String subjectUri,
|
||||
String propertyUri, String objectUri) {
|
||||
this.subjectUri = subjectUri;
|
||||
this.propertyUri = propertyUri;
|
||||
this.objectUri = objectUri;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(ObjectPropertyStatementUris that) {
|
||||
int first = this.subjectUri.compareTo(that.subjectUri);
|
||||
if (first != 0) {
|
||||
return first;
|
||||
}
|
||||
|
||||
int second = this.propertyUri.compareTo(that.propertyUri);
|
||||
if (second != 0) {
|
||||
return second;
|
||||
}
|
||||
|
||||
int third = this.objectUri.compareTo(that.objectUri);
|
||||
return third;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof ObjectPropertyStatementUris)) {
|
||||
return false;
|
||||
}
|
||||
ObjectPropertyStatementUris that = (ObjectPropertyStatementUris) o;
|
||||
return this.compareTo(that) == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return subjectUri.hashCode() ^ propertyUri.hashCode()
|
||||
^ objectUri.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "[" + subjectUri + " ==> " + propertyUri + " ==> "
|
||||
+ objectUri + "]";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,285 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE rdf [
|
||||
<!ENTITY vitro "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#">
|
||||
<!ENTITY list "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#"> ]>
|
||||
|
||||
<rdf:RDF
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
|
||||
xmlns:owl="http://www.w3.org/2002/07/owl#"
|
||||
xmlns:vitro="&vitro;"
|
||||
>
|
||||
|
||||
|
||||
<!-- Vitro Application Ontology version 0.7 -->
|
||||
|
||||
<!-- This ontology is used internally by the Vitro 0.7 Java application. It is not user viewable or editable: editing this file could have various unintended consequences -->
|
||||
|
||||
<owl:Ontology rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7">
|
||||
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Vitro internals</rdfs:label>
|
||||
<owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal">0.7</owl:versionInfo>
|
||||
</owl:Ontology>
|
||||
|
||||
<!-- general Vitro constructs -->
|
||||
|
||||
<owl:AnnotationProperty rdf:about="&vitro;descriptionAnnot"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;displayLimit"/>
|
||||
<owl:AnnotationProperty rdf:about="&vitro;displayLimitAnnot"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;displayRank"/>
|
||||
<owl:AnnotationProperty rdf:about="&vitro;displayRankAnnot"/>
|
||||
<owl:AnnotationProperty rdf:about="&vitro;exampleAnnot"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;hidden"/>
|
||||
<owl:AnnotationProperty rdf:about="&vitro;hiddenAnnot"/>
|
||||
<owl:AnnotationProperty rdf:about="&vitro;modTimeAnnot"/>
|
||||
<owl:AnnotationProperty rdf:about="&vitro;shortDefAnnot"/>
|
||||
<owl:AnnotationProperty rdf:about="&vitro;oldId"/>
|
||||
|
||||
<!-- VClassGroup-related constructs -->
|
||||
|
||||
<owl:Class rdf:about="&vitro;ClassGroup"/>
|
||||
|
||||
<!-- VClass-related constructs -->
|
||||
|
||||
<owl:AnnotationProperty rdf:about="&vitro;harvestId"/>
|
||||
<owl:AnnotationProperty rdf:about="&vitro;inClassGroup"/>
|
||||
|
||||
<!-- ObjectProperty-related constructs -->
|
||||
|
||||
<owl:AnnotationProperty rdf:about="&vitro;fullPropertyNameAnnot"/>
|
||||
<owl:AnnotationProperty rdf:about="&vitro;individualSortFieldAnnot"/>
|
||||
<owl:AnnotationProperty rdf:about="&vitro;individualSortDirectionAnnot"/>
|
||||
|
||||
<!-- Tab-related constructs -->
|
||||
|
||||
<!-- externalID-related constructs -->
|
||||
|
||||
<owl:AnnotationProperty rdf:about="&vitro;isExternalId"/>
|
||||
<owl:AnnotationProperty rdf:about="&vitro;originalId"/>
|
||||
|
||||
<!-- Keyword related -->
|
||||
|
||||
<owl:Class rdf:about="&vitro;Keyword"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;keywordStem"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;keywordType"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;keywordSource"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;keywordComments"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;keywordOrigin"/>
|
||||
<owl:Class rdf:about="&vitro;KeywordRelation"/>
|
||||
<owl:ObjectProperty rdf:about="&vitro;involvesIndividual"/>
|
||||
<owl:ObjectProperty rdf:about="&vitro;involvesKeyword"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;keywordMode"/>
|
||||
|
||||
<!-- Link related -->
|
||||
|
||||
<owl:ObjectProperty rdf:about="&vitro;primaryLink"/>
|
||||
<owl:ObjectProperty rdf:about="&vitro;additionalLink"/>
|
||||
<owl:Class rdf:about="&vitro;Link"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;linkAnchor"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;linkURL"/>
|
||||
|
||||
<!-- other Individual-related -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="&vitro;curatorNote">
|
||||
<rdfs:label xml:lang="en">curation note</rdfs:label>
|
||||
</owl:DatatypeProperty>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;blurb"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;citation"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;description"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;imageThumb"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;imageFile"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;modTime"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;moniker"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;sunrise"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;sunset"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;timekey"/>
|
||||
|
||||
<!-- portal flag classes -->
|
||||
|
||||
<owl:Class rdf:about="&vitro;Flag1Value0Thing"/>
|
||||
<owl:Class rdf:about="&vitro;Flag1Value1Thing"/>
|
||||
<owl:Class rdf:about="&vitro;Flag1Value2Thing"/>
|
||||
<owl:Class rdf:about="&vitro;Flag1Value3Thing"/>
|
||||
<owl:Class rdf:about="&vitro;Flag1Value4Thing"/>
|
||||
<owl:Class rdf:about="&vitro;Flag1Value5Thing"/>
|
||||
<owl:Class rdf:about="&vitro;Flag1Value6Thing"/>
|
||||
<owl:Class rdf:about="&vitro;Flag1Value7Thing"/>
|
||||
<owl:Class rdf:about="&vitro;Flag1Value8Thing"/>
|
||||
<owl:Class rdf:about="&vitro;Flag1Value9Thing"/>
|
||||
<owl:Class rdf:about="&vitro;Flag1Value10Thing"/>
|
||||
<owl:Class rdf:about="&vitro;Flag1Value11Thing"/>
|
||||
<owl:Class rdf:about="&vitro;Flag1Value12Thing"/>
|
||||
<owl:Class rdf:about="&vitro;Flag1Value13Thing"/>
|
||||
<owl:Class rdf:about="&vitro;Flag1Value14Thing"/>
|
||||
<owl:Class rdf:about="&vitro;Flag1Value15Thing"/>
|
||||
<owl:Class rdf:about="&vitro;Flag1Value16Thing"/>
|
||||
<owl:Class rdf:about="&vitro;Flag1Value17Thing"/>
|
||||
<owl:Class rdf:about="&vitro;Flag1Value18Thing"/>
|
||||
<owl:Class rdf:about="&vitro;Flag1Value19Thing"/>
|
||||
<owl:Class rdf:about="&vitro;Flag1Value20Thing"/>
|
||||
|
||||
<!-- Portal-related constructs -->
|
||||
|
||||
<owl:Class rdf:about="&vitro;Portal"/>
|
||||
<owl:ObjectProperty rdf:about="&vitro;rootTab"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;themeDir"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;bannerImage"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;contactMail"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;shortHand"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;aboutText"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;acknowledgeText"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;bannerWidth"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;bannerHeight"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;flag2Numeric"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;flag3Numeric"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;copyrightURL"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;copyrightAnchor"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;rootBreadCrumbURL"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;rootBreadCrumbAnchor"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;logotypeImage"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;logotypeHeight"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;logotypeWidth"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;imageThumbWidth"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;flag1SearchFiltering"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;flag2SearchFiltering"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;flag3SearchFiltering"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;urlPrefix"/>
|
||||
|
||||
<!-- Tab-related constructs -->
|
||||
|
||||
<owl:Class rdf:about="&vitro;Tab"/>
|
||||
<owl:Class rdf:about="&vitro;SubcollectionCategory">
|
||||
<rdfs:subClassOf rdf:resource="&vitro;Tab"/>
|
||||
</owl:Class>
|
||||
<owl:Class rdf:about="&vitro;Subcollection">
|
||||
<rdfs:subClassOf rdf:resource="&vitro;Tab"/>
|
||||
</owl:Class>
|
||||
<owl:Class rdf:about="&vitro;Collection">
|
||||
<rdfs:subClassOf rdf:resource="&vitro;Tab"/>
|
||||
</owl:Class>
|
||||
<owl:Class rdf:about="&vitro;SecondaryTab">
|
||||
<rdfs:subClassOf rdf:resource="&vitro;Tab"/>
|
||||
</owl:Class>
|
||||
<owl:Class rdf:about="&vitro;PrimaryTabContent">
|
||||
<rdfs:subClassOf rdf:resource="&vitro;Tab"/>
|
||||
</owl:Class>
|
||||
<owl:Class rdf:about="&vitro;PrimaryTab">
|
||||
<rdfs:subClassOf rdf:resource="&vitro;Tab"/>
|
||||
</owl:Class>
|
||||
<owl:Class rdf:about="&vitro;AutoLinkableTab">
|
||||
<rdfs:subClassOf rdf:resource="&vitro;Tab"/>
|
||||
</owl:Class>
|
||||
<owl:Class rdf:about="&vitro;ManuallyLinkableTab">
|
||||
<rdfs:subClassOf rdf:resource="&vitro;Tab"/>
|
||||
</owl:Class>
|
||||
<owl:Class rdf:about="&vitro;MixedTab">
|
||||
<rdfs:subClassOf rdf:resource="&vitro;AutoLinkableTab"/>
|
||||
<rdfs:subClassOf rdf:resource="&vitro;ManuallyLinkableTab"/>
|
||||
</owl:Class>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;tabCreatorUserId"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;statusId"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;tabBody"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;dayLimit"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;galleryRows"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;galleryCols"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;moreTag"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;imageWidth"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;individualSortDirection"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;individualSortField"/>
|
||||
<owl:ObjectProperty rdf:about="&vitro;inPortal"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;individualSortField"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;individualSortDirection"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;rssUrl"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;flag2Set"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;flag3Set"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;flag2Mode"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;flag3Mode"/>
|
||||
<owl:ObjectProperty rdf:about="&vitro;subTabOf"/>
|
||||
<owl:AnnotationProperty rdf:about="&vitro;autoLinkedToTab"/>
|
||||
<owl:Class rdf:about="&vitro;TabIndividualRelation"/>
|
||||
<owl:ObjectProperty rdf:about="&vitro;involvesIndividual"/>
|
||||
<owl:ObjectProperty rdf:about="&vitro;involvesTab"/>
|
||||
|
||||
<!-- Application-related constructs -->
|
||||
|
||||
<owl:Class rdf:about="&vitro;Application"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;flag1Name"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;flag2Name"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;flag3Name"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;minSharedPortalId"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;maxSharedPortalId"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;rootLogotypeImage"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;keywordHeading"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;onlyCurrent"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;maxPortalId"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;flag2Values"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;flag1Values"/>
|
||||
<owl:DatatypeProperty rdf:about="&vitro;flag3Values"/>
|
||||
|
||||
<!-- User-related constructs -->
|
||||
|
||||
<owl:Class rdf:about="&vitro;User"/>
|
||||
<owl:DatatypeProperty rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#username"/>
|
||||
<owl:DatatypeProperty rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#md5password"/>
|
||||
<owl:DatatypeProperty rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#oldpassword"/>
|
||||
<owl:DatatypeProperty rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#modTime"/>
|
||||
<owl:DatatypeProperty rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#firstTime"/>
|
||||
<owl:DatatypeProperty rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#loginCount"/>
|
||||
<owl:DatatypeProperty rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#roleURI"/>
|
||||
|
||||
<!-- Namespace metadata -->
|
||||
<owl:DatatypeProperty rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#namespaceURI"/>
|
||||
<owl:Class rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#Namespace"/>
|
||||
|
||||
|
||||
<!-- additions -->
|
||||
|
||||
<rdf:Description rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#hiddenFromDisplayBelowRoleLevelAnnot">
|
||||
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#flag1Filtering">
|
||||
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#forceStubDeletionAnnot">
|
||||
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#offerCreateNewOptionAnnot">
|
||||
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#customShortViewAnnot">
|
||||
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#objectIndividualSortProperty">
|
||||
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#PropertyGroup">
|
||||
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#customEntryFormAnnot">
|
||||
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#inPropertyGroupAnnot">
|
||||
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#shortDef">
|
||||
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#DependentResource">
|
||||
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#publicDescriptionAnnot">
|
||||
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#prohibitedFromUpdateBelowRoleLevelAnnot">
|
||||
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#selectFromExistingAnnot">
|
||||
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#customDisplayViewAnnot">
|
||||
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AnnotationProperty"/>
|
||||
</rdf:Description>
|
||||
|
||||
</rdf:RDF>
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue