net.sf.okapi.common.resource

## Interface IWithBilingualProperties

- All Known Subinterfaces:
    INameable, ITextUnit
  All Known Implementing Classes:
    BaseNameable, BaseReferenceable, DocumentPart, StartDocument, StartGroup, StartSubDocument, StartSubfilter, StorageList, TextContainer, TextUnit

      public interface IWithBilingualProperties

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Property` | `getSourceProperty(java.lang.String name)` Gets the source property for a given name.
    `java.util.Set<java.lang.String>` | `getSourcePropertyNames()` Gets the names of all the source properties for this resource.
    `java.util.Set<LocaleId>` | `getTargetLocales()` Gets all the target locales for this resource.
    `Property` | `getTargetProperty(LocaleId locId, java.lang.String name)` Gets the target property for a given name and target locale.
    `java.util.Set<java.lang.String>` | `getTargetPropertyNames(LocaleId locId)` Gets the names of all the properties for a given target locale in this resource.
    `boolean` | `hasSourceProperty(java.lang.String name)` Indicates if a source property exists for a given name.
    `boolean` | `hasTargetProperty(LocaleId locId, java.lang.String name)` Indicates if a property exists for a given name and target locale.
    `void` | `removeSourceProperty(java.lang.String name)` Removes a source property of a given name.
    `void` | `removeTargetProperty(LocaleId locId, java.lang.String name)` Removes a target property of a given name.
    `Property` | `setSourceProperty(Property property)` Sets a source property.
    `Property` | `setTargetProperty(LocaleId locId, Property property)` Sets a target property.

- - ### Method Detail

    - #### getSourceProperty

          Property getSourceProperty(java.lang.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

          java.util.Set<java.lang.String> getSourcePropertyNames()

      Gets the names of all the source properties for this resource.
      Returns:
        All the names of the source properties for this resource.

    - #### getTargetLocales

          java.util.Set<LocaleId> getTargetLocales()

      Gets all the target locales for this resource.
      Returns:
        all the target locales for this resource.

    - #### getTargetProperty

          Property getTargetProperty(LocaleId locId,
                                     java.lang.String name)

      Gets the target property for a given name and target locale.
      Parameters:
        `locId` - the locale of the property to retrieve.
        `name` - The name of the property to retrieve. This name is case-sensitive.
      Returns:
        The property or null if it does not exist.

    - #### getTargetPropertyNames

          java.util.Set<java.lang.String> getTargetPropertyNames(LocaleId locId)

      Gets the names of all the properties for a given target locale in this resource.
      Parameters:
        `locId` - the target locale to query.
      Returns:
        all the names of the target properties for the given locale in this resource.

    - #### hasSourceProperty

          boolean hasSourceProperty(java.lang.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.

    - #### hasTargetProperty

          boolean hasTargetProperty(LocaleId locId,
                                    java.lang.String name)

      Indicates if a property exists for a given name and target locale.
      Parameters:
        `locId` - the target locale to query.
        `name` - the name of the property to query.
      Returns:
        true if a property exists, false otherwise.

    - #### removeSourceProperty

          void removeSourceProperty(java.lang.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.

    - #### removeTargetProperty

          void removeTargetProperty(LocaleId locId,
                                    java.lang.String name)

      Removes a target property of a given name. If the property does not exists nothing happens.
      Parameters:
        `locId` - The target locale for which this property should be set.
        `name` - The name of the property to remove.

    - #### setSourceProperty

          Property setSourceProperty(Property property)

      Sets a source property. If a property already exists it is overwritten.
      Parameters:
        `property` - The new property to set.
      Returns:
        The property that has been set.

    - #### setTargetProperty

          Property setTargetProperty(LocaleId locId,
                                     Property property)

      Sets a target property. If a property already exists it is overwritten.
      Parameters:
        `locId` - The target locale for which this property should be set.
        `property` - The new property to set. This name is case-sensitive.
      Returns:
        The property that has been set.