ResourceGroup (Apache FOP 2.7 API)
Date: 2022-01-12

org.apache.fop.afp.modca

## Class ResourceGroup

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

- All Implemented Interfaces:
    Streamable
  Direct Known Subclasses:
    StreamedResourceGroup

      public class ResourceGroup
      extends AbstractNamedAFPObject

  A Resource Group contains a set of overlays.

- - ### Nested Class Summary

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

      `AbstractAFPObject.Category, AbstractAFPObject.Type`

  - ### Field Summary

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

      `name`

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

      `triplets`

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

      `LOG, SF_CLASS, SF_HEADER_LENGTH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResourceGroup(java.lang.String name)` Constructor for the ResourceGroup, this takes a name parameter which must be 8 characters long.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addObject(AbstractNamedAFPObject namedObject)` Add this named object to this resource group
    `int` | `getResourceCount()` Returns the number of resources contained in this resource group
    `java.lang.String` | `toString()`
    `void` | `writeContent(java.io.OutputStream os)` Helper method to write the contents of the Object.
    `void` | `writeEnd(java.io.OutputStream os)` Helper method to write the end of the Object.
    `void` | `writeStart(java.io.OutputStream os)` Helper method to write the start of the Object.

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

      `copySF, getName, getNameBytes, getNameLength, setName`

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

      `addTriplet, addTriplets, getFullyQualifiedName, getTripletDataLength, getTriplets, hasTriplet, hasTriplets, setComment, setFullyQualifiedName, setFullyQualifiedName, setObjectClassification, writeTriplets`

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

      `writeToStream`

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

      `copySF, truncate, writeChunksToStream, writeObjects`

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

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

- - ### Constructor Detail

    - #### ResourceGroup

          public ResourceGroup(java.lang.String name)

      Constructor for the ResourceGroup, this takes a name parameter which must be 8 characters long.
      Parameters:
        `name` - the resource group name

  - ### Method Detail

    - #### addObject

          public void addObject(AbstractNamedAFPObject namedObject)
                         throws java.io.IOException

      Add this named object to this resource group
      Parameters:
        `namedObject` - a named object
      Throws:
        `java.io.IOException` - thrown if an I/O exception of some sort has occurred.

    - #### getResourceCount

          public int getResourceCount()

      Returns the number of resources contained in this resource group
      Returns:
        the number of resources contained in this resource group

    - #### writeStart

          public void writeStart(java.io.OutputStream os)
                          throws java.io.IOException

      Helper method to write the start of the Object.
      Overrides:
        `writeStart` in class `AbstractStructuredObject`
      Parameters:
        `os` - The stream to write to
      Throws:
        `java.io.IOException` - throws an I/O exception if one occurred

    - #### writeContent

          public void writeContent(java.io.OutputStream os)
                            throws java.io.IOException

      Helper method to write the contents of the Object.
      Overrides:
        `writeContent` in class `AbstractStructuredObject`
      Parameters:
        `os` - The stream to write to
      Throws:
        `java.io.IOException` - throws an I/O exception if one occurred

    - #### writeEnd

          public void writeEnd(java.io.OutputStream os)
                        throws java.io.IOException

      Helper method to write the end of the Object.
      Overrides:
        `writeEnd` in class `AbstractStructuredObject`
      Parameters:
        `os` - The stream to write to
      Throws:
        `java.io.IOException` - an I/O exception if one occurred

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `AbstractNamedAFPObject`

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