class DataExtractorConformant {

	public DataView extractConformantPart(BaseShapeMap shapeMap) {
		Graph graph = GlobalFactory.RDFFactory.createGraph();
		return extractConformantPart(shapeMap,graph);
	}

}

class DataExtractorConformantTest {

	protected ShapeMapParsing parser;
	protected ShExCParser shexParser;
	static IRI a;
	static IRI n1;
	static IRI n2;
	static IRI n3;
	static IRI john;
	static IRI smith;
	static IRI paul;
	static IRI eastwood;
	static IRI alien;
	static IRI first;
	static IRI last;
	static IRI human;
	static Triple n1_a_human;
	static Triple n1_first_john;
	static Triple n1_last_smith;
	static Triple n2_a_human;
	static Triple n2_first_paul;
	static Triple n2_last_east;
	static Triple n3_a_human;
	static Triple n3_first_alien;
	 Graph graph;

	@Test
	public void test2() {

		String schemaSt = "<http://inria.fr/Person> { a IRI; <http://a.b/last> IRI; }";
		String shMap = "{ FOCUS a <http://a.b/human> } @<http://inria.fr/Person>";

		try {
			ShexSchema schema = new ShexSchema(shexParser.getRules(new ByteArrayInputStream(schemaSt.getBytes())));
			BaseShapeMap shapeMap = parser.parse(new ByteArrayInputStream(shMap.getBytes()));

			DataExtractorConformant extractor = new DataExtractorConformant(schema,graph);
			
			Graph result = GlobalFactory.RDFFactory.createGraph();
			extractor.extractConformantPart(shapeMap, result);

			assertEquals(result.size(),4);
			assertTrue(result.contains(n1_a_human));
			assertTrue(result.contains(n1_last_smith));
			assertTrue(result.contains(n2_a_human));
			assertTrue(result.contains(n2_last_east));
		} catch ( Exception e) {
			fail("Exception during the parsing");
		}
	}

}