How to use the link-lib.allRDFValues function in link-lib

To help you get started, we’ve selected a few link-lib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fletcher91 / link-redux / src / react / components / Property.js View on Github external
export function getLinkedObjectClass(props, { topology, linkedRenderStore }) {
  return linkedRenderStore.getRenderClassForProperty(
    allRDFValues(linkedRenderStore.tryEntity(props.subject), defaultNS.rdf('type'), true),
    expandedProperty(props.label, linkedRenderStore),
    topology,
  );
}
github fletcher91 / link-redux / src / redux / LinkedObjectContainer.js View on Github external
objType(data) {
    const { linkedRenderStore } = this.context;
    return allRDFValues(data, linkedRenderStore.namespaces.rdf('type'), true) || linkedRenderStore.defaultType;
  }
github fletcher91 / link-redux / src / redux / Type.js View on Github external
const Type = (props, { linkedRenderStore, topology }) => {
  const objType = allRDFValues(
    linkedRenderStore.tryEntity(props.subject),
    linkedRenderStore.namespaces.rdf('type'),
    true,
  ) || linkedRenderStore.defaultType;
  if (objType === undefined) {
    return null;
  }
  const Klass = linkedRenderStore.getRenderClassForType(objType, topology);
  if (Klass !== undefined) {
    return React.createElement(
      Klass,
      props,
      props.children,
    );
  }
  return React.createElement(