org.activemath.content.mediator.rewriter
Class Pattern
java.lang.Object
org.activemath.content.mediator.rewriter.Pattern
public class Pattern
- extends Object
|
Field Summary |
protected static boolean |
DEBUG
|
|
Constructor Summary |
Pattern(Set classRestrictions,
Set relationRestrictions,
Set propertyRestrictions)
|
DEBUG
protected static final boolean DEBUG
Pattern
public Pattern(Set classRestrictions,
Set relationRestrictions,
Set propertyRestrictions)
matches
public boolean matches(KBQuery kbQuery)
- Checks whether the pattern matches a KBQuery. This is the case,
if the queries classcontraints contains all
classes of the patterns class restriction _and_ the same with
relation- and property-constraints.
- Parameters:
kbQuery -
- Returns:
toString
public String toString()
- Overrides:
toString in class Object
toLatexString
public String toLatexString()
getClassRestrictions
public Set getClassRestrictions()
getPropertyRestrictions
public Set getPropertyRestrictions()
getRelationRestrictions
public Set getRelationRestrictions()
compare
public int compare(Pattern p)
- Compares this pattern with pattern p. If this is more
special than p, -1 is returned, 1 if not and 0 if both
are not compareable.
- Parameters:
p -
- Returns:
isMoreSpecialThan
public boolean isMoreSpecialThan(Pattern p)
isLessSpecialThan
public boolean isLessSpecialThan(Pattern p)
hasPlaceholderPropertyRestriction
public boolean hasPlaceholderPropertyRestriction()
setHasPlaceholderPropertyRestriction
public void setHasPlaceholderPropertyRestriction(boolean hasPlaceholderPropertyRestriction)
getPurePropertyRestrictions
public Set getPurePropertyRestrictions()
getPlaceholderPropertyRestriction
public ArrayList getPlaceholderPropertyRestriction()