se.kmr.scam.editor.util
Class FormModel

java.lang.Object
  extended byse.kmr.scam.editor.util.FormModel

public class FormModel
extends Object

This object is a facde for a RDF-Form model.

Version:
$Revision: 1.28 $
Author:
Jöran
Created:
den 5 augusti 2002

Constructor Summary
FormModel(Model formModel)
          Constructor for the FormModel object
FormModel(String rdfXmlUri)
          Constructor for the formHelper object
 
Method Summary
 Collection getAllowedLanguages()
          Gets a collection of allowed languages for the multilingual nodes.
 NodeIterator getAltNodeIterator(Resource root)
          Gets the altNodeIterator attribute of the FormModel object
 Collection getDescriptions(Resource root)
          Gets a collection of description values for a given node.
 String getDisplayType(Resource root)
          Gets the identifier for the display type defined for a given root node.
 Collection getLabelValues(Resource root)
          Gets the labelValues attribute of the FormModel object
 int getMaxChars(Resource root)
          Gets the maxChars attribute of a root in the FormModel object
 Model getModel()
          Gets the model attribute of the FormModel object
 List getPredefinedValues(Resource root, boolean literalValue)
          Gets a collection of PredefinedObject associated to the root node.
 Resource getRoot()
          Gets the root attribute of the FormModel object
 String getValidationType(Resource root)
          Gets the identifier for a datatype validator defined for a given root node.
 Resource getVariable(Resource root)
          Gets the variable attribute of the FormModel object
 boolean isEditable(Resource root)
          Gets the editable attribute of the FormModel object
 boolean isMultiLingual(Resource root)
          Gets the multiLingual attribute of the FormModel object
 boolean isMultipleBindingsAllowed(Resource root)
          Gets the allowMultipleBindings attribute of the FormModel object
 boolean isOfTypeForm(Resource root)
          Gets the ofTypeForm attribute of the FormModel object
 boolean isOfTypeLabel(Resource root)
          Gets the ofTypeLabel attribute of the FormModel object
 boolean isOfTypePredefined(Resource root)
          Gets the ofTypePredefined attribute of the FormModel object
 boolean isOfTypeText(Resource root)
          Gets the ofTypeText attribute of the FormModel object
 boolean isRepeted(Resource root)
          Gets the repeted attribute of the FormModel object
 boolean isVisible(Resource root)
          Gets the visible attribute of the FormModel object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormModel

public FormModel(String rdfXmlUri)
          throws RDFException
Constructor for the formHelper object

Parameters:
rdfXmlUri - Description of the Parameter
Throws:
RDFException - Description of the Exception

FormModel

public FormModel(Model formModel)
          throws RDFException
Constructor for the FormModel object

Parameters:
formModel - Description of the Parameter
Throws:
RDFException - Description of the Exception
Method Detail

getModel

public Model getModel()
Gets the model attribute of the FormModel object

Returns:
The model value

getRoot

public Resource getRoot()
                 throws RDFException
Gets the root attribute of the FormModel object

Returns:
The root value
Throws:
RDFException - Description of the Exception

getVariable

public Resource getVariable(Resource root)
                     throws RDFException
Gets the variable attribute of the FormModel object

Parameters:
root - Description of the Parameter
Returns:
The variable value
Throws:
RDFException - Description of the Exception

getMaxChars

public int getMaxChars(Resource root)
                throws RDFException
Gets the maxChars attribute of a root in the FormModel object

Parameters:
root - The root
Returns:
The maxChars value
Throws:
RDFException - Thrown in case of exception in extracting the information

getDescriptions

public Collection getDescriptions(Resource root)
                           throws RDFException
Gets a collection of description values for a given node.
A description node can either be of type Literal or of type Resource. If the node is of type Literal will the collection only contain the node. A description node of type Resource has either a collection of references or represents it self a reference to description values.

Parameters:
root - Get description values associated to this node.
Returns:
A collection of RDFNodes representing description values.
Throws:
RDFException - Description of the Exception

getPredefinedValues

public List getPredefinedValues(Resource root,
                                boolean literalValue)
                         throws RDFException
Gets a collection of PredefinedObject associated to the root node.

Parameters:
root - Get values for this root
literalValue - tells wether literals are allowed as predefined values.
Returns:
A collection of PredefinedObject
Throws:
RDFException - thrown in case of exception while extracting data.

getValidationType

public String getValidationType(Resource root)
                         throws RDFException
Gets the identifier for a datatype validator defined for a given root node.

Parameters:
root - Get identifier defined for this root node
Returns:
The identifier, if such is defined, otherwise an empty string.
Throws:
RDFException - thrown in case of exception while extracting data.

getDisplayType

public String getDisplayType(Resource root)
                      throws RDFException
Gets the identifier for the display type defined for a given root node.

Parameters:
root - Get identifier defined for this root node
Returns:
The identifier, if such is defined, otherwise an empty string.
Throws:
RDFException - thrown in case of exception while extracting data.

getLabelValues

public Collection getLabelValues(Resource root)
                          throws RDFException
Gets the labelValues attribute of the FormModel object

Parameters:
root - Description of the Parameter
Returns:
The labelValues value
Throws:
RDFException - Description of the Exception

getAltNodeIterator

public NodeIterator getAltNodeIterator(Resource root)
                                throws RDFException
Gets the altNodeIterator attribute of the FormModel object

Parameters:
root - Description of the Parameter
Returns:
The altNodeIterator value
Throws:
RDFException - Description of the Exception

getAllowedLanguages

public Collection getAllowedLanguages()
Gets a collection of allowed languages for the multilingual nodes.

Returns:
A collection of lang codes.

isOfTypeForm

public boolean isOfTypeForm(Resource root)
                     throws RDFException
Gets the ofTypeForm attribute of the FormModel object

Parameters:
root - Description of the Parameter
Returns:
The ofTypeForm value
Throws:
RDFException - Description of the Exception

isOfTypeLabel

public boolean isOfTypeLabel(Resource root)
                      throws RDFException
Gets the ofTypeLabel attribute of the FormModel object

Parameters:
root - Description of the Parameter
Returns:
The ofTypeLabel value
Throws:
RDFException - Description of the Exception

isOfTypeText

public boolean isOfTypeText(Resource root)
                     throws RDFException
Gets the ofTypeText attribute of the FormModel object

Parameters:
root - Description of the Parameter
Returns:
The ofTypeText value
Throws:
RDFException - Description of the Exception

isOfTypePredefined

public boolean isOfTypePredefined(Resource root)
                           throws RDFException
Gets the ofTypePredefined attribute of the FormModel object

Parameters:
root - Description of the Parameter
Returns:
The ofTypePredefined value
Throws:
RDFException - Description of the Exception

isVisible

public boolean isVisible(Resource root)
                  throws RDFException
Gets the visible attribute of the FormModel object

Parameters:
root - Description of the Parameter
Returns:
The visible value
Throws:
RDFException - Description of the Exception

isEditable

public boolean isEditable(Resource root)
                   throws RDFException
Gets the editable attribute of the FormModel object

Parameters:
root - Description of the Parameter
Returns:
The editable value
Throws:
RDFException - Description of the Exception

isMultipleBindingsAllowed

public boolean isMultipleBindingsAllowed(Resource root)
                                  throws RDFException
Gets the allowMultipleBindings attribute of the FormModel object

Parameters:
root - Description of the Parameter
Returns:
The allowMultipleBindings value
Throws:
RDFException - Description of the Exception

isRepeted

public boolean isRepeted(Resource root)
                  throws RDFException
Gets the repeted attribute of the FormModel object

Parameters:
root - Description of the Parameter
Returns:
The repeted value
Throws:
RDFException - Description of the Exception

isMultiLingual

public boolean isMultiLingual(Resource root)
                       throws RDFException
Gets the multiLingual attribute of the FormModel object

Parameters:
root - Description of the Parameter
Returns:
The multiLingual value
Throws:
RDFException - Description of the Exception


Copyright © 2003 SCAM. All Rights Reserved.