2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 package org
.libreoffice
.report
;
20 import java
.io
.IOException
;
21 import java
.io
.InputStream
;
24 * This allows the job processor to load data from a repository. It is assumed,
25 * that all resource names are given as strings and furthermore, that the names
26 * identify a resource uniquely within the input repository.
28 * An input repository connects the report processing to the xml definitions.
29 * Unless defined otherwise, it is assumed, that the input-name is 'content.xml';
30 * possible other files are 'settings.xml' and 'styles.xml' (see the Oasis standard
31 * for details on these files and their contents).
34 public interface InputRepository
38 * Returns a unique identifier for this repository. Two repositories accessing
39 * the same location should return the same id. The identifier must never
42 * @return the repository id
46 InputStream
createInputStream(final String name
) throws IOException
;
48 /** allows to access sub repositories inside this repository
50 * @param name describes the path to the sub repository
51 * @return the sub repository
52 * @throws java.io.IOException when the sub repository doesn't exist.
54 InputRepository
openInputRepository(final String name
) throws IOException
;
57 * This returns a version number for the given resource. Return zero, if
58 * the resource is not versionable, else return a unique number for each version.
59 * As rule of thumb: Increase the version number by at least one for each change
60 * made to the resource.
62 * @param name the name of the resource
63 * @return the version number
65 long getVersion(final String name
);
69 boolean isReadable(final String name
);
71 void closeInputRepository();
73 /** returns the URL of the database document
75 * @return the URL of the database document