All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.patternity.core.metamodel.LayeredOccurrence Maven / Gradle / Ivy

Go to download

Extensions of the RestFixture. An extension is a RestFixture with some specific/bespoke behaviour not generic enough to make it to the RestFixture itself.

There is a newer version: 3.1
Show newest version
package com.patternity.core.metamodel;

/**
 * Represents a pattern occurrence made of several layers (levels: DEEP,
 * SHALLOW, META)
 * 
 * @author cyrille martraire
 */
public class LayeredOccurrence {

	public final static int DEEP = 0;
	public final static int SHALLOW = 1;
	public final static int META = 2;

	private final Pattern pattern;
	private final PatternOccurrence deep;
	private final OccurrenceTemplate shallow;
	private final OccurrenceTemplate meta;

	public LayeredOccurrence(Pattern pattern) {
		this.pattern = pattern;

		deep = new PatternOccurrence(pattern);
		shallow = new OccurrenceTemplate(pattern);
		meta = new OccurrenceTemplate(pattern);

	}

	public Pattern getPattern() {
		return pattern;
	}

	public PatternOccurrence deepLayer() {
		return deep;
	}

	public OccurrenceTemplate shallowLayer() {
		return shallow;
	}

	public OccurrenceTemplate metaLayer() {
		return meta;
	}

	public String toString() {
		return "LayeredOccurrence";
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy