Commit 7a085385 authored by Dominique Marcadet's avatar Dominique Marcadet

signal not implemented validation

parent 1047212f
......@@ -55,7 +55,7 @@ public class AnyLNValidator {
}
public void generateValidators( HashMap< String, DataObject > doMap, HashMap< String, DOIValidator > cdcMap, AnyLNClass lnClass ) {
private void generateValidators( HashMap< String, DataObject > doMap, HashMap< String, DOIValidator > cdcMap, AnyLNClass lnClass ) {
for( DataObject dObj : lnClass.getDataObject() ) {
doMap.put( dObj.getName(), dObj );
if( dObj.getRefersToCDC() != null ) {
......@@ -110,7 +110,7 @@ public class AnyLNValidator {
return res;
}
public boolean checkCompulsory( AnyLN ln, DataObject dataObject, HashSet< String > checkedDO, DiagnosticChain diagnostics ) {
private boolean checkCompulsory( AnyLN ln, DataObject dataObject, HashSet< String > checkedDO, DiagnosticChain diagnostics ) {
switch( dataObject.getPresCond() ) {
case "M":
if( ! checkedDO.contains( dataObject.getName() ) ) {
......@@ -122,11 +122,15 @@ public class AnyLNValidator {
new Object[] { ln } ));
return false;
}
break;
default:
AbstractRiseClipseConsole.getConsole().info( "NOT IMPLEMENTED: AnyLNValidator.checkCompulsory( " + dataObject.getPresCond() + " )" );
break;
}
return true;
}
public boolean updateCompulsory( DOI doi, HashSet< String > checkedDO, DiagnosticChain diagnostics ) {
private boolean updateCompulsory( DOI doi, HashSet< String > checkedDO, DiagnosticChain diagnostics ) {
switch( doMap.get( doi.getName() ).getPresCond() ) {
case "M":
case "O":
......@@ -149,11 +153,14 @@ public class AnyLNValidator {
"DO " + doi + " is forbidden in LN at line " + doi.getParentAnyLN().getLineNumber(),
new Object[] { doi } ));
return false;
default:
AbstractRiseClipseConsole.getConsole().info( "NOT IMPLEMENTED: AnyLNValidator.updateCompulsory( " + doMap.get( doi.getName() ).getPresCond() + " )" );
break;
}
return true;
}
public boolean validateDOI( DOI doi, DiagnosticChain diagnostics ) {
private boolean validateDOI( DOI doi, DiagnosticChain diagnostics ) {
AbstractRiseClipseConsole.getConsole().verbose( "found DO " + doi.getName() + " in LNClass " + lnClass );
......
......@@ -102,6 +102,10 @@ public class DOIValidator {
new Object[] { da } ));
return false;
}
break;
default:
AbstractRiseClipseConsole.getConsole().info( "NOT IMPLEMENTED: DOIValidator.checkCompulsory( " + da.getPresCond() + " )" );
break;
}
return true;
}
......@@ -131,6 +135,9 @@ public class DOIValidator {
"DAI " + dai.getName() + " (line " + dai.getLineNumber() + ") is forbidden",
new Object[] { dai } ));
return false;
default:
AbstractRiseClipseConsole.getConsole().info( "NOT IMPLEMENTED: DOIValidator.updateCompulsory( " + daMap.get( dai.getName() ).getPresCond() + " )" );
break;
}
return true;
}
......@@ -247,6 +254,7 @@ public class DOIValidator {
}
}
@SuppressWarnings( "unused" )
private void testValidateVal() {
log( "\n--\tSTART TEST\t--\n" );
assertTrue( validateVal( "0", "BOOLEAN" ) );
......
......@@ -89,7 +89,7 @@ public class NsdEObjectValidator implements EValidator {
return true;
}
public boolean validateLN( AnyLN ln, DiagnosticChain diagnostics ) {
private boolean validateLN( AnyLN ln, DiagnosticChain diagnostics ) {
AbstractRiseClipseConsole.getConsole().verbose( "" );
AbstractRiseClipseConsole.getConsole().verbose( "NsdEObjectValidator.validateLN( " + ln.getLnClass() + " )" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment