diff --git a/src/shapes/ldo/catShape.schema.compact.ts b/src/shapes/ldo/catShape.schema.compact.ts
index b646098..a035919 100644
--- a/src/shapes/ldo/catShape.schema.compact.ts
+++ b/src/shapes/ldo/catShape.schema.compact.ts
@@ -7,7 +7,7 @@ import type { CompactSchema } from "@ldo/ldo";
*/
export const catShapeSchema: CompactSchema = {
"http://example.org/Cat": {
- schemaUri: "http://example.org/Cat",
+ iri: "http://example.org/Cat",
predicates: [
{
type: "literal",
@@ -49,7 +49,7 @@ export const catShapeSchema: CompactSchema = {
],
},
"http://example.org/Cat::http://example.org/address": {
- schemaUri: "http://example.org/Cat::http://example.org/address",
+ iri: "http://example.org/Cat::http://example.org/address",
predicates: [
{
type: "string",
diff --git a/src/shapes/ldo/personShape.schema.compact.ts b/src/shapes/ldo/personShape.schema.compact.ts
index d892a9c..869e9db 100644
--- a/src/shapes/ldo/personShape.schema.compact.ts
+++ b/src/shapes/ldo/personShape.schema.compact.ts
@@ -7,7 +7,7 @@ import type { CompactSchema } from "@ldo/ldo";
*/
export const personShapeSchema: CompactSchema = {
"http://example.org/Person": {
- schemaUri: "http://example.org/Person",
+ iri: "http://example.org/Person",
predicates: [
{
type: "literal",
@@ -49,7 +49,7 @@ export const personShapeSchema: CompactSchema = {
],
},
"http://example.org/Person::http://example.org/address": {
- schemaUri: "http://example.org/Person::http://example.org/address",
+ iri: "http://example.org/Person::http://example.org/address",
predicates: [
{
type: "string",
diff --git a/src/shapes/ldo/testShape.schema.compact.ts b/src/shapes/ldo/testShape.schema.compact.ts
index afeaad7..af41956 100644
--- a/src/shapes/ldo/testShape.schema.compact.ts
+++ b/src/shapes/ldo/testShape.schema.compact.ts
@@ -7,7 +7,7 @@ import type { CompactSchema } from "@ldo/ldo";
*/
export const testShapeSchema: CompactSchema = {
"http://example.org/TestObject": {
- schemaUri: "http://example.org/TestObject",
+ iri: "http://example.org/TestObject",
predicates: [
{
type: "literal",
@@ -16,6 +16,7 @@ export const testShapeSchema: CompactSchema = {
minCardinality: 1,
predicateUri: "http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
readablePredicate: "type",
+ extra: true,
},
{
type: "string",
@@ -63,10 +64,17 @@ export const testShapeSchema: CompactSchema = {
predicateUri: "http://example.org/anotherObject",
readablePredicate: "anotherObject",
},
+ {
+ type: "string",
+ maxCardinality: 1,
+ minCardinality: 1,
+ predicateUri: "http://example.org/numOrStr",
+ readablePredicate: "numOrStr",
+ },
],
},
"http://example.org/TestObject::http://example.org/objectValue": {
- schemaUri: "http://example.org/TestObject::http://example.org/objectValue",
+ iri: "http://example.org/TestObject::http://example.org/objectValue",
predicates: [
{
type: "string",
@@ -92,8 +100,7 @@ export const testShapeSchema: CompactSchema = {
],
},
"http://example.org/TestObject::http://example.org/anotherObject": {
- schemaUri:
- "http://example.org/TestObject::http://example.org/anotherObject",
+ iri: "http://example.org/TestObject::http://example.org/anotherObject",
predicates: [
{
type: "string",
diff --git a/src/shapes/ldo/testShape.typings.ts b/src/shapes/ldo/testShape.typings.ts
index 19edc7d..b04d85e 100644
--- a/src/shapes/ldo/testShape.typings.ts
+++ b/src/shapes/ldo/testShape.typings.ts
@@ -66,4 +66,8 @@ export interface TestObject {
prop2: number;
}
>;
+ /**
+ * Original IRI: http://example.org/numOrStr
+ */
+ numOrStr: string;
}
diff --git a/src/shapes/shex/testShape.shex b/src/shapes/shex/testShape.shex
index a45167e..6e7ede0 100644
--- a/src/shapes/shex/testShape.shex
+++ b/src/shapes/shex/testShape.shex
@@ -1,7 +1,7 @@
PREFIX ex:
PREFIX xsd:
-ex:TestObject {
+ex:TestObject EXTRA a {
a ["TestObject"] ;
ex:stringValue xsd:string ;
ex:numValue xsd:integer ;
@@ -14,6 +14,8 @@ ex:TestObject {
} ;
ex:anotherObject {
ex:prop1 xsd:string;
- ex:prop2 xsd:integer
+ ex:prop2 xsd:integer ;
} * ;
+ ex:numOrStr xsd:string;
+ # TODO: ShapeOr -- | ex:numOrStr xsd:integer
}