org.fcrepo.client.objecteditor.types
Class MethodDefinition

java.lang.Object
  extended by org.fcrepo.client.objecteditor.types.MethodDefinition

public class MethodDefinition
extends Object

Defines a method that an object exposes via Fedora. A service definition object specifies this.


Constructor Summary
MethodDefinition(String name, String label, List parameterDefinitions)
          Initialize a MethodDefinition object with all values.
 
Method Summary
 String getLabel()
          Get a short description of the method.
 String getName()
          Get the name of the method.
 List parameterDefinitions()
          Get the method's list of ParameterDefinitions.
static List parse(InputStream xml)
          Parse a stream of XML and return the list of method definitions defined therein.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodDefinition

public MethodDefinition(String name,
                        String label,
                        List parameterDefinitions)
Initialize a MethodDefinition object with all values.

Method Detail

parse

public static List parse(InputStream xml)
                  throws IOException
Parse a stream of XML and return the list of method definitions defined therein. The parsing is very relaxed. The xml may, but needn't be namespace-qualified, and will only be validated according to the rules implied below in parentheses.
 <Method operationName="METHOD_NAME" 
                 label="METHOD_LABEL"(0-1)>
     <UserInputParm parmName="PARAMETER_NAME" 
                       label="PARAMETER_LABEL"(0-1)
                    required="IS_REQUIRED"
                defaultValue="DEFAULT_VALUE">
         <ValidParmValues>(0-1)
             <ValidParm value="VALID_VALUE_1"/>(0-)
         </ValidParmValues>
     </UserInputParm>(0-) 
 </Method>
 

Throws:
IOException

getName

public String getName()
Get the name of the method.


getLabel

public String getLabel()
Get a short description of the method. This may be null.


parameterDefinitions

public List parameterDefinitions()
Get the method's list of ParameterDefinitions. If the method takes no parameters, this will be an empty list.



Copyright © 2012 DuraSpace. All Rights Reserved.