Class CustomFormXMLHelper
java.lang.Object
it.uniroma2.art.semanticturkey.customform.CustomFormXMLHelper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<CustomForm>
loadProjectCustomForms
(Project project, Collection<CustomForm> systemCustomForms, Collection<BrokenCFStructure> brokenCFS) Loads the CustomForm files stored in the given projectstatic Collection<FormCollection>
loadProjectFormCollections
(Project project, Collection<CustomForm> projectCustomForms, Collection<CustomForm> systemCustomForms, Collection<BrokenCFStructure> brokenCFS) Loads the FormCollection files stored in the given projectstatic Collection<FormsMapping>
loadProjectFormsMapping
(Project project, Collection<FormCollection> projectFormCollections, Collection<FormCollection> systemFormCollections, Collection<BrokenCFStructure> brokenCFS) static Collection<CustomForm>
loadSystemCustomForms
(Collection<BrokenCFStructure> brokenCFS) Loads the CustomForm files stored at system levelstatic Collection<FormCollection>
loadSystemFormCollections
(Collection<CustomForm> systemCustomForms, Collection<BrokenCFStructure> brokenCFS) Loads the FormCollection files stored at system levelstatic Collection<FormsMapping>
loadSysyemFormsMapping
(Collection<FormCollection> systemFormCollections, Collection<BrokenCFStructure> brokenCFS) static CustomForm
parseAndCreateCustomForm
(File cfFile) Given aCustomForm
file loads its contentstatic FormCollection
parseAndCreateFormCollection
(File fcFile, Collection<CustomForm> customForms, CustomFormLevel level, Collection<BrokenCFStructure> brokenCFS) Given aFormCollection
file loads its contentstatic Collection<FormsMapping>
parseAndCreateFormsMappingCollection
(File cfConfigFile, Collection<FormCollection> existingFormColls, CustomFormLevel level, Collection<BrokenCFStructure> brokenCFS) static void
serializeCustomForm
(CustomForm customForm, File file) static void
serializeCustomFormsConfig
(CustomFormsConfig config, File file) static void
serializeFormCollection
(FormCollection formCollection, File file)
-
Constructor Details
-
CustomFormXMLHelper
public CustomFormXMLHelper()
-
-
Method Details
-
loadSystemCustomForms
Loads the CustomForm files stored at system level- Returns:
-
loadSystemFormCollections
public static Collection<FormCollection> loadSystemFormCollections(Collection<CustomForm> systemCustomForms, Collection<BrokenCFStructure> brokenCFS) Loads the FormCollection files stored at system level- Returns:
-
loadSysyemFormsMapping
public static Collection<FormsMapping> loadSysyemFormsMapping(Collection<FormCollection> systemFormCollections, Collection<BrokenCFStructure> brokenCFS) throws CustomFormParseException - Throws:
CustomFormParseException
-
loadProjectCustomForms
public static Collection<CustomForm> loadProjectCustomForms(Project project, Collection<CustomForm> systemCustomForms, Collection<BrokenCFStructure> brokenCFS) Loads the CustomForm files stored in the given project- Parameters:
project
-systemCustomForms
-- Returns:
-
loadProjectFormCollections
public static Collection<FormCollection> loadProjectFormCollections(Project project, Collection<CustomForm> projectCustomForms, Collection<CustomForm> systemCustomForms, Collection<BrokenCFStructure> brokenCFS) Loads the FormCollection files stored in the given project- Parameters:
project
-projectCustomForms
-- Returns:
-
loadProjectFormsMapping
public static Collection<FormsMapping> loadProjectFormsMapping(Project project, Collection<FormCollection> projectFormCollections, Collection<FormCollection> systemFormCollections, Collection<BrokenCFStructure> brokenCFS) throws CustomFormParseException - Throws:
CustomFormParseException
-
parseAndCreateFormCollection
public static FormCollection parseAndCreateFormCollection(File fcFile, Collection<CustomForm> customForms, CustomFormLevel level, Collection<BrokenCFStructure> brokenCFS) throws CustomFormParseException Given aFormCollection
file loads its content- Parameters:
fcFile
-customForms
-- Returns:
- Throws:
CustomFormParseException
-
parseAndCreateCustomForm
Given aCustomForm
file loads its content- Parameters:
cfFile
-- Returns:
- Throws:
CustomFormParseException
-
parseAndCreateFormsMappingCollection
public static Collection<FormsMapping> parseAndCreateFormsMappingCollection(File cfConfigFile, Collection<FormCollection> existingFormColls, CustomFormLevel level, Collection<BrokenCFStructure> brokenCFS) throws CustomFormParseException - Parameters:
cfConfigFile
-existingFormColls
- Existing FormCollection, used to check the existence of FormCollection referenced in the configuration file.- Returns:
- Throws:
CustomFormParseException
-
serializeCustomFormsConfig
-
serializeFormCollection
-
serializeCustomForm
-