Class IdentifierConverter<A,B>
- java.lang.Object
-
- com.google.common.base.Converter<A,B>
-
- org.fcrepo.kernel.api.identifiers.IdentifierConverter<A,B>
-
- Type Parameters:
B- the type to and from which we are translating
- All Implemented Interfaces:
com.google.common.base.Function<A,B>,Function<A,B>
public abstract class IdentifierConverter<A,B> extends com.google.common.base.Converter<A,B>
AnIdentifierConverteraccepts and returns identifiers, translating them in some type-specific manner. The typical use of this contract is for translating between internal and external identifiers.- Since:
- Mar 26, 2014
- Author:
- ajs6f
-
-
Constructor Summary
Constructors Constructor Description IdentifierConverter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract StringasString(A resource)Convert the given resource into a plain string representation of the conversion to the resourcebooleaninDomain(A resource)Check if the given resource is in the domain of this converterabstract AtoDomain(String resource)Convert a plain string to a resource appropriate to this converter-
Methods inherited from class com.google.common.base.Converter
andThen, apply, convert, convertAll, doBackward, doForward, equals, from, identity, reverse
-
-
-
-
Constructor Detail
-
IdentifierConverter
public IdentifierConverter()
-
-
Method Detail
-
inDomain
public boolean inDomain(A resource)
Check if the given resource is in the domain of this converter- Parameters:
resource- the given resource- Returns:
- boolean value of the check
-
toDomain
public abstract A toDomain(String resource)
Convert a plain string to a resource appropriate to this converter- Parameters:
resource- the plain string resource- Returns:
- the resource appropriate to this converter
-
-