Interface AttributeRestriction
-
- All Known Implementing Classes:
AttributeDataTypeRestriction
,AttributeValueSetTypeRestriction
public interface AttributeRestriction
Superclass for all attribute type restrictions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
doesAttributeMatch(TranslationCache cache, Attribute attribute)
Checks whether the given Attribute fulfills the restrictions imposed by this instance.String
getPredicateForRestriction(String attributeVariable)
Return a prolog goal which represents this exact restriction in Prolog code.
-
-
-
Method Detail
-
doesAttributeMatch
boolean doesAttributeMatch(TranslationCache cache, Attribute attribute)
Checks whether the given Attribute fulfills the restrictions imposed by this instance. The blackboard is used as cache.- Parameters:
cache
- The TranslatioCache to use for speeding up reoccuring lookupsattribute
- The attribute to check for a match
-
getPredicateForRestriction
String getPredicateForRestriction(String attributeVariable)
Return a prolog goal which represents this exact restriction in Prolog code. For example given the attributeVariable 'A' and teh restriction that this attribute needs to have the type 'mytype', the return code would be 'attributeDataType(A,'mytype')'.- Parameters:
attributeVariable
- The Prolog variable which is used to match the restrictions
-
-