Class BaseNameable

    • Field Detail

      • mimeType

        protected String mimeType
      • isTranslatable

        protected boolean isTranslatable
      • preserveWS

        protected boolean preserveWS
    • Constructor Detail

      • BaseNameable

        public BaseNameable()
    • Method Detail

      • getId

        public String getId()
        Description copied from interface: IResource
        Gets the identifier of the resource. This identifier is unique per extracted document and by type of resource. This value is filter-specific. It and may be different from one extraction of the same document to the next. It can a sequential number or not, incremental or not, and it can be not a number. It has no correspondence in the source document ("IDs" coming from the source document are "names" and not available for all resources).
        Specified by:
        getId in interface IResource
        Returns:
        the identifier of this resource.
      • setId

        public void setId​(String id)
        Description copied from interface: IResource
        Sets the identifier of this resource.
        Specified by:
        setId in interface IResource
        Parameters:
        id - the new identifier value.
        See Also:
        IResource.getId()
      • getName

        public String getName()
        Description copied from interface: INameable
        Gets the name of this resource. The resource name corresponds to different things depending on the type of resource. For a StartDocument the name is the URI of the document. Otherwise, in most cases the name is the identifier of the resource (This is the equivalent of the XLIFF resname attribute).
        Specified by:
        getName in interface INameable
        Returns:
        This resource name, or null if there is none.
      • setName

        public void setName​(String value)
        Description copied from interface: INameable
        Sets the name of this resource. The resource name is the equivalent of the XLIFF resname attribute.
        Specified by:
        setName in interface INameable
        Parameters:
        value - New name to set.
      • getType

        public String getType()
        Description copied from interface: INameable
        Gets the type information associated with this resource. For example "button".
        Specified by:
        getType in interface INameable
        Returns:
        The type information associated with this resource.
      • setType

        public void setType​(String value)
        Description copied from interface: INameable
        Sets the type information associated with this resource. For example "button".
        Specified by:
        setType in interface INameable
        Parameters:
        value - The new type information.
      • getMimeType

        public String getMimeType()
        Description copied from interface: INameable
        Gets the type of content of this resource. For example "text/xml".
        Specified by:
        getMimeType in interface INameable
        Returns:
        The type of content of this resource.
      • setMimeType

        public void setMimeType​(String value)
        Description copied from interface: INameable
        Sets the type of content of this resource. For example "text/xml".
        Specified by:
        setMimeType in interface INameable
        Parameters:
        value - The new type of content of this resource.
      • isTranslatable

        public boolean isTranslatable()
        Description copied from interface: INameable
        Indicates if the content of this resource is translatable. By default this indicator is set to true for all resources.
        Specified by:
        isTranslatable in interface INameable
        Returns:
        True if the content of this resource is translatable. False if it is not translatable.
      • setIsTranslatable

        public void setIsTranslatable​(boolean value)
        Description copied from interface: INameable
        Sets the flag indicating if the content of this resource is translatable.
        Specified by:
        setIsTranslatable in interface INameable
        Parameters:
        value - True to indicate that the content of this resource is translatable.
      • preserveWhitespaces

        public boolean preserveWhitespaces()
        Description copied from interface: INameable
        Indicates if the white-spaces in the content of this resource should be preserved. By default this indicator is set to false for all resources.
        Specified by:
        preserveWhitespaces in interface INameable
        Returns:
        True if the white-spaces in the content of this resource should be preserved.
      • setPreserveWhitespaces

        public void setPreserveWhitespaces​(boolean value)
        Description copied from interface: INameable
        sets the flag indicating if the white-spaces in the content of this resource should be preserved.
        Specified by:
        setPreserveWhitespaces in interface INameable
        Parameters:
        value - True to indicate that the white-spaces in the content of this resource should be preserved.
      • getSkeleton

        public ISkeleton getSkeleton()
        Description copied from interface: IWithSkeleton
        Gets the skeleton object for this resource.
        Specified by:
        getSkeleton in interface IWithSkeleton
        Returns:
        the skeleton object for this resource or null if there is none.
      • setSkeleton

        public void setSkeleton​(ISkeleton skeleton)
        Description copied from interface: IWithSkeleton
        Sets the skeleton object for this resource.
        Specified by:
        setSkeleton in interface IWithSkeleton
        Parameters:
        skeleton - the skeleton object to set.
      • hasProperty

        public boolean hasProperty​(String name)
        Description copied from interface: IWithProperties
        Indicates if a resource-level property exists for a given name.
        Specified by:
        hasProperty in interface IWithProperties
        Parameters:
        name - The name of the resource-level property to query.
        Returns:
        True if a resource-level property exists, false otherwise.
      • getProperty

        public Property getProperty​(String name)
        Description copied from interface: IWithProperties
        Gets the resource-level property for a given name.
        Specified by:
        getProperty in interface IWithProperties
        Parameters:
        name - Name of the property to retrieve.
        Returns:
        The property or null if it does not exist.
      • setProperty

        public Property setProperty​(Property property)
        Description copied from interface: IWithProperties
        Sets a resource-level property. If a property already exists it is overwritten.
        Specified by:
        setProperty in interface IWithProperties
        Parameters:
        property - The new property to set.
        Returns:
        The property that has been set.
      • removeProperty

        public void removeProperty​(String name)
        Description copied from interface: IWithProperties
        Removes a resource-level property of a given name. If the property does not exists nothing happens.
        Specified by:
        removeProperty in interface IWithProperties
        Parameters:
        name - The name of the property to remove.
      • getPropertyNames

        public Set<String> getPropertyNames()
        Description copied from interface: IWithProperties
        Gets the names of all the resource-level properties for this resource.
        Specified by:
        getPropertyNames in interface IWithProperties
        Returns:
        All the names of the resource-level properties for this resource.
      • setAnnotation

        public void setAnnotation​(IAnnotation annotation)
        Description copied from interface: IWithAnnotations
        Sets an annotation object for this resource.
        Specified by:
        setAnnotation in interface IWithAnnotations
        Parameters:
        annotation - the annotation object to set.