Skip to content

Commit

Permalink
Release alpha2
Browse files Browse the repository at this point in the history
  • Loading branch information
lecoqlibre committed Jul 31, 2023
1 parent 218de17 commit 51717ef
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.0.0-alpha2] - 2023-07-31

### Added

- Add a method to set a prefix.
- Add this changelog file.

## [1.0.0-alpha1] - 2023-07-28

- Initial release.

[unreleased]: https://github.com/assemblee-virtuelle/semantizer-php/compare/v1.0.0-alpha2...HEAD
[1.0.0-alpha2]: https://github.com/assemblee-virtuelle/semantizer-php/compare/v1.0.0-alpha1...v1.0.0-alpha2
[1.0.0-alpha1]: https://github.com/assemblee-virtuelle/semantizer-php/releases/tag/v1.0.0-alpha1
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "virtual-assembly/semantizer",
"type": "library",
"version": "1.0.0-alpha1",
"version": "1.0.0-alpha2",
"description": "A library to enhance your object model with semantic data.",
"keywords": ["semantic web","rdf","object model"],
"homepage": "https://github.com/assemblee-virtuelle/semantizer-php",
Expand Down
4 changes: 4 additions & 0 deletions src/Semantizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public function fetch(string $semanticObjectId): Semanticable {
return $this->store->get($semanticObjectId);
}

public function setPrefix(string $prefix, string $uri): void {
\EasyRdf\RdfNamespace::set($prefix, $uri);
}

public function store(Semanticable $semanticable): void {
$this->store->set($semanticable);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/SemantizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ final class SemantizerTest extends TestCase
{
public function testExport(): void {
$semantizer = new Semantizer();
\EasyRdf\RdfNamespace::set("dfc", "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#");
$semantizer->setPrefix("dfc", "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#");

$context = ["https://www.datafoodconsortium.org"];

Expand Down

0 comments on commit 51717ef

Please sign in to comment.