org.apache.fop.afp.modca

## Class AbstractTripletStructuredObject

- java.lang.Object
- - org.apache.fop.afp.modca.AbstractAFPObject
  - - org.apache.fop.afp.modca.AbstractStructuredObject
    - - org.apache.fop.afp.modca.AbstractTripletStructuredObject

- All Implemented Interfaces:
    Streamable
  Direct Known Subclasses:
    AbstractDescriptor, AbstractNamedAFPObject, MapContainerData, MapDataResource, MapImageObject, PreprocessPresentationObject, PresentationEnvironmentControl, TagLogicalElement

      public abstract class AbstractTripletStructuredObject
      extends AbstractStructuredObject

  A MODCA structured object base class providing support for Triplets

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.fop.afp.modca.AbstractAFPObject

      `AbstractAFPObject.Category, AbstractAFPObject.Type`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.List<AbstractTriplet>` | `triplets` list of object triplets

    - ### Fields inherited from class org.apache.fop.afp.modca.AbstractAFPObject

      `LOG, SF_CLASS, SF_HEADER_LENGTH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractTripletStructuredObject()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addTriplet(AbstractTriplet triplet)` Adds a triplet to this structured object
    `void` | `addTriplets(java.util.Collection<AbstractTriplet> tripletCollection)` Adds a list of triplets to the triplets contained within this structured field
    `java.lang.String` | `getFullyQualifiedName()`
    `protected int` | `getTripletDataLength()` Returns the triplet data length
    `protected java.util.List<AbstractTriplet>` | `getTriplets()`
    `boolean` | `hasTriplet(byte tripletId)` Returns true of this structured field has the given triplet
    `boolean` | `hasTriplets()` Returns true when this structured field contains triplets
    `void` | `setComment(java.lang.String commentString)` Sets a comment on this resource
    `void` | `setFullyQualifiedName(byte fqnType, byte fqnFormat, java.lang.String fqName)` Sets the fully qualified name of this structured field
    `void` | `setFullyQualifiedName(byte fqnType, byte fqnFormat, java.lang.String fqName, boolean utf16be)`
    `void` | `setObjectClassification(byte objectClass, Registry.ObjectType objectType, boolean dataInContainer, boolean containerHasOEG, boolean dataInOCD)` Sets the objects classification
    `protected void` | `writeTriplets(java.io.OutputStream os)` Writes any triplet data

    - ### Methods inherited from class org.apache.fop.afp.modca.AbstractStructuredObject

      `writeContent, writeEnd, writeStart, writeToStream`

    - ### Methods inherited from class org.apache.fop.afp.modca.AbstractAFPObject

      `copySF, copySF, truncate, writeChunksToStream, writeObjects`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### triplets

          protected java.util.List<AbstractTriplet> triplets

      list of object triplets

  - ### Constructor Detail

    - #### AbstractTripletStructuredObject

          public AbstractTripletStructuredObject()

  - ### Method Detail

    - #### getTripletDataLength

          protected int getTripletDataLength()

      Returns the triplet data length
      Returns:
        the triplet data length

    - #### hasTriplets

          public boolean hasTriplets()

      Returns true when this structured field contains triplets
      Returns:
        true when this structured field contains triplets

    - #### writeTriplets

          protected void writeTriplets(java.io.OutputStream os)
                                throws java.io.IOException

      Writes any triplet data
      Parameters:
        `os` - The stream to write to
      Throws:
        `java.io.IOException` - The stream to write to

    - #### hasTriplet

          public boolean hasTriplet(byte tripletId)

      Returns true of this structured field has the given triplet
      Parameters:
        `tripletId` - the triplet identifier
      Returns:
        true if the structured field has the given triplet

    - #### addTriplet

          public void addTriplet(AbstractTriplet triplet)

      Adds a triplet to this structured object
      Parameters:
        `triplet` - the triplet to add

    - #### addTriplets

          public void addTriplets(java.util.Collection<AbstractTriplet> tripletCollection)

      Adds a list of triplets to the triplets contained within this structured field
      Parameters:
        `tripletCollection` - a collection of triplets

    - #### getTriplets

          protected java.util.List<AbstractTriplet> getTriplets()

      Returns:
        the triplet list pertaining to this resource

    - #### setFullyQualifiedName

          public void setFullyQualifiedName(byte fqnType,
                                            byte fqnFormat,
                                            java.lang.String fqName)

      Sets the fully qualified name of this structured field
      Parameters:
        `fqnType` - the fully qualified name type of this resource
        `fqnFormat` - the fully qualified name format of this resource
        `fqName` - the fully qualified name of this resource

    - #### setFullyQualifiedName

          public void setFullyQualifiedName(byte fqnType,
                                            byte fqnFormat,
                                            java.lang.String fqName,
                                            boolean utf16be)

    - #### getFullyQualifiedName

          public java.lang.String getFullyQualifiedName()

      Returns:
        the fully qualified name of this triplet or null if it does not exist

    - #### setObjectClassification

          public void setObjectClassification(byte objectClass,
                                              Registry.ObjectType objectType,
                                              boolean dataInContainer,
                                              boolean containerHasOEG,
                                              boolean dataInOCD)

      Sets the objects classification
      Parameters:
        `objectClass` - the classification of the object
        `objectType` - the MOD:CA registry object type entry for the given object/component type of the object
        `dataInContainer` - whether the data resides in the container
        `containerHasOEG` - whether the container has an object environment group
        `dataInOCD` - whether the data resides in a object container data structured field

    - #### setComment

          public void setComment(java.lang.String commentString)

      Sets a comment on this resource
      Parameters:
        `commentString` - a comment string

Copyright 1999-2020 The Apache Software Foundation. All Rights Reserved.