org.gcube.data.trees.patterns
Class EdgePattern

java.lang.Object
  extended by org.gcube.data.trees.patterns.EdgePattern
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AtLeastPattern, ManyPattern, OnePattern, OnlyPattern, OptPattern

public abstract class EdgePattern
extends Object
implements Serializable

A Pattern over the Edges of a Node.

Author:
Fabio Simeoni
See Also:
Serialized Form

Nested Class Summary
static class EdgePattern.Range
          The minimum and maximum number of Edges that may match a given EdgePattern.
 
Method Summary
 boolean equals(Object obj)
           
 int hashCode()
           
 boolean isCondition()
          Indicates whether the pattern is to be processed as a condition.
 QName label()
          Returns the label.
protected  List<Edge> matchLabels(List<Edge> edges)
           
abstract  String name()
          Returns the name of the pattern.
 Pattern pattern()
          Returns the target pattern.
abstract  EdgePattern.Range range()
          Returns the EdgePattern.Range of the pattern.
 void setAsCondition()
          Marks the pattern as a condition.
 void setPattern(Pattern p)
          Sets the target pattern.
 String toString()
          
 void unsetAsCondition()
          Unmarks the pattern as a condition.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

setAsCondition

public void setAsCondition()
Marks the pattern as a condition.


unsetAsCondition

public void unsetAsCondition()
Unmarks the pattern as a condition.


isCondition

public boolean isCondition()
Indicates whether the pattern is to be processed as a condition.

Returns:
true if it is, false otherwise.

pattern

public Pattern pattern()
Returns the target pattern.

Returns:
the pattern.

setPattern

public void setPattern(Pattern p)
Sets the target pattern.

Parameters:
p - the pattern.

label

public QName label()
Returns the label.

Returns:
the label.

matchLabels

protected List<Edge> matchLabels(List<Edge> edges)

range

public abstract EdgePattern.Range range()
Returns the EdgePattern.Range of the pattern.

Returns:
the range.

name

public abstract String name()
Returns the name of the pattern.

Returns:
the name

toString

public String toString()

Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2013. All Rights Reserved.