|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.ic.doc.automed.matching.SchemaElement
public class SchemaElement
The SchemaElement class to wrap schema objects in schema matching. The SchemaElement represents a schema object that can be used in the schema matching process. The SchemaElement is aware of the name of the schema object, its instances and the data type of its instances. A SchemaElement is "atomic" when it has unary tuples as instances, otherwise it is "non-atomic".
SchemaObject| Field Summary | |
|---|---|
static java.lang.Integer |
CHAR
|
static java.lang.Integer |
ELSE
|
static char[] |
features
|
static int |
MAX_CHARS
|
static java.lang.Integer |
NUM
|
static java.lang.Integer |
NUMCHAR
|
| Constructor Summary | |
|---|---|
SchemaElement(SchemaObject o,
boolean isAtomic)
Instantiates a schema element. |
|
| Method Summary | |
|---|---|
void |
addAttachedElement(SchemaElement se)
|
boolean |
containsInstance(java.lang.Object s)
Returns true if the SchemaElement object contains the specified instance. |
boolean |
equals(java.lang.Object o)
Compares this object against the specified object. |
SchemaElement[] |
getAttachedElements()
|
Averages |
getAverages()
|
int |
getDataType()
Returns the data type of the schema element. |
java.lang.Integer |
getDtPattern()
|
static SchemaElement |
getElement(SchemaObject o,
boolean isAtomic)
Returns a SchemaElement object. |
static SchemaElement |
getElement(java.lang.String hashCode,
boolean isAtomic)
Returns a SchemaElement object. |
protected static int |
getGenericDataType(java.lang.String type)
|
java.lang.String[] |
getInstances()
|
Instance[] |
getInstancesSorted()
Returns the sorted array of the instances of this SchemaElement object. |
Range |
getLengthRange()
|
java.lang.String |
getName()
Returns the name of the schema element. |
Range |
getNumCharRange()
|
int |
getNumOfDistinctInstances()
|
Range |
getNumRange()
|
java.lang.String |
getQuery()
|
java.lang.String |
getQueryVariables()
|
java.lang.String |
getRandomInstance()
Returns a random instance of the SchemaElement object. |
static SchemaElement[] |
getSchemaElements(Schema s,
int constructClass,
boolean atomic)
Returns an array of schema elements that belong to the schema. |
static SchemaElement[] |
getSchemaElements(Schema s,
SchemaObject[] sos,
int constructClass,
boolean atomic)
Returns an array of schema elements based on the schema objects' array. |
SchemaObject |
getSchemaObject()
Returns the SchemaObject wrapped by this SchemaElement object. |
int |
hashCode()
Returns a hash code for this SchemaElement object. |
boolean |
isAtomic()
Returns true if the schema element is "atomic", false otherwise. |
int |
numOfInstances()
Returns the number of distinct instances of this object. |
static void |
printElements()
|
void |
setDataType(int type)
Sets the data type of the schema element. |
protected void |
setFullPatterns()
|
void |
setInstances(java.util.ArrayList insts)
|
void |
setName(java.lang.String name)
Sets the name of the schema element. |
protected void |
setPatterns()
|
void |
setQuery(java.lang.String query)
|
void |
setQueryVariables(java.lang.String variables)
|
java.lang.String |
toString()
Returns a string representation of this SchemaElement object. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.Integer ELSE
public static final java.lang.Integer NUM
public static final java.lang.Integer NUMCHAR
public static final java.lang.Integer CHAR
public static final char[] features
public static int MAX_CHARS
| Constructor Detail |
|---|
public SchemaElement(SchemaObject o,
boolean isAtomic)
o - the schema object to be wrapped into a schema elementisAtomic - whether the create schema element is "atomic" or not. true
if the element is "atomic", false otherwise.| Method Detail |
|---|
public void setQuery(java.lang.String query)
public java.lang.String getQuery()
public void setQueryVariables(java.lang.String variables)
public java.lang.String getQueryVariables()
public java.lang.Integer getDtPattern()
protected void setFullPatterns()
throws UninstantiatedException
UninstantiatedException
protected void setPatterns()
throws UninstantiatedException
UninstantiatedExceptionpublic Averages getAverages()
public Range getLengthRange()
public Range getNumCharRange()
public Range getNumRange()
public boolean isAtomic()
true if the schema element is "atomic", false otherwise.
true if the schema element is "atomic", false otherwise.ipublic boolean equals(java.lang.Object o)
SchemaObject.equals(Object).
equals in class java.lang.Objecttrue if the objects are the same, false otherwise.public int hashCode()
SchemaElement object. This hash code is equivalent
to the hash code of the wrapped SchemaObject.
hashCode in class java.lang.ObjectSchemaElement object.public java.lang.String toString()
SchemaElement object. This string
representation comes from the string representation of the wrapper SchemaObject.
toString in class java.lang.ObjectSchemaElement object.public SchemaObject getSchemaObject()
SchemaObject wrapped by this SchemaElement object.
SchemaObject wrapped by this SchemaElement object.public void setName(java.lang.String name)
name - the name of the schema element.public java.lang.String getName()
public void setDataType(int type)
Types.
type - the type of the schema element.public int getDataType()
public java.lang.String getRandomInstance()
throws UninstantiatedException,
MatchException
SchemaElement object.
SchemaElement object.
UnistantiatedException - if the schema element doens't contain any instances.
UninstantiatedException
MatchException
public boolean containsInstance(java.lang.Object s)
throws MatchException
true if the SchemaElement object contains the specified instance.
true if the SchemaElement object contains the specified instance, false otherwise.
MatchException
public int numOfInstances()
throws MatchException
MatchExceptionpublic void setInstances(java.util.ArrayList insts)
public java.lang.String[] getInstances()
public int getNumOfDistinctInstances()
public void addAttachedElement(SchemaElement se)
public SchemaElement[] getAttachedElements()
public Instance[] getInstancesSorted()
throws MatchException
SchemaElement object.
The array is made up of Instance objects. The array is sorted based on
the number of appearances of each instance.
SchemaElement object.
MatchExceptionpublic static void printElements()
public static SchemaElement getElement(java.lang.String hashCode,
boolean isAtomic)
SchemaElement object. The returned object has the specified hashCode and it's either "atomic" or not, based on the isAtomic argument. Returns null if such an object doesn't exist.
hashCode - the hash code of the SchemaElement object.isAtomic - true if the returned SchemaElement object is "atomic", false otherwise.
SchemaElement object.
public static SchemaElement getElement(SchemaObject o,
boolean isAtomic)
SchemaElement object. The returned object wraps the specified SchemaObject and it's either "atomic" or not, based on the isAtomic argument.
o - the SchemaObject wrapped by the SchemaElementisAtomic - true if the returned SchemaElement object is "atomic", false otherwise.
SchemaElement object.
public static SchemaElement[] getSchemaElements(Schema s,
int constructClass,
boolean atomic)
throws IntegrityException,
java.lang.Exception
s - The schema which contains the schema objects that are going to be wrapped in schema elements.constructClass - The construct class of the schema objects that are going to be wrapped to schema elements.atomic - If true then the schema elements returned are going to be "atomic", otherwise "non-atomic".
constructClass
in schema s, a SchemaElement is constructed and returned.
IntegrityException - if the extensional schemas attached to s cannot be found
java.lang.Exception - if the GAVQueryReformulationProvider cannot be instantiated for s and its attached extensional schemas.
public static SchemaElement[] getSchemaElements(Schema s,
SchemaObject[] sos,
int constructClass,
boolean atomic)
throws IntegrityException,
java.lang.Exception
s - The schema that the schema objects in sos should be part of.sos - The array of schema objects.constructClass - The construct class of the schema objects that are going to be wrapped to schema elements.atomic - If true then the schema elements returned are going to be "atomic", otherwise "non-atomic".
constructClass in array sos a SchemaElement is returned.
IntegrityException - if the extensional schemas attached to s cannot be found
java.lang.Exception - if the GAVQueryReformulationProvider cannot be instantiated for s and its attached extensional schemas.
protected static int getGenericDataType(java.lang.String type)
throws InvalidElementException
InvalidElementException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||