|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.intermine.metadata.FieldDescriptor
public abstract class FieldDescriptor
Abstract representation of a field within a class - could be an attribute, an object reference or a collection.
| Field Summary | |
|---|---|
protected ClassDescriptor |
cld
|
static int |
M_N_RELATION
A M:N relationship. |
static int |
N_ONE_RELATION
A N:1 relationship. |
protected java.lang.String |
name
|
static int |
NOT_RELATION
Not a relationship between objects |
static int |
ONE_N_RELATION
A 1:N relationship. |
static int |
ONE_ONE_RELATION
A 1:1 relationship |
| Constructor Summary | |
|---|---|
FieldDescriptor(java.lang.String name)
Construct, name of field must not be null and must be a valid Java variable name. |
|
| Method Summary | |
|---|---|
ClassDescriptor |
getClassDescriptor()
Get the ClassDescriptor for this field's class. |
java.lang.String |
getName()
Get the name of the described field. |
boolean |
isAttribute()
Is this FieldDescriptor an attribute? |
boolean |
isCollection()
Is this FieldDescriptor a collection? |
boolean |
isReference()
Is this FieldDescriptor a reference? |
abstract int |
relationType()
Return an integer describing the type of relationship this field represents, where relationship types are 1:1, 1:N, N:1, M:N and "not a relationship". |
protected void |
setClassDescriptor(ClassDescriptor cld)
Set the parent ClassDescriptor - should be called when this is added to a ClassDescriptor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NOT_RELATION
public static final int ONE_ONE_RELATION
public static final int ONE_N_RELATION
public static final int N_ONE_RELATION
public static final int M_N_RELATION
protected final java.lang.String name
protected ClassDescriptor cld
| Constructor Detail |
|---|
public FieldDescriptor(java.lang.String name)
name - name of field in class
java.lang.IllegalArgumentException - if name argument is null| Method Detail |
|---|
public ClassDescriptor getClassDescriptor()
public java.lang.String getName()
protected void setClassDescriptor(ClassDescriptor cld)
cld - the parent ClassDescriptor
java.lang.IllegalStateException - if the parent ClassDescriptor is not setpublic abstract int relationType()
public boolean isAttribute()
public boolean isReference()
public boolean isCollection()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||