Style Intelligence v12.0

inetsoft.uql.erm
Class AttributeRef

java.lang.Object
  extended by inetsoft.uql.erm.AbstractDataRef
      extended by inetsoft.uql.erm.AttributeRef
All Implemented Interfaces:
DataRef, inetsoft.util.DataSerializable, inetsoft.util.XMLSerializable, Serializable, Cloneable, Comparable

public class AttributeRef
extends AbstractDataRef

Class holding a reference to an attribute and its parent entity.

Since:
4.4
See Also:
Serialized Form

Field Summary
 
Fields inherited from class inetsoft.uql.erm.AbstractDataRef
chash, cname
 
Fields inherited from interface inetsoft.uql.erm.DataRef
AGG_CALC, CUBE, CUBE_DIMENSION, CUBE_MEASURE, CUBE_MODEL_DIMENSION, CUBE_MODEL_TIME_DIMENSION, CUBE_TIME_DIMENSION, DIMENSION, MEASURE, MODEL, NONE, TIME
 
Constructor Summary
AttributeRef()
          Create a new instance of AttributeRef.
AttributeRef(DataRef ref)
          Get create an attribute ref using the entity and attribute of the ref.
AttributeRef(String attribute)
          Create a reference to the specified attribute.
AttributeRef(String entity, String attribute)
          Create a reference to the specified attribute.
 
Method Summary
 Object clone()
          Create a copy of this object.
protected  Object cloneObject()
          Make a copy of this object in deep clone.
 String getAttribute()
          Get the referenced attribute.
 String getCaption()
          Get the caption.
 String getDataType()
          Get the data type.
 String getDefaultFormula()
          Get the default formula.
 String getEntity()
          Get the attribute's parent entity.
 int getRefType()
          Getter of ref type.
 boolean isExpression()
          Check if the attribute is an expression.
protected  void parseAttributes(Element tag)
          Read in the definition of this object from an XML tag.
 void setCaption(String caption)
          Set the caption.
 void setDataType(String dtype)
          Set the data type.
 void setDefaultFormula(String formula)
          Set the default formula.
 void setRefType(int rtype)
          Setter of ref type.
 String toString()
          Get a textual representation of this object.
 String toView()
          Get the view representation of this field.
protected  void writeAttributes(PrintWriter writer)
          Write an XML element representation of this object.
protected  void writeAttributes2(DataOutputStream dos)
          Write the attributes of this object.
 
Methods inherited from class inetsoft.uql.erm.AbstractDataRef
addr, compareTo, createDataRef, equals, equals, getAttributes, getClass, getEntities, getName, getTypeNode, hashCode, isEmpty, isEntityBlank, parseCDATA, parseContents, parseData, parseXML, writeCDATA, writeCDATA2, writeContents, writeContents2, writeData, writeXML
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeRef

public AttributeRef()
Create a new instance of AttributeRef. This constructor is for internal use only.


AttributeRef

public AttributeRef(String attribute)
Create a reference to the specified attribute.

Parameters:
attribute - the name of the attribute

AttributeRef

public AttributeRef(String entity,
                    String attribute)
Create a reference to the specified attribute.

Parameters:
entity - the name of the attribute's parent entity
attribute - the name of the attribute

AttributeRef

public AttributeRef(DataRef ref)
Get create an attribute ref using the entity and attribute of the ref.

Method Detail

setRefType

public void setRefType(int rtype)
Setter of ref type.

Parameters:
rtype - the type of the ref, NONE, DIMENSION or MEASURE.

getRefType

public int getRefType()
Getter of ref type.

Returns:
the ref type, one of NONE, DIMENSION and MEASURE.

getDefaultFormula

public String getDefaultFormula()
Get the default formula.

Specified by:
getDefaultFormula in interface DataRef
Overrides:
getDefaultFormula in class AbstractDataRef

setDefaultFormula

public void setDefaultFormula(String formula)
Set the default formula.


isExpression

public boolean isExpression()
Check if the attribute is an expression.

Returns:
true if is an expression, false otherwise

getEntity

public String getEntity()
Get the attribute's parent entity.

Returns:
the name of the entity

getCaption

public String getCaption()
Get the caption.

Returns:
the caption.

setCaption

public void setCaption(String caption)
Set the caption.

Parameters:
caption - the specified caption.

getAttribute

public String getAttribute()
Get the referenced attribute.

Returns:
the name of the attribute

getDataType

public String getDataType()
Get the data type.

Specified by:
getDataType in interface DataRef
Overrides:
getDataType in class AbstractDataRef
Returns:
the data type defined in XSchema.

setDataType

public void setDataType(String dtype)
Set the data type.

Parameters:
dtype - the data type defined in XSchema.

toString

public String toString()
Get a textual representation of this object.

Overrides:
toString in class AbstractDataRef
Returns:
a String representation of this object

writeAttributes

protected void writeAttributes(PrintWriter writer)
Write an XML element representation of this object.

Specified by:
writeAttributes in class AbstractDataRef
Parameters:
writer - the output stream to which to write the XML data

writeAttributes2

protected void writeAttributes2(DataOutputStream dos)
Write the attributes of this object.

Overrides:
writeAttributes2 in class AbstractDataRef
Parameters:
dos - the output stream to which to write the OutputStream data.

parseAttributes

protected void parseAttributes(Element tag)
                        throws Exception
Read in the definition of this object from an XML tag.

Specified by:
parseAttributes in class AbstractDataRef
Parameters:
tag - the XML Element representing this object
Throws:
Exception

clone

public Object clone()
Create a copy of this object.

Specified by:
clone in interface DataRef
Overrides:
clone in class AbstractDataRef
Returns:
a copy of this object.

toView

public String toView()
Get the view representation of this field.

Returns:
the view representation of this field

cloneObject

protected Object cloneObject()
Make a copy of this object in deep clone.


Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.