Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get the start pattern of PatternSchema #273

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ public PatternSchema(SchemaPatternBuilder spb, Pattern start, PropertyMap proper
this.spb = spb;
this.start = start;
}

/**
* Returns the pattern start.
*
* @return the pattern start.
*/
public Pattern getStart() {
return start;
}

public Validator createValidator(PropertyMap properties) {
ErrorHandler eh = properties.get(ValidateProperty.ERROR_HANDLER);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package com.thaiopensource.validate;

import com.thaiopensource.util.PropertyMap;
import com.thaiopensource.validate.AbstractSchema;
import com.thaiopensource.validate.Schema;
import com.thaiopensource.validate.Validator;

public class CombineSchema extends AbstractSchema {
private final Schema schema1;
Expand All @@ -15,6 +12,14 @@ public CombineSchema(Schema schema1, Schema schema2, PropertyMap properties) {
this.schema2 = schema2;
}

public Schema getSchema1() {
return schema1;
}

public Schema getSchema2() {
return schema2;
}

public Validator createValidator(PropertyMap properties) {
return new CombineValidator(schema1.createValidator(properties),
schema2.createValidator(properties));
Expand Down