Class CustomForm

java.lang.Object
it.uniroma2.art.semanticturkey.customform.CustomForm
Direct Known Subclasses:
CustomFormGraph, CustomFormNode

public abstract class CustomForm extends Object
  • Field Details

    • PREFIX

      public static String PREFIX
  • Method Details

    • getId

      public String getId()
      Returns the ID of the CustomForm
      Returns:
    • setId

      public void setId(String id)
    • getName

      public String getName()
      Returns the name of the CustomForm
      Returns:
    • setName

      public void setName(String name)
    • getDescription

      public String getDescription()
      Returns a verbose description about the CustomForm
      Returns:
    • setDescription

      public void setDescription(String description)
    • getRef

      public String getRef()
      Returns the ref of the CustomForm. It could be a CODA rule if the type of the CustomForm is graph, or a CODA converter if the type is node.
      Returns:
    • setRef

      public void setRef(String ref)
    • getType

      public String getType()
    • isTypeNode

      public boolean isTypeNode()
      Returns true if the type of the CustomForm is "node", false otherwise
      Returns:
    • asCustomFormNode

      public CustomFormNode asCustomFormNode()
    • isTypeGraph

      public boolean isTypeGraph()
      Returns true if the type of the CustomForm is "graph", false otherwise
      Returns:
    • asCustomFormGraph

      public CustomFormGraph asCustomFormGraph()
    • getLevel

      public CustomFormLevel getLevel()
    • setLevel

      public void setLevel(CustomFormLevel level)
    • getForm

      public abstract Collection<UserPromptStruct> getForm(it.uniroma2.art.coda.core.CODACore codaCore) throws it.uniroma2.art.coda.exception.parserexception.PRParserException, it.uniroma2.art.coda.exception.RDFModelNotSetException
      Parse the CODA rule contained in the ref tag and build a map of &ltuserPrompt, type&gt pairs, where userPrompt is a field of the userPrompt/ feature path and type is the converter used for that feature.
      Parameters:
      codaCore - an instance of CODACore already initialized
      Returns:
      Throws:
      it.uniroma2.art.coda.exception.parserexception.PRParserException
      it.uniroma2.art.coda.exception.RDFModelNotSetException
    • save

      public void save(File file)
      Serialize the CustomForm as xml on the given file.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object