test_class.file: vorto-importers/lwm2m/lwm2m-importer/src/test/java/org/eclipse/vorto/plugins/importer/example/lwm2m/LwM2MImporterTest.java
test_class.identifier: LwM2MImporterTest
test_case.body: @Test
    public void testValidation() {
  
      final String filename = "3328_1_1.xml";
      
      InputStream lwm2mXml = Thread.currentThread().getContextClassLoader().getResourceAsStream(filename);    
      
      LwM2MImporter importer = new LwM2MImporter();
      
      ValidationReport report = importer.validate(lwm2mXml);
      assertTrue(report.isValid());
      assertNotNull(report.getMessage());
    }
test_case.class_method_signature: LwM2MImporterTest.testValidation()
test_case.full_signature: @Test public void testValidation()
test_case.identifier: testValidation
test_case.invocations: getResourceAsStream getContextClassLoader currentThread validate assertTrue isValid assertNotNull getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testValidation()
focal_class.declarator: NAMESPACE = "com.ipso.smartobjects"
focal_class.modifier: private static final
focal_class.original_string: private static final String NAMESPACE = "com.ipso.smartobjects";
focal_class.type: String
focal_class.var_name: NAMESPACE
focal_class.declarator: VERSION = "1.1.0"
focal_class.modifier: private static final
focal_class.original_string: private static final String VERSION = "1.1.0";
focal_class.type: String
focal_class.var_name: VERSION
focal_class.declarator: FB_TEMPLATE = new FunctionblockTemplate()
focal_class.modifier: private static final
focal_class.original_string: private static final FunctionblockTemplate FB_TEMPLATE = new FunctionblockTemplate();
focal_class.type: FunctionblockTemplate
focal_class.var_name: FB_TEMPLATE
focal_class.declarator: MAPPING_TEMPLATE = new MappingTemplate()
focal_class.modifier: private static final
focal_class.original_string: private static final MappingTemplate MAPPING_TEMPLATE = new MappingTemplate();
focal_class.type: MappingTemplate
focal_class.var_name: MAPPING_TEMPLATE
focal_class.file: vorto-importers/lwm2m/lwm2m-importer/src/main/java/org/eclipse/vorto/plugins/importer/example/lwm2m/LwM2MImporter.java
focal_class.identifier: LwM2MImporter
focal_class.class_method_signature: LwM2MImporter.validate(InputStream fileInput)
focal_class.full_signature: public ValidationReport validate(InputStream fileInput)
focal_class.identifier: validate
focal_class.modifiers: public
focal_class.parameters: (InputStream fileInput)
focal_class.return: ValidationReport
focal_class.signature: ValidationReport validate(InputStream fileInput)
focal_class.class_method_signature: LwM2MImporter.parse(InputStream fileInput)
focal_class.full_signature: private LWM2M parse(InputStream fileInput)
focal_class.identifier: parse
focal_class.modifiers: private
focal_class.parameters: (InputStream fileInput)
focal_class.return: LWM2M
focal_class.signature: LWM2M parse(InputStream fileInput)
focal_class.class_method_signature: LwM2MImporter.convert(InputStream fileInput)
focal_class.full_signature: public byte[] convert(InputStream fileInput)
focal_class.identifier: convert
focal_class.modifiers: public
focal_class.parameters: (InputStream fileInput)
focal_class.return: byte[]
focal_class.signature: byte[] convert(InputStream fileInput)
focal_class.class_method_signature: LwM2MImporter.createModelId(Object obj)
focal_class.full_signature: private ModelId createModelId(Object obj)
focal_class.identifier: createModelId
focal_class.modifiers: private
focal_class.parameters: (Object obj)
focal_class.return: ModelId
focal_class.signature: ModelId createModelId(Object obj)
focal_class.class_method_signature: LwM2MImporter.parseId(String name)
focal_class.full_signature: private String parseId(String name)
focal_class.identifier: parseId
focal_class.modifiers: private
focal_class.parameters: (String name)
focal_class.return: String
focal_class.signature: String parseId(String name)
focal_method.body: public ValidationReport validate(InputStream fileInput) {
  		try {
  			LWM2M lwm2m = parse(fileInput);
  			if (lwm2m.getObject().isEmpty()) {
  				return ValidationReport.invalid("File does not contain any object definitions.");
  			} else {
  				return ValidationReport.valid("File is a valid LwM2M description");
  			}
  
  		} catch (Exception ex) {
  			return ValidationReport.invalid(ex.getMessage());
  		}
  	}
focal_method.class_method_signature: LwM2MImporter.validate(InputStream fileInput)
focal_method.full_signature: public ValidationReport validate(InputStream fileInput)
focal_method.identifier: validate
focal_method.invocations: parse isEmpty getObject invalid valid invalid getMessage
focal_method.modifiers: public
focal_method.parameters: (InputStream fileInput)
focal_method.return: ValidationReport
focal_method.signature: ValidationReport validate(InputStream fileInput)