FileDefinitionParser { int recognizeFacet( String line, BufferedReader br ) throws IOException { int result = P_CODE_NO; if( startsWith( line, ParsingConstants.KEYWORD_FACET )) { String newLine = line.replaceFirst( "(?i)\\s*" + Pattern.quote( ParsingConstants.KEYWORD_FACET ), "" ); result = recognizePropertiesHolder( newLine, br, new BlockFacet( this.definitionFile )); } return result; } FileDefinitionParser( File relationsFile, boolean ignoreComments ); FileDefinition read();  }
@Test public void testRecognizeFacet() throws Exception { Map<String,ParsingError> resourceNameToErrorCode = new LinkedHashMap<> (); resourceNameToErrorCode.put( "facet-invalid-property.graph", new ParsingError( ErrorCode.P_INVALID_PROPERTY, null, 2 )); resourceNameToErrorCode.put( "facet-invalid-end.graph", new ParsingError( ErrorCode.P_C_C_BRACKET_EXTRA_CHARACTERS, null, 3 )); resourceNameToErrorCode.put( "facet-missing-closing-cb.graph", new ParsingError( ErrorCode.P_C_C_BRACKET_MISSING, null, 3 )); resourceNameToErrorCode.put( "facet-missing-opening-cb.graph", new ParsingError( ErrorCode.P_O_C_BRACKET_MISSING, null, 1 )); resourceNameToErrorCode.put( "facet-extra-char.graph", new ParsingError( ErrorCode.P_O_C_BRACKET_EXTRA_CHARACTERS, null, 1 )); resourceNameToErrorCode.put( "facet-line-number.graph", new ParsingError( ErrorCode.P_C_C_BRACKET_MISSING, null, 6 )); testRecognizePropertiesHolder( resourceNameToErrorCode, AbstractBlock.FACET ); }