public interface IFilenamePolicy
Implementors should make sure that the same instance of an
IFilenamePolicy
implementation always returns the same filename
candidate on the same arguments. Filename stability across different
policy instances is not required.
default implementation
Modifier and Type | Method and Description |
---|---|
com.google.common.base.Optional<URI> |
getBase(IAggregationEntry entry)
Tries to generate a base URI for the given aggregation entry.
|
URI |
getFilename(IAggregationEntry entry)
Generates a file name for the aggregation entry described by the given
metadata.
|
URI |
getFilename(IAggregationEntry entry,
boolean asParent)
Deprecated.
Use
getFilename(IAggregationEntry) instead |
String |
getFilename(info.textgrid.namespaces.metadata.core._2010.ObjectType object,
boolean asParent)
Generates a file name candidate for the object described by the given
metadata.
|
String |
translate(String source)
Creates a valid file name part for the given string.
|
String translate(String source)
source
- The string that should be translatedString getFilename(info.textgrid.namespaces.metadata.core._2010.ObjectType object, boolean asParent)
object
- The object with the metadata for which to generate a filenameasParent
- If true, the generated file name should be the parent for a
different filename. Implementors might, e.g., want to leave
out an extension.URI getFilename(IAggregationEntry entry, boolean asParent)
getFilename(IAggregationEntry)
insteadgetFilename(ObjectType, boolean)
URI getFilename(IAggregationEntry entry)
getFilename(ObjectType, boolean)
com.google.common.base.Optional<URI> getBase(IAggregationEntry entry)
Copyright © 2017 TextGrid. All rights reserved.