https://github.com/zazuko/rdf-entity-webcomponent
https://github.com/zazuko/rdf-entity-webcomponent
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/zazuko/rdf-entity-webcomponent
- Owner: zazuko
- Created: 2022-11-21T09:50:19.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-18T13:21:41.000Z (almost 3 years ago)
- Last Synced: 2025-03-28T14:01:38.808Z (about 1 year ago)
- Language: JavaScript
- Size: 3.04 MB
- Stars: 9
- Watchers: 6
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rdf-entity-webcomponent
A Web component that visualizes a dataset in (simple) tabular formats
## Usage
The element requires a single property `dataset` which conforms to
the [rdf-dataset spec](https://rdf.js.org/dataset-spec/)
Alternatively, one can directly specify turtle in the tag
```html
@prefix schema: <http://schema.org/> .
<http://tbbt.ld/john> a schema:Person ;
schema:name "John Doe" ;
schema:knows [
schema:name "Jane" ;
] .
```
## Run the examples
```
npm install
npm run dev
```
See the [examples](./examples) folder for details
## Screenshot

## Properties
| Property | Attribute | Modifiers | Type | Default | Description |
|----------------------|-----------------------|-----------|-----------|--------------------------|-----------------------------------------------------------------------------------------------------------|
| `dataset` | false | | `Object` | undefined | A [rdf-dataset](https://rdf.js.org/dataset-spec/) |
| `terms` | false | | `Array` | undefined | An array of [rdf-terms](https://rdf.js.org/data-model-spec/#term-interface) to be displayed with priority |
| `technicalCues` | `technical-cues` | | `Boolean` | false | Display information such as languages or datatypes |
| `compactMode` | `compact-mode` | | `Boolean` | false | Group repeated properties or values for a compact visualization |
| `preferredLanguages` | `preferred-languages` | | `Array` | ['en', 'fr', 'de', 'it'] | A list of the languages to show in the labels, ordered by priority |
| `embedBlankNodes` | `embed-named-nodes` | | `Boolean` | false | Recursively embeds any blank node positioned as an object |
| `embedNamedNodes` | `embed-blank-nodes` | | `Boolean` | false | Recursively embeds any named entity positioned as an object |
| `embedLists` | `embed-lists` | | `Boolean` | false | Display rdf-lists as ordered lists |
| `highlightLanguage` | `highlight-language` | | `Boolean` | false | Highlights literals matching prefered language |
| `maxLevel` | `max-level` | | `Number` | 3 | The maximum depth of the trees |
| `showImages` | `show-images` | | `Boolean` | false | embeds images denoted by schema:image or foaf:img |