com.esri.arcgis.datasourcesfile
Class SMRestriction

java.lang.Object
  extended by com.esri.arcgis.datasourcesfile.SMRestriction
All Implemented Interfaces:
ISMRestriction, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class SMRestriction
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ISMRestriction

The object for defining route restrictions.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
Serialized Form

Constructor Summary
SMRestriction()
          Constructs a SMRestriction using ArcGIS Engine.
SMRestriction(Object obj)
          Construct a SMRestriction using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 ISMNetAttribute getAttribute()
          The network attribute used as a restriction.
static String getClsid()
          getClsid.
 Object getParam()
          The restriction parameter value.
 int getType()
          Restriction type.
 int hashCode()
          the hashcode for this object
 void setAttributeByRef(ISMNetAttribute pAttr)
          The network attribute used as a restriction.
 void setParam(Object pvParam)
          The restriction parameter value.
 void setType(int pVal)
          Restriction type.
 
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

SMRestriction

public SMRestriction()
              throws IOException,
                     UnknownHostException
Constructs a SMRestriction using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

SMRestriction

public SMRestriction(Object obj)
              throws IOException
Construct a SMRestriction using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to SMRestriction.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems SMRestriction theSMRestriction = (SMRestriction) obj;
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

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

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getAttribute

public ISMNetAttribute getAttribute()
                             throws IOException,
                                    AutomationException
The network attribute used as a restriction.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getAttribute in interface ISMRestriction
Returns:
A reference to a com.esri.arcgis.datasourcesfile.ISMNetAttribute
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAttributeByRef

public void setAttributeByRef(ISMNetAttribute pAttr)
                       throws IOException,
                              AutomationException
The network attribute used as a restriction.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setAttributeByRef in interface ISMRestriction
Parameters:
pAttr - A reference to a com.esri.arcgis.datasourcesfile.ISMNetAttribute (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getType

public int getType()
            throws IOException,
                   AutomationException
Restriction type.

Remarks

The restriction type can be Strict or Relaxed. Strict restrictions can never be violated by the solver, while Relaxed restrictions can be violated if there is no other way to calculate a route.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getType in interface ISMRestriction
Returns:
A com.esri.arcgis.datasourcesfile.esriSMRestrictionType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setType

public void setType(int pVal)
             throws IOException,
                    AutomationException
Restriction type.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setType in interface ISMRestriction
Parameters:
pVal - A com.esri.arcgis.datasourcesfile.esriSMRestrictionType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getParam

public Object getParam()
                throws IOException,
                       AutomationException
The restriction parameter value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getParam in interface ISMRestriction
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setParam

public void setParam(Object pvParam)
              throws IOException,
                     AutomationException
The restriction parameter value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setParam in interface ISMRestriction
Parameters:
pvParam - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.