% This LaTeX document was generated using the LaTeX backend of PlDoc, % The SWI-Prolog documentation system \section{library(semweb/rdf_portray): Portray RDF resources} \label{sec:rdfportray} \begin{tags} \mtag{To be done}- Define alternate predicate to use for providing a comment \\- Use rdf:type if there is no meaningful label? \\- Smarter guess whether or not the local identifier might be meaningful to the user without a comment. I.e. does it look `word-like'? \end{tags} This module defines rules for \qpredref{user}{portray}{1} to help tracing and debugging RDF resources by printing them in a more concise representation and optionally adding comment from the label field to help the user interpreting the URL. The main predicates are: \begin{itemize} \item \predref{rdf_portray_as}{1} defines the overall style \item \predref{rdf_portray_lang}{1} selects languages for extracting label comments \end{itemize} \vspace{0.7cm} \begin{description} \predicate[det]{rdf_portray_as}{1}{+Style} Set the style used to portray resources. \arg{Style} is one of: \begin{description} \item[\const{prefix:id}] Write as NS:ID, compatible with what can be handed to the rdf predicates. This is the default. \item[\const{writeq}] Use quoted write of the full resource. \item[\const{prefix:label}] Write namespace followed by the label. This format cannot be handed to \predref{rdf}{3} and friends, but can be useful if resource-names are meaningless identifiers. \item[\const{prefix:id=label}] This combines prefix:id with prefix:label, providing both human readable output and output that can be pasted into the commandline. \end{description} \predicate[det]{rdf_portray_lang}{1}{+Lang} If \arg{Lang} is a list, set the list or preferred languages. If it is a single atom, push this language as the most preferred language. \end{description}