Project

General

Profile

1
package eu.dnetlib.enabling.tools;
2

    
3
/**
4
 * Resource identifiers may carry, implicitly or explicity, some informations about the location of the resource in the
5
 * hierarchical xmldb namespace.
6
 * <p>
7
 * Implementors of this interface may take different approachs to the problem.
8
 *
9
 * @author marko
10
 */
11
public interface ResourceIdentifierResolver {
12

    
13
	/**
14
	 * get the xmldb filename associated to this resource identifier, usually extracted from the identifier itself.
15
	 *
16
	 * @param resId resource identifier
17
	 * @return xmldb file name
18
	 */
19
	String getFileName(String resId);
20

    
21
	/**
22
	 * get the xmldb collection name associated to this resource identifier.
23
	 * Implementors may decide to encode it in the identifier itself or use a secondary associative memory.
24
	 * to quickly transform identifiers.
25
	 *
26
	 * @param resId resource identifier
27
	 * @return xmldb collection name
28
	 */
29
	String getCollectionName(String resId);
30
}
(11-11/17)