diff --git a/CHANGELOG.md b/CHANGELOG.md index 0305168c..268587f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html ## Unreleased +- Rename RDF type Class and Property getters (to make them RDF-specific). + ## 1.2.0 2023/10/01 - Fix RDF and RDFS term IRIs. diff --git a/src/VocabTerm.test.ts b/src/VocabTerm.test.ts index 2b0f6177..da30d39f 100755 --- a/src/VocabTerm.test.ts +++ b/src/VocabTerm.test.ts @@ -636,9 +636,9 @@ describe("VocabTerm tests", () => { false, ); - expect(myTerm.isClass).toBe(false); + expect(myTerm.isRdfClass).toBe(false); myTerm.addType(RDFS_CLASS); - expect(myTerm.isClass).toBe(true); + expect(myTerm.isRdfClass).toBe(true); }); it("should handle rdf:type of Property", () => { @@ -651,9 +651,9 @@ describe("VocabTerm tests", () => { false, ); - expect(myTerm.isProperty).toBe(false); + expect(myTerm.isRdfProperty).toBe(false); myTerm.addType(OWL_OBJECT_PROPERTY); - expect(myTerm.isProperty).toBe(true); + expect(myTerm.isRdfProperty).toBe(true); }); }); }); diff --git a/src/VocabTerm.ts b/src/VocabTerm.ts index 6dd30a46..88f34dac 100755 --- a/src/VocabTerm.ts +++ b/src/VocabTerm.ts @@ -302,7 +302,7 @@ class VocabTerm implements NamedNode { ); } - get isClass(): boolean { + get isRdfClass(): boolean { if (!LAZY_TYPE_RDFS_CLASS) { this.createNamedNodeConstantsClass(); } @@ -313,7 +313,7 @@ class VocabTerm implements NamedNode { ); } - get isProperty(): boolean { + get isRdfProperty(): boolean { if (!LAZY_TYPE_RDF_PROPERTY) { this.createNamedNodeConstantsProperty(); }