Alignment API and Server 4.2.${version.update}

fr.inrialpes.exmo.align.impl
Class BasicRelation

java.lang.Object
  extended by fr.inrialpes.exmo.align.impl.BasicRelation
All Implemented Interfaces:
Relation, Visitable
Direct Known Subclasses:
EquivRelation, HasInstanceRelation, IncompatRelation, InstanceOfRelation, NonTransitiveImplicationRelation, SubsumedRelation, SubsumeRelation

public class BasicRelation
extends Object
implements Relation

Represents an ontology alignment relation.

Version:
$Id: BasicRelation.java 1566 2011-04-20 07:12:36Z euzenat $
Author:
Jérôme Euzenat

Field Summary
private static Map<String,Class<?>> classIndex
           
protected  String prettyLabel
          The pretty relation attached to the relation type This is overriden as static in subclasses
protected  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 Summary
BasicRelation(String rel)
          Creation
 
Method Summary
 void accept(AlignmentVisitor visitor)
           
 void accept(TypeCheckingVisitor visitor)
           
 Relation compose(Relation r)
          By default...
static Relation createRelation(String rel)
          The constructor to use
 void dump(ContentHandler h)
          Housekeeping
 boolean equals(Relation r)
          Are the two relations equal
(package private) static Class<?> getClass(String label)
           
 String getClassName()
          The name to use if no other information is available
 String getPrettyLabel()
           
 String getRelation()
          printable format
 int hashCode()
           
 Relation inverse()
          By default the inverse is the relation itself
 void write(PrintWriter writer)
          This is kept for displayig more correctly the result
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classIndex

private static Map<String,Class<?>> classIndex

relation

protected 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)


prettyLabel

protected String prettyLabel
The pretty relation attached to the relation type This is overriden as static in subclasses

Constructor Detail

BasicRelation

public BasicRelation(String rel)
Creation

Method Detail

getClass

static Class<?> getClass(String label)

accept

public void accept(TypeCheckingVisitor visitor)
            throws AlignmentException
Throws:
AlignmentException

accept

public void accept(AlignmentVisitor visitor)
            throws AlignmentException
Specified by:
accept in interface Visitable
Throws:
AlignmentException

getRelation

public String getRelation()
printable format

Specified by:
getRelation in interface Relation

getPrettyLabel

public String getPrettyLabel()

getClassName

public String getClassName()
The name to use if no other information is available


createRelation

public static Relation createRelation(String rel)
The constructor to use


inverse

public Relation inverse()
By default the inverse is the relation itself

Specified by:
inverse in interface Relation

compose

public Relation compose(Relation r)
By default... no composition possible

Specified by:
compose in interface Relation

equals

public boolean equals(Relation r)
Are the two relations equal

Specified by:
equals in interface Relation

hashCode

public int hashCode()
Overrides:
hashCode in class Object

dump

public void dump(ContentHandler h)
Housekeeping

Specified by:
dump in interface Relation

write

public void write(PrintWriter writer)
This is kept for displayig more correctly the result

Specified by:
write in interface Relation

Alignment API and Server 4.2.${version.update}

(C) INRIA & friends, 2003-${curryear}