In the Web of Data, the absence of clarity about the licensing terms under which the data is released prevents data reuse, and thus data publication and interlinking at the expenses of the Web of Data itself. In addition, even when terms are clear, the absence of automated processing of the licenses prevents scaling data reuse and integration. In this paper, we provide a semantic model of licenses for the Web of Data. The key idea of our approach consists first in verifying the compatibility and compliance of the licensing terms associated to the data queried by the consumer, and second, if compatibility arises, in composing the single licenses into a unique license which provides the terms of reuse for the whole data consumed during the query solving. In particular, we propose a deontic logic semantics which is able to (i) formally define the deontic components of the licenses, i.e., Permissions, Obligations, and Prohibitions, and reason over them, (ii) verify the compatibility of the elements composing the single licenses, and return those elements which can be included into the composite license, and (iii) provide a formal account of the heuristics proposed to guide the composition.