PatternRule.java
818 Bytes
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xmp.schema.model.rules;
import com.adobe.xmp.schema.model.SchemaVisitor;
import com.adobe.xmp.schema.model.TypeRule;
import com.adobe.xmp.schema.model.XMPSchemaException;
import java.util.regex.Pattern;
public class PatternRule
implements TypeRule {
private static final long serialVersionUID = 1;
private String patternStr;
private Pattern pattern;
public PatternRule(String regexp) {
this.patternStr = regexp;
this.pattern = Pattern.compile(regexp);
}
public Pattern getPattern() {
return this.pattern;
}
public String getPatternStr() {
return this.patternStr;
}
public void accept(SchemaVisitor schemaVisitor) throws XMPSchemaException {
schemaVisitor.visit(this);
}
}