Style Intelligence v12.0

inetsoft.uql.erm
Class XDataModel

java.lang.Object
  extended by inetsoft.uql.erm.XDataModel
All Implemented Interfaces:
XDomain, inetsoft.util.xml.XMLStorage.XMLFragment, Serializable, Cloneable

public class XDataModel
extends Object
implements Cloneable, Serializable, XDomain, inetsoft.util.xml.XMLStorage.XMLFragment

An XDataModel represents a set of logical models for a physical data source. A logical model consists of a collection of entities and relationships.

See Also:
Serialized Form

Field Summary
static String DATAMODEL
           
static String DEFAULTCONNECTION
           
static String LOGICALMODEL
           
static String PARTITION
           
static String VPMOBJECT
           
 
Constructor Summary
XDataModel(String datasource)
          Create a new instance of XDataModel.
 
Method Summary
 void addLogicalModel(XLogicalModel model)
          Add a logical model to this data model.
 void addPartition(XPartition partition)
          Add a partition to this model.
 void addVirtualPrivateModel(VirtualPrivateModel model)
          Add a virtual private model to this data model.
 void clearCache()
          Clears all cached cube result sets for this data model.
 Object clone()
          Create a copy of this object.
 boolean containsTable(String table)
          Check if a table is contained in the data model, will iterate the data model's partitions to get result.
 boolean containsVirtualPrivateModel(VirtualPrivateModel model)
          Check if contains a virtual private model in this data model.
 XCube getCube(String name)
          Get the specified cube.
 Enumeration getCubes()
          Deprecated.  
 String getDataSource()
          Get the name of the data source that this model represents.
 XLogicalModel getLogicalModel(String name)
          Get the logical model with the specified name.
 XLogicalModel getLogicalModel(String name, Principal user)
          Get the runtime mode logical model with the specified name.
 XLogicalModel getLogicalModel(String name, Principal user, boolean hideAttributes)
          Get the runtime mode logical model with the specified name.
 int getLogicalModelCount()
          Get the number of logical models in this data model.
 Enumeration getLogicalModelNames()
          Get the names of all logical models in this data model.
 XPartition getPartition(String name)
          Get the partition with the specified name.
 XPartition getPartition(String name, Principal user)
          Get the partition with the specified name.
 int getPartitionCount()
          Get the number of partitions in this data model.
 String[] getPartitionNames()
          Get the names of all partition in this data model.
 Enumeration getPartitions()
          Deprecated.  
 VirtualPrivateModel getVirtualPrivateModel(String name)
          Get the virtual private model with the specified private name.
 String[] getVirtualPrivateModelNames()
          Get the names of all virtual private model in this data model.
 Enumeration getVirtualPrivateModels()
          Deprecated.  
 void parseXML(Element tag)
          Read in the definition of this object from an XML tag.
 void removeLogicalModel(String name)
          Remove a logical model from this data model.
 void removePartition(String name)
          Remove a partition from this data model.
 void removeVirtualPrivateModel(String name)
          Remove a virtual private model from this data model.
 void removeVirtualPrivateModel(VirtualPrivateModel model)
          Remove a virtual private model from this data model.
 void removeVirtualPrivateModels()
          Remove all the virtual private models from this data model.
 void renameLogicalModel(String oldName, String newName)
          Rename a logical model in this data model.
 void renamePartition(String oldName, String newName)
          Rename a partition in this data model.
 void renameVirtualPrivateModel(String oldName, VirtualPrivateModel vpm)
          Rename a virtual private model in this data model.
 void setDataSource(String datasource)
          Set the name of the data source that this model represents.
 void updateLogicalModel(XLogicalModel model)
          Deprecated.  
 void validate()
          Validate the data model.
 void writeEnd(PrintWriter writer)
           
 void writeStart(PrintWriter writer)
           
 void writeXML(PrintWriter writer)
          Write an XML element representation of this object.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATAMODEL

public static final String DATAMODEL
See Also:
Constant Field Values

LOGICALMODEL

public static final String LOGICALMODEL
See Also:
Constant Field Values

PARTITION

public static final String PARTITION
See Also:
Constant Field Values

VPMOBJECT

public static final String VPMOBJECT
See Also:
Constant Field Values

DEFAULTCONNECTION

public static final String DEFAULTCONNECTION
See Also:
Constant Field Values
Constructor Detail

XDataModel

public XDataModel(String datasource)
Create a new instance of XDataModel.

Parameters:
datasource - the name of the JDBC data source that the model represents.
Method Detail

getDataSource

public String getDataSource()
Get the name of the data source that this model represents.

Specified by:
getDataSource in interface XDomain
Returns:
the name of a JDBC data source.

setDataSource

public void setDataSource(String datasource)
Set the name of the data source that this model represents.

Specified by:
setDataSource in interface XDomain
Parameters:
datasource - the name of a JDBC data source.

getCubes

public Enumeration getCubes()
Deprecated. 

Get the cubes contained in this domain.

Specified by:
getCubes in interface XDomain
Returns:
an Enumeration of XCube objects.

getCube

public XCube getCube(String name)
Get the specified cube.

Specified by:
getCube in interface XDomain
Parameters:
name - the name of the cube.
Returns:
an XCube object, or null if no cube with the specified name exists.

addLogicalModel

public void addLogicalModel(XLogicalModel model)
Add a logical model to this data model.

Parameters:
model - the logical model to add.

renameLogicalModel

