|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.networkanalyst.NAClassDefinition
public class NAClassDefinition
Defines how fields should be mapped as inputs and outputs of analysis functions.
The NAClassDefinition is created and maintained by the network solver. The NAClassDefinition holds information about how the NAClass fields should be created when the solver creates the NAContext and corresponding NAClass objects. It also holds additional information about the fields of the NAClass that cannot be found on the IField interface. This information is used by the solver and the Network Analyst Tools.
There are three ways to obtain NAClassDefinition objects:
INASolver naSolver = new NARouteSolverClass();
INAContext naContext = naSolver.CreateContext(deNetworkDataset, "My Context");
INamedSet naClasses = naContext.NAClasses;
INAClass naClass = naClasses.get_ItemByName("Stops") as INAClass;
INAClassDefinition naClassDefinition = naClass.ClassDefinition;
INASolver naSolver= new NARouteSolverClass();
INamedSet naClassDefinitions = naSolver.ClassDefinitions;
INAClassDefinition naClassDefinition = naClassDefinitions.get_ItemByName("Stops") as INAClassDefinition;
INAClassDefinition naClassDef = new NAClassDefinitionClass ();
Constructor Summary | |
---|---|
NAClassDefinition()
Constructs a NAClassDefinition using ArcGIS Engine. |
|
NAClassDefinition(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. NAClassDefinition theNAClassDefinition = (NAClassDefinition) obj; |
Method Summary | |
---|---|
void |
assign(IClone src)
Assigns the properties of src to the receiver. |
void |
deserialize(IXMLSerializeData data)
Deserializes an object from XML. |
boolean |
equals(Object o)
Compare this object with another |
IClone |
esri_clone()
Clones the receiver and assigns the result to *clone. |
int |
findLocationRangesField()
The field index of the Location Ranges BLOB field used to store LocationRanges, or -1 if the referenced NAClass does not support NALocationRanges. |
IStringArray |
getCandidateFieldNames(String fieldName)
The field names that will be used by default for the network analyst class. |
IUID |
getClassCLSID()
The COM class id for the network analyst class. |
void |
getClassID(GUID[] pClassID)
getClassID |
static String |
getClsid()
getClsid. |
IFields |
getFields()
The fields for the network analyst class. |
int |
getFieldType(String fieldName)
The field type for a network analyst class field. |
int |
getLowerBound()
The minimum number of objects required in the class by the solver to perform analysis. |
String |
getName()
The name of the class. |
void |
getSizeMax(_ULARGE_INTEGER[] pcbSize)
getSizeMax |
int |
getUpperBound()
The maximum number of objects allowed in the class by the solver to perform analysis. |
int |
hashCode()
the hashcode for this object |
void |
isDirty()
isDirty |
boolean |
isEqual(IClone other)
Indicates if the receiver and other have the same properties. |
boolean |
isHasLocationFields()
Indicates if the class has location fields. |
boolean |
isIdentical(IClone other)
Indicates if the receiver and other are the same object. |
boolean |
isInput()
Indicates if the class is used as an input to analysis. |
boolean |
isOutput()
Indicates if the class is used as an output from analysis. |
void |
load(IStream pstm)
load |
void |
readExternal(ObjectInput in)
|
void |
save(IStream pstm,
int fClearDirty)
save |
void |
serialize(IXMLSerializeData data)
Serializes an object to XML. |
void |
setCandidateFieldNamesByRef(String fieldName,
IStringArray rhs2)
The field names that will be used by default for the network analyst class. |
void |
setClassCLSIDByRef(IUID rhs1)
The COM class id for the network analyst class. |
void |
setFieldsByRef(IFields rhs1)
The fields for the network analyst class. |
void |
setFieldType(String fieldName,
int rhs2)
The field type for a network analyst class field. |
void |
setIsInput(boolean rhs1)
Indicates if the class is used as an input to analysis. |
void |
setIsOutput(boolean rhs1)
Indicates if the class is used as an output from analysis. |
void |
setLowerBound(int rhs1)
The minimum number of objects required in the class by the solver to perform analysis. |
void |
setName(String rhs1)
The name of the class. |
void |
setUpperBound(int rhs1)
The maximum number of objects allowed in the class by the solver to perform analysis. |
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public NAClassDefinition() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic NAClassDefinition(Object obj) throws IOException
NAClassDefinition theNAClassDefinition = (NAClassDefinition) obj;
obj
to NAClassDefinition
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String getName() throws IOException, AutomationException
Name returns the name of the NAClass.
getName
in interface INAClassDefinition
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IUID getClassCLSID() throws IOException, AutomationException
ClassCLSID returns the CLSID of the row returned from the NAClass. By default this value is "{D4D5923C-EA31-4B8D-9050-6429CF17AB41}" which represents "esriNetworkAnalyst.NALocationFeature.1".
getClassCLSID
in interface INAClassDefinition
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFields getFields() throws IOException, AutomationException
Fields returns the fields on the NAClass.
getFields
in interface INAClassDefinition
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getFieldType(String fieldName) throws IOException, AutomationException
getFieldType
in interface INAClassDefinition
fieldName
- The fieldName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IStringArray getCandidateFieldNames(String fieldName) throws IOException, AutomationException
getCandidateFieldNames
in interface INAClassDefinition
fieldName
- The fieldName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isHasLocationFields() throws IOException, AutomationException
HasLocationFields returns true if the NAClass has the 4 fields (SourceID, SourceOID, PosAlong, and SideOfEdge) that are necessary to represent network locations.
isHasLocationFields
in interface INAClassDefinition
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getLowerBound() throws IOException, AutomationException
LowerBound specifies the minimum number of NALocationObjects that are required by the solver to perform analysis.
For example, an NARouteSolver requires at least 2 stops. This means that the LowerBound property of the Stop's NAClassDefinition would be 2.
getLowerBound
in interface INAClassDefinition
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getUpperBound() throws IOException, AutomationException
UpperBound specifies the maximum number of NALocationObjects that are allowed by the solver to perform analysis.
getUpperBound
in interface INAClassDefinition
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isInput() throws IOException, AutomationException
IsInput specifies if the NAClass is used as input to the solver.
isInput
in interface INAClassDefinition
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isOutput() throws IOException, AutomationException
IsOutput specifies if the NAClass is used as output by the solver.
isOutput
in interface INAClassDefinition
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int findLocationRangesField() throws IOException, AutomationException
Returns the index of the Location Ranges field within the NAClass.
findLocationRangesField
in interface INAClassDefinition2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setName(String rhs1) throws IOException, AutomationException
This property should only be set by a custom solver during the creation of the NAContext.
setName
in interface INAClassDefinitionEdit
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setClassCLSIDByRef(IUID rhs1) throws IOException, AutomationException
This property should only be set by a custom solver during the creation of the NAContext.
setClassCLSIDByRef
in interface INAClassDefinitionEdit
rhs1
- A reference to a com.esri.arcgis.system.IUID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setFieldsByRef(IFields rhs1) throws IOException, AutomationException
This property should only be set by a custom solver during the creation of the NAContext.
setFieldsByRef
in interface INAClassDefinitionEdit
rhs1
- A reference to a com.esri.arcgis.geodatabase.IFields (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setFieldType(String fieldName, int rhs2) throws IOException, AutomationException
setFieldType
in interface INAClassDefinitionEdit
fieldName
- The fieldName (in)rhs2
- The rhs2 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCandidateFieldNamesByRef(String fieldName, IStringArray rhs2) throws IOException, AutomationException
CandidateFieldNames returns an IStringArray that contains an array of field names that are used to provide hints to the NAClassFieldMap for how to map input fields to fields on the NAClass.
This property is OK to be set at any time.
setCandidateFieldNamesByRef
in interface INAClassDefinitionEdit
fieldName
- The fieldName (in)rhs2
- A reference to a com.esri.arcgis.system.IStringArray (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setLowerBound(int rhs1) throws IOException, AutomationException
LowerBound specifies the minimum number of network locations required by the solver to perform analysis.
This property should only be set by a custom solver during the creation of the NAContext.
setLowerBound
in interface INAClassDefinitionEdit
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setUpperBound(int rhs1) throws IOException, AutomationException
UpperBound specifies the maximum number of network locations required by the solver to perform analysis.
This property should only be set by a custom solver during the creation of the NAContext.
setUpperBound
in interface INAClassDefinitionEdit
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setIsInput(boolean rhs1) throws IOException, AutomationException
IsInput specifies if the NAClass is used as input for the solve.
An NAClass may be both an input and output class. For example, Stops are used as input to specify the locations visited and used as output to specify how long it took to reach each location visited.
This property should only be set by a custom solver during the creation of the NAContext.
setIsInput
in interface INAClassDefinitionEdit
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setIsOutput(boolean rhs1) throws IOException, AutomationException
IsOutput specifies if the NAClass is used as output generated during the solve.
An output NAClass generally has features written to it or fields updated on existing features during solve. An NAClass may be both an input and output class. For example, Stops are used as input to specify the locations visited and used as output to specify how long it took to reach each location visited.
This property should only be set by a custom solver during the creation of the NAContext.
setIsOutput
in interface INAClassDefinitionEdit
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IClone esri_clone() throws IOException, AutomationException
esri_clone
in interface IClone
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void assign(IClone src) throws IOException, AutomationException
assign
in interface IClone
src
- A reference to a com.esri.arcgis.system.IClone (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isEqual(IClone other) throws IOException, AutomationException
IsEqual returns True if the receiver and the source have the same properties. Note, this does not imply that the receiver and the source reference the same object.
isEqual
in interface IClone
other
- A reference to a com.esri.arcgis.system.IClone (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isIdentical(IClone other) throws IOException, AutomationException
IsIdentical returns true if the receiver and the source reference the same object.
isIdentical
in interface IClone
other
- A reference to a com.esri.arcgis.system.IClone (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void isDirty() throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
isDirty
in interface IPersistStream
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void load(IStream pstm) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
load
in interface IPersistStream
pstm
- A reference to a com.esri.arcgis.system.IStream (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void save(IStream pstm, int fClearDirty) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
save
in interface IPersistStream
pstm
- A reference to a com.esri.arcgis.system.IStream (in)fClearDirty
- The fClearDirty (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getSizeMax(_ULARGE_INTEGER[] pcbSize) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
getSizeMax
in interface IPersistStream
pcbSize
- A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getClassID(GUID[] pClassID) throws IOException, AutomationException
IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.
getClassID
in interface IPersist
pClassID
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void serialize(IXMLSerializeData data) throws IOException, AutomationException
serialize
in interface IXMLSerialize
data
- A reference to a com.esri.arcgis.system.IXMLSerializeData (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deserialize(IXMLSerializeData data) throws IOException, AutomationException
deserialize
in interface IXMLSerialize
data
- A reference to a com.esri.arcgis.system.IXMLSerializeData (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |