com.esri.arcgis.carto
Class LayerFile

java.lang.Object
  extended by com.esri.arcgis.carto.LayerFile
All Implemented Interfaces:
ILayerFile, com.esri.arcgis.interop.RemoteObjRef, IDocumentVersion, java.io.Serializable

public class LayerFile
extends java.lang.Object
implements com.esri.arcgis.interop.RemoteObjRef, ILayerFile, IDocumentVersion

COM Class 'LayerFile'. Generated 3/19/2015 1:20:41 PM from 'C:\ArcGIS\COM\esriCarto.olb'

Description 'The LayerFile coclass is used to read and write layer document files.' Generator Options: PromptForTypeLibraries = False ClashPrefix = esri_ LowerCaseMemberNames = True IDispatchOnly = False RetryOnReject = False AwtForOcxs = True ArraysAsObjects = False DontRenameSameMethods = False ImplementConflictingInterfaces = True ReuseMethods = True RenameConflictingInterfaceMethods = True GenBeanInfo = True GenerateJavadoc =

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.esri.arcgis.carto.ILayerFile
IID, IID58478051_486a_4093_a620_a558af78baf5, xxDummy
 
Fields inherited from interface com.esri.arcgis.system.IDocumentVersion
IID, IIDecc43c55_0148_4ec1_bf87_b9a183c5dc98, xxDummy
 
Constructor Summary
LayerFile()
          Constructs a LayerFile using ArcGIS Engine.
LayerFile(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
LayerFile theLayerFile = (LayerFile) obj;
 
Method Summary
 void close()
          Close the layer file.
 boolean equals(java.lang.Object o)
          Compare this object with another
 void esri_new(java.lang.String sFile)
          Creates and opens a new layer File in preparation for the contents to be retrieve or updated.
static java.lang.String getClsid()
          getClsid.
 int getDocumentVersion()
          The version of the document to save.
 java.lang.String getFilename()
          The name of the layer file that the LayerFile coclass is linked to.
 com.esri.arcgis.interop.Dispatch getJintegraDispatch()
          Deprecated. Internal use only.
 ILayer getLayer()
          The Layer object.
 IPicture getThumbnail()
          The thumbnail stored in the layer file.
 int hashCode()
          the hashcode for this object
 boolean isLayerFile(java.lang.String sFile)
          Indicates if the file is a valid layer file.
 boolean isPresent(java.lang.String sFile)
          Indicates if the layer file is present.
 boolean isReadOnly(java.lang.String sFile)
          Indicates if the layer file is read only.
 void open(java.lang.String sFile)
          Open the layer file in preparation for the contents to be retrieved or updated.
 void release()
          Release a LayerFile.
 void replaceContents(ILayer pLayer)
          Replace the contents of the layer file.
 void save()
          Save the contents of the layer file to the bound file.
 void saveAs(java.lang.String sFile)
          Save the contents of the layer file to the specified file name.
 void setDocumentVersion(int docVersion)
          The version of the document to save.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayerFile

public LayerFile()
          throws java.io.IOException,
                 java.net.UnknownHostException
Constructs a LayerFile using ArcGIS Engine.

Throws:
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems

LayerFile

public LayerFile(java.lang.Object obj)
          throws java.io.IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
LayerFile theLayerFile = (LayerFile) obj;

Construct a LayerFile using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to LayerFile.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
java.io.IOException - if there are interop problems
Method Detail

getClsid

public static java.lang.String getClsid()
getClsid.


equals

public boolean equals(java.lang.Object o)
Compare this object with another

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class java.lang.Object

getJintegraDispatch

public com.esri.arcgis.interop.Dispatch getJintegraDispatch()
Deprecated. Internal use only.

Specified by:
getJintegraDispatch in interface com.esri.arcgis.interop.RemoteObjRef

release

public void release()
Release a LayerFile.

Specified by:
release in interface com.esri.arcgis.interop.RemoteObjRef

getFilename

public java.lang.String getFilename()
                             throws java.io.IOException,
                                    AutomationException
The name of the layer file that the LayerFile coclass is linked to.

Specified by:
getFilename in interface ILayerFile
Returns:
The sFile
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isLayerFile

public boolean isLayerFile(java.lang.String sFile)
                    throws java.io.IOException,
                           AutomationException
Indicates if the file is a valid layer file.

Specified by:
isLayerFile in interface ILayerFile
Parameters:
sFile - The sFile (in)
Returns:
The isLayerFile
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isPresent

public boolean isPresent(java.lang.String sFile)
                  throws java.io.IOException,
                         AutomationException
Indicates if the layer file is present.

Specified by:
isPresent in interface ILayerFile
Parameters:
sFile - The sFile (in)
Returns:
The isPresent
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isReadOnly

public boolean isReadOnly(java.lang.String sFile)
                   throws java.io.IOException,
                          AutomationException
Indicates if the layer file is read only.

Specified by:
isReadOnly in interface ILayerFile
Parameters:
sFile - The sFile (in)
Returns:
The isReadOnly
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayer

public ILayer getLayer()
                throws java.io.IOException,
                       AutomationException
The Layer object. If no layer object is stored in the layer file this returns NULL.

Specified by:
getLayer in interface ILayerFile
Returns:
A reference to a com.esri.arcgis.carto.ILayer
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getThumbnail

public IPicture getThumbnail()
                      throws java.io.IOException,
                             AutomationException
The thumbnail stored in the layer file. If this is empty E_FAIL is returned.

Specified by:
getThumbnail in interface ILayerFile
Returns:
A reference to a com.esri.arcgis.support.ms.stdole.IPicture
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_new

public void esri_new(java.lang.String sFile)
              throws java.io.IOException,
                     AutomationException
Creates and opens a new layer File in preparation for the contents to be retrieve or updated.

Specified by:
esri_new in interface ILayerFile
Parameters:
sFile - The sFile (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

open

public void open(java.lang.String sFile)
          throws java.io.IOException,
                 AutomationException
Open the layer file in preparation for the contents to be retrieved or updated.

Specified by:
open in interface ILayerFile
Parameters:
sFile - The sFile (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

close

public void close()
           throws java.io.IOException,
                  AutomationException
Close the layer file.

Specified by:
close in interface ILayerFile
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

replaceContents

public void replaceContents(ILayer pLayer)
                     throws java.io.IOException,
                            AutomationException
Replace the contents of the layer file.

Specified by:
replaceContents in interface ILayerFile
Parameters:
pLayer - A reference to a com.esri.arcgis.carto.ILayer (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

public void save()
          throws java.io.IOException,
                 AutomationException
Save the contents of the layer file to the bound file.

Specified by:
save in interface ILayerFile
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

saveAs

public void saveAs(java.lang.String sFile)
            throws java.io.IOException,
                   AutomationException
Save the contents of the layer file to the specified file name.

Specified by:
saveAs in interface ILayerFile
Parameters:
sFile - The sFile (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDocumentVersion

public void setDocumentVersion(int docVersion)
                        throws java.io.IOException,
                               AutomationException
The version of the document to save.

Specified by:
setDocumentVersion in interface IDocumentVersion
Parameters:
docVersion - A com.esri.arcgis.system.esriArcGISVersion constant (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDocumentVersion

public int getDocumentVersion()
                       throws java.io.IOException,
                              AutomationException
The version of the document to save.

Specified by:
getDocumentVersion in interface IDocumentVersion
Returns:
A com.esri.arcgis.system.esriArcGISVersion constant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.