Hi,
thanks for your help and I apologize for the delay, but I had problems with
server mail.
Best,
Alberto
Il giorno 08/lug/2011, alle ore 15.39, Rupert Westenthaler ha scritto:
> Hi
>
> You can not retrieve URLs directly because the DataFileProvider
> expects to load files.
>
> The method used to lookup Resources is
>
> InputStream getInputStream(
> String bundleSymbolicName,
> String filename,
> Map<String, String> comments) throws IOException;
>
> for the 'bundleSymbolicName' you can parse null. It can be used to
> ensure that the DataFile can only be loaded from the
> MainDataFileProvider or from a DataFileProvider of the parsed
> bundleSymbolicName.
>
> This is the name of the file. You need to choose a way how to encode
> the URL of an ontology to a fileName. I would not recommend you to
> used paths, because users will not want to create sub-directories in
> the /datafile directory. If a single configuration consists of several
> files (e.g. a SolrIndex) than you should consider to use an archive
> (ZIP, GZ ...).
>
> The comments are currently used to provide additional information
> about the requested file to the User. In future we might bind specific
> functionality to some keys (e.g. A Button to download a required
> resource if the "Download-Location" key is present and the value is an
> valid URL)
>
> The easiest way provide required datafiles to Stanbol is to include
> those in a Bundle and to add the
>
> <Data-Files>
> {path}
> </Data-Files>
>
> to the <instructions> of the 'maven-bundle-plugin'.
>
> {path} it the path within the bundle to the folder containing the
> DataFiles that need to be loaded. Multiple paths can be separated by
> ','
>
> For a example you can have a look at the
> "org.apache.stanbol.defaultdata" bundle.
>
> best
> Rupert Westenthaler
>
> On Fri, Jul 8, 2011 at 3:14 PM, Alberto Musetti <[email protected]> wrote:
>> Hi Rupert,
>> could you give me some information how to use datafileprovider to retrive
>> URL resource and resolve the problem on ontologymanger integration-tests?
>>
>> thanks
>> Alberto
>>
>> Il giorno 08/lug/2011, alle ore 11.03, Alberto Musetti ha scritto:
>>
>>> Hi,
>>>
>>> I work on it, thank you for reporting the problem.
>>>
>>> best,
>>> Alberto Musetti
>>>
>>>
>>>
>>> Il giorno 08/lug/2011, alle ore 10.43, Rupert Westenthaler ha scritto:
>>>
>>>> Hi
>>>>
>>>> Yesterday at the way home from Paris to Salzburg I noticed that the
>>>> integration tests of the ontologymanager [1] require remote services
>>>> and fail if one does not have an internet connection of if the remote
>>>> service is not available.
>>>>
>>>> I think in an earlier discussion we agreed already that all unit and
>>>> integration tests are not allowed to depend on remote services but
>>>> must be executable in offline mode.
>>>>
>>>> Can someone please adapt this tests accordingly? In the meantime I
>>>> suggest to disable them.
>>>>
>>>> best
>>>> Rupert Westenthaler
>>>>
>>>>
>>>> [1]
>>>> http://svn.apache.org/repos/asf/incubator/stanbol/trunk/integration-tests/src/test/java/org/apache/stanbol/ontologymanager/web/it/
>>>> --
>>>> | Rupert Westenthaler [email protected]
>>>> | Bodenlehenstraße 11 ++43-699-11108907
>>>> | A-5500 Bischofshofen
>>>
>>
>>
>
>
>
> --
> | Rupert Westenthaler [email protected]
> | Bodenlehenstraße 11 ++43-699-11108907
> | A-5500 Bischofshofen