# com.bea.ide.document
IRelatedDocumentHandler Interface

public interface IRelatedDocumentHandler
extends `IDocumentHandler`

This class extends IDocumentHandler to add support for finding out information about related documents. The methods parallel some of the methods on `IRelatedDocument```, but do not require a document object to be instantiated. While they may still be expensive, they are somewhat lighter weight than instantiating an entire document object. Both the handler and the IRelatedDocument interfaces must be implemented to insure correct behavior with the IDE architecture.

All Known Implementing Classes
  `ControlDocumentFactory`, `JavaDocumentFactory`

All Superinterfaces
  `IDocumentHandler`

## Nested Class Summary

Nested classes from interface com.bea.ide.document`.`IDocumentHandler``
``IDocumentHandler.IHandlerContext`, `IDocumentHandler.Priority``

## Method Summary

`public `URI`` | `getParentDocument`(`URI` uriFile) Obtain the parent document for the given file.
`public boolean` | `isAutogenerated`(`URI` uriFile) This method allows the handler to determine if the specified file is autogenerated.

Methods from interface `com.bea.ide.document.`IDocumentHandler``
``createNewFile`, `getBaseName`, `getDefaultExtension`, `getHandlerId`, `invalidNameCheck`, `openDocument`, `resolveUnknownPriority`, `suggestValidName``

## Method Detail

### getParentDocument(URI) Method

    public URI getParentDocument(URI uriFile)

Obtain the parent document for the given file. If the isAutogenerated method returns true for a URI, this method should return the document from which the first was generated.

#### Parameters

uriFile
  URI of autogenerated file

#### Returns

URI of the file used to generate uriFile, or null if uriFile is not autogenerated or it's parent cannot be determined.

### isAutogenerated(URI) Method

    public boolean isAutogenerated(URI uriFile)

This method allows the handler to determine if the specified file is autogenerated. This is the equivalent of instantiating the document for the file and using the `IRelatedDocument``` interface to make the same method call. This method does not require instantiating the document however and is therefore lighter weight.

#### Parameters

uriFile
  File to check for autogeneration

#### Returns

true if the given uri is a file that was completely generated from the contents of another file.