Skip to content

Commit

Permalink
reorganized non modifiable statements policy template files
Browse files Browse the repository at this point in the history
  • Loading branch information
litvinovg committed Oct 24, 2023
1 parent 7cc4dc1 commit 45e6b72
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ public class NonModifiableStatementsPolicyTest extends PolicyTest {

private static final String VALID = "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#Valid";
private static final String MOD_TIME = "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#modTime";
public static final String NOT_MODIFIABLE_STATEMENTS_POLICY_PATH = "policy_not_modifiable_statements";
public static final String NOT_MODIFIABLE_STATEMENTS_POLICY_PATH = "template_not_modifiable_statements";

@Test
public void testNonModifiableStatementsPolicy() {
load(PolicyTest.USER_ACCOUNTS_HOME_FIRSTTIME + NOT_MODIFIABLE_STATEMENTS_POLICY_PATH + EXT);
load(USER_ACCOUNTS_HOME_FIRSTTIME + NOT_MODIFIABLE_STATEMENTS_POLICY_PATH + DATASET + EXT);

String policyUri =
"https://vivoweb.org/ontology/vitro-application/auth/individual/template/non-modifiable-statements/PolicyTemplate";
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -66,52 +66,70 @@
:PredicateUriStartWithProhibitedNamespace a ao:Check ;
ao:operator ai:StartsWith ;
ao:attribute ai:StatementPredicateUri ;
ao:templateValue ai:ProhibitedNamespaceValueSet .
ao:templateValue :ProhibitedNamespaceValueSet .

:PredicateNotANamespaceException a ao:Check ;
ao:operator ai:NotOneOf ;
ao:attribute ai:StatementPredicateUri ;
ao:templateValue ai:ProhibitedNamespaceExceptionsValueSet .
ao:templateValue :ProhibitedNamespaceExceptionsValueSet .

:SubjectUriStartWithProhibitedNamespace a ao:Check ;
ao:operator ai:StartsWith ;
ao:attribute ai:StatementSubjectUri ;
ao:templateValue ai:ProhibitedNamespaceValueSet .
ao:templateValue :ProhibitedNamespaceValueSet .

:StatementSubjectNotOneOfProhibitedExceptions a ao:Check ;
ao:operator ai:NotOneOf ;
ao:attribute ai:StatementSubjectUri ;
ao:templateValue ai:ProhibitedNamespaceExceptionsValueSet .
ao:templateValue :ProhibitedNamespaceExceptionsValueSet .

:StatementObjectUriStartsWithProhibitedNameSpace a ao:Check ;
ao:operator ai:StartsWith ;
ao:attribute ai:StatementObjectUri ;
ao:templateValue ai:ProhibitedNamespaceValueSet .
ao:templateValue :ProhibitedNamespaceValueSet .

:ObjectUriNotOneOfProhibitedExceptions a ao:Check ;
ao:operator ai:NotOneOf ;
ao:attribute ai:StatementObjectUri ;
ao:templateValue ai:ProhibitedNamespaceExceptionsValueSet .
ao:templateValue :ProhibitedNamespaceExceptionsValueSet .

### Not modifiable data property statement attributes

###DataSets
:DataSets a ao:PolicyDataSets ;
ao:policyDataSet ai:NotModifiableStatementsPolicyDataSet .
ao:policyDataSet :NotModifiableStatementsPolicyDataSet .

ai:NotModifiableStatementsPolicyDataSet a ao:PolicyDataSet ;
ao:dataSetValues ai:ProhibitedNamespaceExceptionsValueContainer ;
ao:dataSetValues ai:ProhibitedNamespaceValueContainer .
:NotModifiableStatementsPolicyDataSet a ao:PolicyDataSet ;
ao:dataSetValues :ProhibitedNamespaceExceptionsValueContainer ;
ao:dataSetValues :ProhibitedNamespaceValueContainer .

ai:ProhibitedNamespaceValueSet a ao:AttributeValueSet ;
ao:attributeValue ai:ProhibitedNamespaceValueContainer .
:ProhibitedNamespaceValueSet a ao:AttributeValueSet ;
ao:attributeValue :ProhibitedNamespaceValueContainer .

ai:ProhibitedNamespaceExceptionsValueSet a ao:AttributeValueSet ;
ao:attributeValue ai:ProhibitedNamespaceExceptionsValueContainer .
:ProhibitedNamespaceExceptionsValueSet a ao:AttributeValueSet ;
ao:attributeValue :ProhibitedNamespaceExceptionsValueContainer .

ai:ProhibitedNamespaceExceptionsValueContainer a ao:ValueContainer ;
:ProhibitedNamespaceExceptionsValueContainer a ao:ValueContainer ;
.

ai:ProhibitedNamespaceValueContainer a ao:ValueContainer ;
:ProhibitedNamespaceValueContainer a ao:ValueContainer ;
.

:ProhibitedNamespaceExceptionsValueContainer
ao:dataValue <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#moniker> ;
ao:dataValue <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#modTime> ;
ao:dataValue <http://vitro.mannlib.cornell.edu/ns/vitro/public#mainImage> ;
ao:dataValue <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#Link> ;
ao:dataValue <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#primaryLink> ;
ao:dataValue <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#additionalLink> ;
ao:dataValue <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#linkAnchor> ;
ao:dataValue <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#linkURL> ;
.

:ProhibitedNamespaceValueContainer
ao:dataValue :prohibitedNamespacePrefix ;
.

:prohibitedNamespacePrefix a ao:TestValue ;
ao:id "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" ;

0 comments on commit 45e6b72

Please sign in to comment.