org.esupportail.portal.channels.CStockage.channelAction.injac.metadata.parse
Class RequiredMetaData

java.lang.Object
  extended byorg.esupportail.portal.channels.CStockage.channelAction.injac.metadata.parse.RequiredMetaData

public class RequiredMetaData
extends java.lang.Object

Id: RequiredMetaData.java,v 1.0 9 juil. 2004
Copyright (c) 2004 Esup Portail (www.esup-portail.org)
Classes: RequiredMetaData
Original Author: Yohan Colmant
This represents a required metadata on an injac document


Field Summary
private  java.lang.String choicelist
          The MD choice list
private  java.lang.String[] choiceListArray
          The choice list into an array
private  java.lang.String comment
          The comment
static java.lang.String DEFAULT_DATE_FORMAT
           
private  java.lang.String format
          The format used to check if the MD is good
private  java.lang.String input
          The MD input type
static java.lang.String INPUT_SELECT
           
static java.lang.String INPUT_TEXT
           
static java.lang.String INPUT_TEXTAREA
           
private  java.lang.String label
          The MD label
private  java.lang.String level
          The MD level: edition, publication
static java.lang.String LEVEL_EDITION
           
static java.lang.String LEVEL_PUBLICATION
           
private  boolean modifiable
          If the metadata if modifiable
private  java.lang.String name
          The MD name
private static java.lang.String REQUIRED_FALSE
           
private static java.lang.String REQUIRED_TRUE
           
private  java.lang.String requiredData
          The MD required value: yes, no
private  java.lang.String type
          The MD type
static java.lang.String TYPE_DATE
           
static java.lang.String TYPE_STRING
           
private  java.lang.String userChoice
          The userChoice
private  java.lang.String value
          The default value
 
Constructor Summary
RequiredMetaData()
          Default constructor
 
Method Summary
private  boolean answerIsInGoodFormat()
          Check if the user answer is in the good format
 java.lang.String[] getChoiceList()
          Return the choice list in a string array format
 java.lang.String getComment()
           
 java.lang.String getFormat()
           
 java.lang.String getInput()
           
 java.lang.String getLabel()
           
 java.lang.String getLevel()
           
 java.lang.String getName()
           
static RequiredMetaData getNewPublicationDateBeginMetatada()
          Get a default RequiredMetaData object for the "publication-date-begin" MD
static RequiredMetaData getNewPublicationDateEndMetatada()
          Get a default RequiredMetaData object for the "publication-date-end" MD
static RequiredMetaData getNewRejectCauseMetatada()
          Get a default RequiredMetaData object for the "reject-cause" MD
static RequiredMetaData getNewRootFileNameMetatada(ServerAccess access, java.lang.String path, java.lang.String name, boolean owner)
          Get the RequiredMetaData object for the "root-file-name" MD for the specified path
static RequiredMetaData getNewRootFileNameMetatada(java.lang.String name, boolean owner)
          Get the RequiredMetaData object for the "root-file-name" MD for the specified path
 java.lang.String getType()
           
 java.lang.String getUserChoice()
           
 java.lang.String getValue()
           
 boolean isModifiable()
           
 boolean isRequired()
           
 boolean isValid()
          Check if the user set is valid or not
 void setChoicelist(java.lang.String choicelist)
           
 void setComment(java.lang.String comment)
           
 void setFormat(java.lang.String format)
           
 void setInput(java.lang.String input)
           
 void setLabel(java.lang.String label)
           
 void setLevel(java.lang.String level)
           
 void setModifiable(boolean modifiable)
           
 void setName(java.lang.String name)
           
 void setRequiredData(boolean isRequired)
           
 void setRequiredData(java.lang.String requiredData)
           
 void setType(java.lang.String type)
           
 void setUserChoice(java.lang.String userChoice)
           
 void setValue(java.lang.String value)
           
 java.lang.String toString()
          Return a String representation of this RequiredMetaData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REQUIRED_TRUE

private static final java.lang.String REQUIRED_TRUE
See Also:
Constant Field Values

REQUIRED_FALSE

private static final java.lang.String REQUIRED_FALSE
See Also:
Constant Field Values

LEVEL_EDITION

public static final java.lang.String LEVEL_EDITION
See Also:
Constant Field Values

LEVEL_PUBLICATION

public static final java.lang.String LEVEL_PUBLICATION
See Also:
Constant Field Values

INPUT_TEXT

public static final java.lang.String INPUT_TEXT
See Also:
Constant Field Values

INPUT_TEXTAREA

public static final java.lang.String INPUT_TEXTAREA
See Also:
Constant Field Values

INPUT_SELECT

public static final java.lang.String INPUT_SELECT
See Also:
Constant Field Values

TYPE_STRING

public static final java.lang.String TYPE_STRING
See Also:
Constant Field Values

TYPE_DATE

public static final java.lang.String TYPE_DATE
See Also:
Constant Field Values

DEFAULT_DATE_FORMAT

public static final java.lang.String DEFAULT_DATE_FORMAT
See Also:
Constant Field Values

name

private java.lang.String name
The MD name


label

