-
Notifications
You must be signed in to change notification settings - Fork 15
Reuse cherry picked components from other repositories
If you follow the instructions to develop your own components in a different repository than the basic installation fo LODSPeaKr, you may end up having one repository per project. What happens if you want to reuse specific components from multiple repositories in a new project? Of course, you can copy in the new components/
folder of your new installation, but if you want to keep them linked (so you can benefit from further updates, for example), you can select specific components and reuse them. You can add as many components for services
and types
as you want.
Suppose you have a new installation of LODSPeaKr in /var/www/newproject/
. You have created several type and service components, but you also want to reuse a component for URIs of type foaf:Person
from a previous project, whose components are available at /home/alvaro/previousproject1/lodspeakr/components/types/foaf:Person
. Since version 20120216 you can simply add this specific component by adding in your current settings.inc.php
$conf['components']['types'][] = '/home/alvaro/previousproject1/lodspeakr/components/types/foaf:Person';
This will add a new type component for URIs of type foaf:Person
as if it were available in this particular installation.
###Priorities of types
- If you already have a local component with the same name as one you added (e.g., for type
foaf:Person
or a service namednamedGraphs
), the external component will not be used. - In case a URI has multiple types (say,
foaf:Person
andex:Student
), the priority of which types will be used will be the same as usual, as specified in Type priority.
Similarly, it is possible to include services from other projects by adding the following line to settings.inc.php
:
$conf['components']['services'][] = '/home/alvaro/previousproject2/lodspeakr/components/services/myService';
As mentioned previously, if there is a local service called myService
, the newly added componentn will not be used.