public class BasicRelation extends java.lang.Object implements Relation
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<java.lang.String,java.lang.Class<?>> |
classIndex |
int |
index |
(package private) static org.slf4j.Logger |
logger |
protected java.lang.String |
prettyLabel
The pretty relation attached to the relation type
This is overriden as static in subclasses
|
protected java.lang.String |
relation
The initial relation given by the user (through parser for instance)
This is never used in subclass relations (because they share one relation)
|
Constructor and Description |
---|
BasicRelation()
Creation
|
BasicRelation(java.lang.String rel) |
Modifier and Type | Method and Description |
---|---|
void |
accept(AlignmentVisitor visitor) |
void |
accept(TypeCheckingVisitor visitor) |
Relation |
compose(Relation r)
By default...
|
static BasicRelation |
createRelation(java.lang.String rel)
The constructor to use
|
void |
dump(org.xml.sax.ContentHandler h)
Housekeeping
|
boolean |
equals(java.lang.Object o)
Are the two relations equal
|
boolean |
equals(Relation r) |
(package private) static java.lang.Class<?> |
getClass(java.lang.String label) |
java.lang.String |
getClassName()
The name to use if no other information is available
|
java.lang.String |
getPrettyLabel() |
java.lang.String |
getRelation()
printable format
|
int |
hashCode() |
Relation |
inverse()
By default the inverse is the relation itself
|
BasicRelation |
join(Relation... rels)
By default...
|
BasicRelation |
meet(Relation... rels)
By default...
|
void |
write(java.io.PrintWriter writer)
This is kept for displayig more correctly the result
|
static final org.slf4j.Logger logger
private static java.util.Map<java.lang.String,java.lang.Class<?>> classIndex
protected java.lang.String relation
public int index
protected java.lang.String prettyLabel
public BasicRelation()
public BasicRelation(java.lang.String rel)
static java.lang.Class<?> getClass(java.lang.String label)
public void accept(TypeCheckingVisitor visitor) throws AlignmentException
AlignmentException
public void accept(AlignmentVisitor visitor) throws AlignmentException
accept
in interface Visitable
AlignmentException
public java.lang.String getRelation()
getRelation
in interface Relation
public java.lang.String getPrettyLabel()
public java.lang.String getClassName()
public static BasicRelation createRelation(java.lang.String rel) throws AlignmentException
rel:
- the string representation of the relationAlignmentException
- if something goes wrong (e.g., rel cannot be interpreted)public Relation inverse()
public BasicRelation meet(Relation... rels)
rels:
- a set of relations to meet with this onepublic BasicRelation join(Relation... rels)
rels:
- a set of relations to join with this onepublic void dump(org.xml.sax.ContentHandler h)
public void write(java.io.PrintWriter writer)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o:
- an object with which to compare this onepublic int hashCode()
hashCode
in class java.lang.Object
(C) INRIA & friends, 2003-2020