private java.lang.String label
The MD label


input

private java.lang.String input
The MD input type


type

private java.lang.String type
The MD type


choicelist

private java.lang.String choicelist
The MD choice list


choiceListArray

private java.lang.String[] choiceListArray
The choice list into an array


requiredData

private java.lang.String requiredData
The MD required value: yes, no


level

private java.lang.String level
The MD level: edition, publication


value

private java.lang.String value
The default value


comment

private java.lang.String comment
The comment


format

private java.lang.String format
The format used to check if the MD is good


userChoice

private java.lang.String userChoice
The userChoice


modifiable

private boolean modifiable
If the metadata if modifiable

Constructor Detail

RequiredMetaData

public RequiredMetaData()
Default constructor

Method Detail

isModifiable

public boolean isModifiable()
Returns:
Returns the modifiable.

setModifiable

public void setModifiable(boolean modifiable)
Parameters:
modifiable - The modifiable to set.

getUserChoice

public java.lang.String getUserChoice()
Returns:
Returns the userChoice.

setUserChoice

public void setUserChoice(java.lang.String userChoice)
Parameters:
userChoice - The userChoice to set.

isValid

public boolean isValid()
Check if the user set is valid or not

Returns:
true if valid, false else

answerIsInGoodFormat

private boolean answerIsInGoodFormat()
Check if the user answer is in the good format

Returns:
true if yes, false if no

getInput

public java.lang.String getInput()
Returns:
Returns the input.

getComment

public java.lang.String getComment()
Returns:
Returns the comment.

getValue

public java.lang.String getValue()
Returns:
Returns the defaultValue.

getFormat

public java.lang.String getFormat()
Returns:
Returns the format.

getLabel

public java.lang.String getLabel()
Returns:
Returns the label.

getLevel

public java.lang.String getLevel()
Returns:
Returns the level.

getName

public java.lang.String getName()
Returns:
Returns the name.

isRequired

public boolean isRequired()
Returns:
Returns the required.

getType

public java.lang.String getType()
Returns:
Returns the type.

getChoiceList

public java.lang.String[] getChoiceList()
Return the choice list in a string array format

Returns:
the choice list in a string array format

setChoicelist

public void setChoicelist(java.lang.String choicelist)
Parameters:
choicelist - The choicelist to set.

setComment

public void setComment(java.lang.String comment)
Parameters:
comment - The comment to set.

setValue

public void setValue(java.lang.String value)
Parameters:
value - The value to set.

setFormat

public void setFormat(java.lang.String format)
Parameters:
format - The format to set.

setLabel

public void setLabel(java.lang.String label)
Parameters:
label - The label to set.

setLevel

public void setLevel(java.lang.String level)
Parameters:
level - The level to set.

setName

public void setName(java.lang.String name)
Parameters:
name - The name to set.

setRequiredData

public void setRequiredData(java.lang.String requiredData)
Parameters:
requiredData - The required to set.

setRequiredData

public void setRequiredData(boolean isRequired)
Parameters:
isRequired - The isRequired to set.

setType

public void setType(java.lang.String type)
Parameters:
type - The type to set.

setInput

public void setInput(java.lang.String input)
Parameters:
input - The input to set.

getNewRejectCauseMetatada

public static RequiredMetaData getNewRejectCauseMetatada()
Get a default RequiredMetaData object for the "reject-cause" MD

Returns:
a default RequiredMetaData object for the "reject-cause" MD

getNewRootFileNameMetatada

public static RequiredMetaData getNewRootFileNameMetatada(ServerAccess access,
                                                          java.lang.String path,
                                                          java.lang.String name,
                                                          boolean owner)
                                                   throws NotExistsResourceException,
                                                          ApplicationException,
                                                          NotAuthorizedException
Get the RequiredMetaData object for the "root-file-name" MD for the specified path

Returns:
the RequiredMetaData object for the "root-file-name" MD for the specified path
Throws:
NotExistsResourceException
ApplicationException
NotAuthorizedException

getNewRootFileNameMetatada

public static RequiredMetaData getNewRootFileNameMetatada(java.lang.String name,
                                                          boolean owner)
                                                   throws NotExistsResourceException,
                                                          ApplicationException,
                                                          NotAuthorizedException
Get the RequiredMetaData object for the "root-file-name" MD for the specified path

Returns:
the RequiredMetaData object for the "root-file-name" MD for the specified path
Throws:
NotExistsResourceException
ApplicationException
NotAuthorizedException

getNewPublicationDateBeginMetatada

public static RequiredMetaData getNewPublicationDateBeginMetatada()
Get a default RequiredMetaData object for the "publication-date-begin" MD

Returns:
a default RequiredMetaData object for the "publication-date-begin" MD

getNewPublicationDateEndMetatada

public static RequiredMetaData getNewPublicationDateEndMetatada()
Get a default RequiredMetaData object for the "publication-date-end" MD

Returns:
a default RequiredMetaData object for the "publication-date-end" MD

toString

public java.lang.String toString()
Return a String representation of this RequiredMetaData

Returns:
a String representation of this RequiredMetaData