Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## es.upm.gib.mappingAPI2
Class Triple

    java.lang.Object
      es.upm.gib.mappingAPI2.Triple

All Implemented Interfaces:
  java.io.Serializable

    public class Triple

extends java.lang.Object
implements java.io.Serializable

This class is represented by three strings: - Origin of the triple - Destination of the triple - Relation between origin and destination

See Also:
  Serialized Form

Constructor Summary
`Triple(java.lang.String origin, java.lang.String relation, java.lang.String destination)` creates a new Triple Object.

Method Summary
`boolean` | `equals(java.lang.Object triple)` the method compares two Triple objects.
`java.lang.String` | `getDestination()` the method is used to obtain the destination instance variable of a Triple.
`java.lang.String` | `getOrigin()` the method is used to obtain the origin instance variable of a Triple.
`java.lang.String` | `getRelation()` the method is used to obtain the relation instance variable of a Triple.
`java.lang.String` | `toString()` Gives a String representation of this triple

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Triple

    public Triple(java.lang.String origin,
                  java.lang.String relation,
                  java.lang.String destination)

  creates a new Triple Object. In the MappingEditor context a Triple represents a graph composed by an origin node and a destination node and an arc representing a relation between the nodes.

  Parameters:
    `origin` - the origin node in the Triple
    `relation` - the relation arc in the Triple
    `destination` - the destination node in the Triple

Method Detail

### getOrigin

    public java.lang.String getOrigin()

  the method is used to obtain the origin instance variable of a Triple.

  Returns:
    the origin class of the Triple

### getRelation

    public java.lang.String getRelation()

  the method is used to obtain the relation instance variable of a Triple.

  Returns:
    the relation of the Triple

### getDestination

    public java.lang.String getDestination()

  the method is used to obtain the destination instance variable of a Triple.

  Returns:
    the destination class of the Triple

### toString

    public java.lang.String toString()

  Gives a String representation of this triple

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    the string representation of a Triple object

### equals

    public boolean equals(java.lang.Object triple)

  the method compares two Triple objects. the method returns true only if the objects Triple have the same instance variable values

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `triple` - the object to compare
  Returns:
    the result of the comparation: true if they are equal, false otherwise. Two triples are equal when their three elements (origin, relation, destination) are equal to the other triple's three elements

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD