|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hedgehog.HObject
com.hedgehog.attributes.Attribute
com.hedgehog.attributes.Vector3DAttribute
public class Vector3DAttribute
Title: Vector3DAttribute - a Vector3D attribute.
Description: Represents Vector3D attributes.
Copyright: Copyright (c) Hedgehog Software 2007-2009.
Company: Hedgehog Software.
| Field Summary | |
|---|---|
protected Vector3D |
mAttribute
Vector3D attribute. |
| Fields inherited from class com.hedgehog.HObject |
|---|
mID, mName |
| Constructor Summary | |
|---|---|
Vector3DAttribute()
Default constructor. |
|
Vector3DAttribute(Vector3D attribute)
Constructor. |
|
Vector3DAttribute(Vector3DAttribute object)
Copy constructor. |
|
| Method Summary | |
|---|---|
AttributeType |
attributeType()
Returns the attribute type; ie VECTOR3D_ATTRIBUTE. |
Attribute |
combine(Attribute attribute,
ID combinedID,
double tolerance)
Combines the specified attribute with this attribute using averaging. |
Attribute |
combine(java.util.Vector<Attribute> attributes,
java.util.Vector<Point3D> attributePositions,
Point3D attributePosition,
ID combinedID,
boolean useThisAttribute,
int method,
double tolerance)
Combines the specified vector of attributes. |
java.sql.PreparedStatement |
databaseInsertStatement(java.sql.Connection connection,
int modelID,
int modelObjectID)
Returns a prepared statement for inserting (INSERT command) an attribute into a database. |
java.sql.PreparedStatement |
databaseUpdateStatement(java.sql.Connection connection,
int modelID,
int modelObjectID)
Returns a prepared statement for updating (UPDATE command) an attribute into a database. |
boolean |
equals(java.lang.Object object)
Tests whether or not the specified object is equal to this object. |
Attributes |
fromDatabase(java.sql.Connection connection,
Model model,
int modelID,
int modelObjectID)
Returns a vector of model object attributes associated with the specified database table, model and model object. |
Attribute |
fromXMLNode(org.w3c.dom.Document document,
org.w3c.dom.Node documentRootNode,
org.w3c.dom.Node node,
Model model)
Returns a model attribute from the specified xml node. |
Vector3D |
getAttribute()
Returns the attribute. |
int |
hashCode()
Returns the hash code of this object. |
boolean |
sameAttributeObject(Attribute attribute)
Tests whether or not the specified attribute has the same encasulated object as this attribute. |
void |
setAttribute(Vector3D attribute)
Sets the attribute. |
java.lang.String |
toString()
Returns a String representation of an Vector3DAttribute object. |
org.w3c.dom.Element |
toXMLNode(org.w3c.dom.Document document,
org.w3c.dom.Element documentRootNode,
org.w3c.dom.Element attributesNode)
Returns the DOM xml node of this attribute. |
| Methods inherited from class com.hedgehog.HObject |
|---|
clone, compare, compareTo, copy, getID, getName, hasID, hasName, setID, setName |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Vector3D mAttribute
| Constructor Detail |
|---|
public Vector3DAttribute()
public Vector3DAttribute(Vector3D attribute)
attribute - Attribute.public Vector3DAttribute(Vector3DAttribute object)
object - Object to copy.| Method Detail |
|---|
public Vector3D getAttribute()
public void setAttribute(Vector3D attribute)
attribute - New attribute.public java.lang.String toString()
toString in class Attributepublic boolean equals(java.lang.Object object)
equals in interface java.util.Comparatorequals in class Attributeobject - Object to compare.
public int hashCode()
hashCode in class Attributepublic AttributeType attributeType()
attributeType in class Attribute
public Attribute combine(Attribute attribute,
ID combinedID,
double tolerance)
throws java.lang.IllegalArgumentException
combine in class Attributeattribute - Attribute to combine with this attribute.combinedID - Combined ID.tolerance - Required tolerance. Not used for integer attributes.
java.lang.IllegalArgumentException - Thrown if the specified attribute is null or not of the same type as this attribute.
public Attribute combine(java.util.Vector<Attribute> attributes,
java.util.Vector<Point3D> attributePositions,
Point3D attributePosition,
ID combinedID,
boolean useThisAttribute,
int method,
double tolerance)
throws java.lang.IllegalArgumentException
combine in class Attributeattributes - Vector of attributes.attributePositions - Attribute positions.attributePosition - Position of this attribute.useThisAttribute - Specifies whether or not this attribute is used in the combination.method - Method used to combine attributes: 0(averaging) or interpolation(1).tolerance - Required tolerance.combinedID - Combined ID.
java.lang.IllegalArgumentException - Thrown if attributes is empty, the sizes of attributes and attributePositions differ in size, an invalid method was specified or an internal error occurred combining the two attributes.public boolean sameAttributeObject(Attribute attribute)
sameAttributeObject in class Attributeattribute - Attribute to compare.
public org.w3c.dom.Element toXMLNode(org.w3c.dom.Document document,
org.w3c.dom.Element documentRootNode,
org.w3c.dom.Element attributesNode)
toXMLNode in class Attributedocument - XML document.documentRootNode - Document root node; ie attributesNode -
public Attribute fromXMLNode(org.w3c.dom.Document document,
org.w3c.dom.Node documentRootNode,
org.w3c.dom.Node node,
Model model)
throws InvalidObjectException
fromXMLNode in class Attributedocument - XML document.documentRootNode - Document root node; ie Model node.node - XML node.model - Model to which node object is added.
InvalidObjectException - Thrown if an error occurred building the attribute.
public java.sql.PreparedStatement databaseInsertStatement(java.sql.Connection connection,
int modelID,
int modelObjectID)
throws java.sql.SQLException
databaseInsertStatement in class Attributeconnection - Database connection.modelID - Model ID.modelObjectID - Model object ID that the attribute is associated with.
java.sql.SQLException - Thrown if an SQL exception occurs.
public java.sql.PreparedStatement databaseUpdateStatement(java.sql.Connection connection,
int modelID,
int modelObjectID)
throws java.sql.SQLException
databaseUpdateStatement in class Attributeconnection - Database connection.modelID - Model ID.modelObjectID - Model object ID that the attribute is associated with.
java.sql.SQLException - Thrown if an SQL exception occurs.
public Attributes fromDatabase(java.sql.Connection connection,
Model model,
int modelID,
int modelObjectID)
throws java.sql.SQLException
fromDatabase in class Attributeconnection - Database connection.model - Model.modelID - Model ID.modelObjectID - Model object ID that the attribute is associated with.
java.sql.SQLException - Thrown if an SQL exception occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||