Class CustomFormsConfig

java.lang.Object
it.uniroma2.art.semanticturkey.customform.CustomFormsConfig

public class CustomFormsConfig extends Object
Collection of FormsMapping. This class represent a model in memory of customFormsConfig.xml
Author:
Tiziano
  • Field Details

  • Constructor Details

    • CustomFormsConfig

      public CustomFormsConfig(Collection<FormsMapping> mappings)
    • CustomFormsConfig

      public CustomFormsConfig()
  • Method Details

    • getFormsMapping

      public FormsMapping getFormsMapping(org.eclipse.rdf4j.model.IRI resource)
      Returns the FormCollectionMapping of the given resource
      Parameters:
      resource -
      Returns:
    • getFormsMappings

      public Collection<FormsMapping> getFormsMappings()
    • getFormCollectionForResource

      public FormCollection getFormCollectionForResource(org.eclipse.rdf4j.model.IRI resource)
      Given a resource returns the FormCollection associated to that resource. null if no FormCollection is specified for it.
      Parameters:
      resource -
      Returns:
    • addFormsMapping

      public void addFormsMapping(FormsMapping formMapping)
      Adds a FormsMapping to the configuration
      Parameters:
      formMapping -
    • removeMappingOfResource

      public void removeMappingOfResource(org.eclipse.rdf4j.model.IRI resource)
      Remove a FormsMapping from the configuration
      Parameters:
      resource -
    • removeMappingOfFormCollection

      public void removeMappingOfFormCollection(FormCollection formColl)
      Remove resource-FormCollection pair with the given FormCollection ID
      Parameters:
      formColl -
    • getReplace

      public boolean getReplace(org.eclipse.rdf4j.model.IRI resource)
      Tells if the CustomForm should replace the "classic" form for the given resource.
      Parameters:
      resource -
      Returns:
    • save

      public void save(File file)
      Serialize the CustomFormsConfig on a xml file.