mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Use more prefixes in container responses.
This commit is contained in:
parent
409782c205
commit
b51dac310e
@ -22,7 +22,7 @@ import {
|
||||
} from '../util/PathUtil';
|
||||
import { parseQuads } from '../util/QuadUtil';
|
||||
import { generateResourceQuads } from '../util/ResourceUtil';
|
||||
import { CONTENT_TYPE, HTTP, LDP, PIM, RDF, VANN } from '../util/Vocabularies';
|
||||
import { CONTENT_TYPE, DC, HTTP, LDP, POSIX, PIM, RDF, VANN, XSD } from '../util/Vocabularies';
|
||||
import type { DataAccessor } from './accessors/DataAccessor';
|
||||
import type { ResourceStore } from './ResourceStore';
|
||||
|
||||
@ -68,7 +68,10 @@ export class DataAccessorBasedStore implements ResourceStore {
|
||||
if (this.isExistingContainer(metadata)) {
|
||||
// Generate a container representation from the metadata
|
||||
const data = metadata.quads();
|
||||
metadata.addQuad(DC.terms.namespace, VANN.terms.preferredNamespacePrefix, 'dc');
|
||||
metadata.addQuad(LDP.terms.namespace, VANN.terms.preferredNamespacePrefix, 'ldp');
|
||||
metadata.addQuad(POSIX.terms.namespace, VANN.terms.preferredNamespacePrefix, 'posix');
|
||||
metadata.addQuad(XSD.terms.namespace, VANN.terms.preferredNamespacePrefix, 'xsd');
|
||||
representation = new BasicRepresentation(data, metadata, INTERNAL_QUADS);
|
||||
} else {
|
||||
// Retrieve a document representation from the accessor
|
||||
|
Loading…
x
Reference in New Issue
Block a user