public interface SourceValueRepresentation<T>
Modifier and Type | Interface and Description |
---|---|
static interface |
SourceValueRepresentation.SourcedRef
this class represents the identity of a resource, providing access to its internal identity and source identity.
|
static interface |
SourceValueRepresentation.UriResolver
Resolver to translate source locations into references.
|
static interface |
SourceValueRepresentation.UriRewriter
Rewriter to translate references into source locations.
|
Modifier and Type | Field and Description |
---|---|
static SourceValueRepresentation |
DEFAULT
Default implementation for source value representation that are the same as the canonical value representation.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
fromCanonical(SourceValueRepresentation.SourcedRef ref, T data, SourceValueRepresentation.UriRewriter rewriter)
Converts the given canonical representation of the value to a source representation
|
boolean |
hasLocationDependencies(T data)
returns whether the given canonical data has source location dependencies
|
boolean |
isLocationDependent()
returns whether this representation is location dependent
|
T |
toCanonical(SourceValueRepresentation.SourcedRef ref, byte[] data, SourceValueRepresentation.UriResolver resolver)
Converts the given value from source representation to canonical representation.
|
static final SourceValueRepresentation DEFAULT
T toCanonical(SourceValueRepresentation.SourcedRef ref, byte[] data, SourceValueRepresentation.UriResolver resolver) throws java.lang.Exception
ref
- a reference to the valuedata
- value to be converted to canonical representationresolver
- a URI resolver to translate source locations into referencesjava.lang.Exception
byte[] fromCanonical(SourceValueRepresentation.SourcedRef ref, T data, SourceValueRepresentation.UriRewriter rewriter) throws java.lang.Exception
ref
- a reference to the valuedata
- the canonical representation to be convertedrewriter
- a URI rewriter to translate references into source locationsjava.lang.Exception
boolean isLocationDependent()
boolean hasLocationDependencies(T data)