Class PropertyPLY

java.lang.Object
com.irurueta.geometry.io.PropertyPLY

public class PropertyPLY extends Object
Property contained within a header element.
  • Field Details

    • name

      final String name
      Name of the property.
    • type

      final PropertyTypePLY type
      Property type (either scalar or list).
    • lengthType

      final DataTypePLY lengthType
      Data type of the value indicating length of the array for list properties.
    • valueType

      final DataTypePLY valueType
      Data type for the values contained within this property.
    • readValueFromBufferListener

      PLYReadValueFromBufferListener readValueFromBufferListener
      Listener to read the value of this property contained within the byte read buffer and transform it into the appropriate data type for this property.
    • readValueFromStreamListener

      PLYReadValueFromStreamListener readValueFromStreamListener
      Listener to read the appropriate amount of bytes from a PLY file corresponding to this property data type. The amount of bytes read are stored within the read buffer.
    • readLengthValueFromBufferListener

      PLYReadValueFromBufferListener readLengthValueFromBufferListener
      Listener to read the length value of this property contained within the byte read buffer and transform it into the appropriate data type for this property.
    • readLengthValueFromStreamListener

      PLYReadValueFromStreamListener readLengthValueFromStreamListener
      Listener to read the appropriate amount of bytes from a PLY file corresponding to this property length data type. The amount of bytes read are stored within the read buffer.
  • Constructor Details

    • PropertyPLY

      public PropertyPLY(String name, DataTypePLY valueType)
      Constructor.
      Parameters:
      name - name of this property.
      valueType - data type of the value of this property.
    • PropertyPLY

      public PropertyPLY(String name, DataTypePLY lengthType, DataTypePLY valueType)
      Constructor.
      Parameters:
      name - name of this property.
      lengthType - data type of the length value of this property.
      valueType - data type of the value of this property.
  • Method Details

    • getName

      public String getName() throws NotAvailableException
      Returns name of this property.
      Returns:
      Name of this property.
      Throws:
      NotAvailableException - Raised if name has not been already provided.
    • isNameAvailable

      public boolean isNameAvailable()
      Determines if name has already been provided and is ready for retrieval.
      Returns:
      True if name is available, false otherwise.
    • getPropertyType

      public PropertyTypePLY getPropertyType()
      Property type (either scalar or list).
      Returns:
      property type.
    • getLengthType

      public DataTypePLY getLengthType() throws NotAvailableException
      Returns data type of the value indicating length of the array if this is a list property.
      Returns:
      data type of the value indicating length of the array if this is a list property.
      Throws:
      NotAvailableException - raised if property type has not yet been provided and is not available for retrieval.
    • isLengthTypeAvailable

      public boolean isLengthTypeAvailable()
      Determines whether length property type has been provided and is available for retrieval.
      Returns:
      True if length property type has been provided, false otherwise.
    • getValueType

      public DataTypePLY getValueType() throws NotAvailableException
      Returns data type for the value contained within this property.
      Returns:
      data type for the value contained within this property.
      Throws:
      NotAvailableException - raised if property type has not yet been provided and is not available for retrieval.
    • isValueTypeAvailable

      public boolean isValueTypeAvailable()
      Determines if data type for the value contained within this property has already been provided and is available for retrieval.
      Returns:
      True if data type for the value contained within this property is available for retrieval, false otherwise.
    • isValidProperty

      public boolean isValidProperty()
      Determines if this property is valid with the values that have already been provided.
      Returns:
      True if property is valid, false otherwise.
    • toString

      public String toString()
      Converts this property to string representation ready to be written in the header of a PLY file.
      Overrides:
      toString in class Object
      Returns:
      String representation of this property.
    • getReadValueFromBufferListener

      public PLYReadValueFromBufferListener getReadValueFromBufferListener() throws NotAvailableException
      Returns listener to read the value of this property contained within the byte read buffer and transforms it into the appropriate data type for this property.
      Returns:
      listener to read the value of this property.
      Throws:
      NotAvailableException - Raised if listener has not yet been provided and is not available for retrieval.
    • setReadValueFromBufferListener

      public void setReadValueFromBufferListener(PLYReadValueFromBufferListener listener)
      Sets listener to read the value of this property contained within the byte read buffer and transforms it into the appropriate data type for this property.
      Parameters:
      listener - listener to read the value of this property.
    • isReadValueFromBufferListenerAvailable

      public boolean isReadValueFromBufferListenerAvailable()
      Determines if listener to read the value of this property has been provided and is available for retrieval or not.
      Returns:
      True if listener is available, false otherwise.
    • getReadValueFromStreamListener

      public PLYReadValueFromStreamListener getReadValueFromStreamListener() throws NotAvailableException
      Returns listener to read the appropriate amount of bytes from a PLY file corresponding to this property data type. The amount of bytes read are stored within the read buffer.
      Returns:
      listener to read the appropriate amount of bytes from a PLY file.
      Throws:
      NotAvailableException - Raised if listener has not yet been provided and is not available for retrieval.
    • setReadValueFromStreamListener

      public void setReadValueFromStreamListener(PLYReadValueFromStreamListener listener)
      Sets listener to read the appropriate amount of bytes from a PLY file corresponding to this property data type. The amount of bytes read are stored within the read buffer.
      Parameters:
      listener - listener to read the appropriate amount of bytes from a PLY file.
    • isReadValueFromStreamListenerAvailable

      public boolean isReadValueFromStreamListenerAvailable()
      Determines if listener to read the appropriate amount of bytes from a PLY file has been provided and is available for retrieval or not.
      Returns:
      True if listener is available, false otherwise.
    • getReadLengthValueFromBufferListener

      public PLYReadValueFromBufferListener getReadLengthValueFromBufferListener() throws NotAvailableException
      Returns listener to read the length value of this property contained within the byte read buffer and transform it into the appropriate data type for this property.
      Returns:
      listener to read the length value of this property.
      Throws:
      NotAvailableException - Raised if listener has not yet been provided and is not available for retrieval.
    • setReadLengthValueFromBufferListener

      public void setReadLengthValueFromBufferListener(PLYReadValueFromBufferListener listener)
      Sets listener to read the length value of this property contained within the byte read buffer and transform it into the appropriate data type for this property.
      Parameters:
      listener - listener to read the length value of this property.
    • isReadLengthValueFromBufferListenerAvailable

      public boolean isReadLengthValueFromBufferListenerAvailable()
      Determines if listener to read the length value of this property has been provided and is available for retrieval or not.
      Returns:
      True if listener is available, false otherwise.
    • getReadLengthValueFromStreamListener

      public PLYReadValueFromStreamListener getReadLengthValueFromStreamListener() throws NotAvailableException
      Returns listener to read the appropriate amount of bytes from a PLY file corresponding to this property length data type. The amount of bytes read are stored within the read buffer.
      Returns:
      listener to read the appropriate amount of bytes from a PLY file.
      Throws:
      NotAvailableException - Raised if listener has not yet been provided and is not available for retrieval.
    • setReadLengthValueFromStreamListener

      public void setReadLengthValueFromStreamListener(PLYReadValueFromStreamListener listener)
      Sets listener to read the appropriate amount of bytes from a PLY file corresponding to this property length data type. The amount of bytes read are stored within the read buffer.
      Parameters:
      listener - listener to read the appropriate amount of bytes from a PLY file.
    • isReadLengthValueFromStreamListenerAvailable

      public boolean isReadLengthValueFromStreamListenerAvailable()
      Determines if listener to read the appropriate amount of bytes from a PLY file has been provided and is available for retrieval or not.
      Returns:
      True if listener is available, false otherwise.