int recognizeImport( String line ) {

		int result = P_CODE_NO;
		String[] parts = splitFromInlineComment( line );
		String realLine = parts[ 0 ].trim();

		String regex = ParsingConstants.KEYWORD_IMPORT + "\\s+([^;]*)";
		Matcher m = Pattern.compile( regex, Pattern.CASE_INSENSITIVE ).matcher( realLine );
		if( m.find()) {
			result = P_CODE_YES;
			BlockImport block = new BlockImport( this.definitionFile );
			block.setLine( this.currentLineNumber );
			block.setUri( m.group( 1 ).trim());
			block.setInlineComment( parts[ 1 ]);
			this.definitionFile.getBlocks().add( block );

			realLine = realLine.substring( m.end());
			if( ! realLine.startsWith( String.valueOf( SEMI_COLON )))
				addModelError( ErrorCode.P_IMPORT_ENDS_WITH_SEMI_COLON );
			else if( realLine.indexOf( SEMI_COLON ) < realLine.length() - 1 )
				addModelError( ErrorCode.P_ONE_BLOCK_PER_LINE );
		}

		return result;
	}
int recognizeImport ( String line ) { int result = P_CODE_NO ; String [ ] parts = splitFromInlineComment ( line ) ; String realLine = parts [ 0 ] . trim ( ) ; String regex = ParsingConstants . KEYWORD_IMPORT + "\\s+([^;]*)" ; Matcher m = Pattern . compile ( regex , Pattern . CASE_INSENSITIVE ) . matcher ( realLine ) ; if ( m . find ( ) ) { result = P_CODE_YES ; BlockImport block = new BlockImport ( this . definitionFile ) ; block . setLine ( this . currentLineNumber ) ; block . setUri ( m . group ( 1 ) . trim ( ) ) ; block . setInlineComment ( parts [ 1 ] ) ; this . definitionFile . getBlocks ( ) . add ( block ) ; realLine = realLine . substring ( m . end ( ) ) ; if ( ! realLine . startsWith ( String . valueOf ( SEMI_COLON ) ) ) addModelError ( ErrorCode . P_IMPORT_ENDS_WITH_SEMI_COLON ) ; else if ( realLine . indexOf ( SEMI_COLON ) < realLine . length ( ) - 1 ) addModelError ( ErrorCode . P_ONE_BLOCK_PER_LINE ) ; } return result ; }
@param line the raw line
@return one of the P_CODE constants from {@link FileDefinitionParser}