public void renameLogicalModel(String oldName,
                               String newName)
Rename a logical model in this data model.

Parameters:
oldName - the old name of the logical model.
newName - the new name of the logical model.

renameVirtualPrivateModel

public void renameVirtualPrivateModel(String oldName,
                                      VirtualPrivateModel vpm)
Rename a virtual private model in this data model.

Parameters:
oldName - the old name of the virtual private model.
vpm - the new name of the virtual private model.

updateLogicalModel

public void updateLogicalModel(XLogicalModel model)
Deprecated. 

Update a logical model.

Parameters:
model - the logical model to update.

getLogicalModel

public XLogicalModel getLogicalModel(String name)
Get the logical model with the specified name.

Parameters:
name - the name of the logical model.
Returns:
a logical model or null if no logical model with the specified name exists.

getLogicalModel

public XLogicalModel getLogicalModel(String name,
                                     Principal user)
Get the runtime mode logical model with the specified name.

Parameters:
name - the name of the logical model.
Returns:
a logical model or null if no logical model with the specified name exists.

getLogicalModel

public XLogicalModel getLogicalModel(String name,
                                     Principal user,
                                     boolean hideAttributes)
Get the runtime mode logical model with the specified name.

Parameters:
name - the name of the logical model.
hideAttributes - hide invisible entities and attributes or not.
Returns:
a logical model or null if no logical model with the specified name exists.

getLogicalModelNames

public Enumeration getLogicalModelNames()
Get the names of all logical models in this data model.

Returns:
an Enumeration containing the names of the logical models.

getLogicalModelCount

public int getLogicalModelCount()
Get the number of logical models in this data model.

Returns:
the number of logical models in this data model.

removeLogicalModel

public void removeLogicalModel(String name)
Remove a logical model from this data model.

Parameters:
name - the name of the logical model to remove.

addVirtualPrivateModel

public void addVirtualPrivateModel(VirtualPrivateModel model)
Add a virtual private model to this data model.

Parameters:
model - the virtual private model.

containsVirtualPrivateModel

public boolean containsVirtualPrivateModel(VirtualPrivateModel model)
Check if contains a virtual private model in this data model.

Parameters:
model - the speified virtual private model.
Returns:
true if contains the virtual private model, false otherwise.

getVirtualPrivateModelNames

public String[] getVirtualPrivateModelNames()
Get the names of all virtual private model in this data model.


getVirtualPrivateModel

public VirtualPrivateModel getVirtualPrivateModel(String name)
Get the virtual private model with the specified private name.

Parameters:
name - the private name of the virtual private model.
Returns:
a VirtualPrivateModel or null if no virtual private model with the specified name exists.

getVirtualPrivateModels

public Enumeration getVirtualPrivateModels()
Deprecated. 

Get all the virtual private models.

Returns:
all the virtual private models.

removeVirtualPrivateModel

public void removeVirtualPrivateModel(String name)
Remove a virtual private model from this data model.

Parameters:
name - the name of the virtual private model to remove.

removeVirtualPrivateModel

public void removeVirtualPrivateModel(VirtualPrivateModel model)
Remove a virtual private model from this data model.

Parameters:
model - the virtual private model to remove.

removeVirtualPrivateModels

public void removeVirtualPrivateModels()
Remove all the virtual private models from this data model.


addPartition

public void addPartition(XPartition partition)
Add a partition to this model.

Parameters:
partition - the partition to add.

getPartitionNames

public String[] getPartitionNames()
Get the names of all partition in this data model.


getPartition

public XPartition getPartition(String name)
Get the partition with the specified name.

Parameters:
name - the name of the partition.
Returns:
the partition or null if no partitions exist with the specified name.

getPartition

public XPartition getPartition(String name,
                               Principal user)
Get the partition with the specified name.

Parameters:
name - the name of the partition.
Returns:
the partition or null if no partitions exist with the specified name.

getPartitions

public Enumeration getPartitions()
Deprecated. 

Get a list of all partitions contained in this data model.

Returns:
an Enumeration containing all the partitions in this data model.

getPartitionCount

public int getPartitionCount()
Get the number of partitions in this data model.

Returns:
the number of partitions in this data model.

removePartition

public void removePartition(String name)
Remove a partition from this data model.

Parameters:
name - the name of the partition to remove.

renamePartition

public void renamePartition(String oldName,
                            String newName)
Rename a partition in this data model.

Parameters:
oldName - the old name of the partition.
newName - the new name of the partition.

containsTable

public boolean containsTable(String table)
Check if a table is contained in the data model, will iterate the data model's partitions to get result.

Parameters:
table - the specified table.
Returns:
true if it is, false otherwise.

validate

public void validate()
Validate the data model.


writeStart

public void writeStart(PrintWriter writer)
Specified by:
writeStart in interface inetsoft.util.xml.XMLStorage.XMLFragment

writeEnd

public void writeEnd(PrintWriter writer)
Specified by:
writeEnd in interface inetsoft.util.xml.XMLStorage.XMLFragment

writeXML

public void writeXML(PrintWriter writer)
Write an XML element representation of this object.

Specified by:
writeXML in interface XDomain
Parameters:
writer - the output stream to which to write the XML data.

parseXML

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

Specified by:
parseXML in interface XDomain
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 XDomain
Overrides:
clone in class Object
Returns:
a copy of this object.

clearCache

public void clearCache()
Clears all cached cube result sets for this data model.

Specified by:
clearCache in interface XDomain

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