Package net.sf.okapi.common.resource
Interface IWithSourceProperties
-
- All Known Subinterfaces:
IMultilingual,ITextUnit
- All Known Implementing Classes:
DocumentPart,StartDocument,StartGroup,StartSubfilter,StorageList,TextUnit
public interface IWithSourceProperties
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static voidcopy(IWithSourceProperties from, IWithSourceProperties to)Copy allIWithSourcePropertiesUnless destination already has the property. TargetLocaleIdnot found in the destination are added then properties are copied.Map<String,Property>getSourceProperties()default PropertygetSourceProperty(String name)Gets the source property for a given name.default Set<String>getSourcePropertyNames()Gets the names of all the source properties for this resource.default booleanhasSourceProperty(String name)Indicates if a source property exists for a given name.default voidremoveSourceProperty(String name)Removes a source property of a given name.default PropertysetSourceProperty(Property property)Sets a source property.
-
-
-
Method Detail
-
copy
static void copy(IWithSourceProperties from, IWithSourceProperties to)
Copy allIWithSourcePropertiesUnless destination already has the property. TargetLocaleIdnot found in the destination are added then properties are copied. Properties are cloned before copying.- Parameters:
from- source ofIWithSourcePropertiesto- destination ofIWithSourceProperties
-
getSourceProperties
Map<String,Property> getSourceProperties()
- Returns:
Mapof source properties for the implementer of interface
-
getSourceProperty
default Property getSourceProperty(String name)
Gets the source property for a given name.- Parameters:
name- The name of the source property to retrieve.- Returns:
- The property or null if it does not exist.
-
getSourcePropertyNames
default Set<String> getSourcePropertyNames()
Gets the names of all the source properties for this resource.- Returns:
- All the names of the source properties for this resource.
-
hasSourceProperty
default boolean hasSourceProperty(String name)
Indicates if a source property exists for a given name.- Parameters:
name- The name of the source property to query.- Returns:
- True if a source property exists, false otherwise.
-
removeSourceProperty
default void removeSourceProperty(String name)
Removes a source property of a given name. If the property does not exists nothing happens.- Parameters:
name- The name of the property to remove.
-
-