info.sswap.api.input.impl
Class AbstractInput

java.lang.Object
  extended by info.sswap.api.input.impl.AbstractInput
All Implemented Interfaces:
Input, java.io.Serializable
Direct Known Subclasses:
AtomicInputImpl, EnumeratedInputImpl, IntersectionInputImpl, PropertyInputImpl, UnionInputImpl

public abstract class AbstractInput
extends java.lang.Object
implements Input, java.io.Serializable

Author:
Evren Sirin
See Also:
Serialized Form

Field Summary
protected  java.lang.String description
           
protected  java.lang.String label
           
protected  PropertyInput propertyInput
           
protected  java.net.URI type
           
protected  InputValue value
           
 
Constructor Summary
AbstractInput(java.net.URI type)
           
 
Method Summary
protected  boolean genericEqualTo(Input that)
          Checks the equality of generic fields value, label, description.
 java.lang.String getDescription()
          Returns the description of this input.The description of the input is application-dependent.
 java.lang.String getLabel()
          Returns the label of this input.
 PropertyInput getPropertyInput()
           
 java.net.URI getType()
          Returns the type of the input.
 InputValue getValue()
          Returns the value associated with this input object.
 boolean isUnrestricted()
          Returns true if there are no restrictions on the input.
 void setDescription(java.lang.String description)
          Sets the description of this input.
 void setLabel(java.lang.String label)
          Sets the label for this input.
 void setPropertyInput(PropertyInput propertyInput)
           
 void setValue(InputValue value)
          Sets the value for this input object.
protected  java.lang.String toStringLabel()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface info.sswap.api.input.Input
accept
 

Field Detail

type

protected final java.net.URI type

value

protected InputValue value

label

protected java.lang.String label

description

protected java.lang.String description

propertyInput

protected PropertyInput propertyInput
Constructor Detail

AbstractInput

public AbstractInput(java.net.URI type)
Method Detail

genericEqualTo

protected boolean genericEqualTo(Input that)
Checks the equality of generic fields value, label, description.


getPropertyInput

public PropertyInput getPropertyInput()
Specified by:
getPropertyInput in interface Input

setPropertyInput

public void setPropertyInput(PropertyInput propertyInput)
Specified by:
setPropertyInput in interface Input

getType

public java.net.URI getType()
Returns the type of the input.

Specified by:
getType in interface Input

getDescription

public java.lang.String getDescription()
Description copied from interface: Input
Returns the description of this input.The description of the input is application-dependent. Typically, if the input represent a class label will be the rdfs:comment for that class. If the input is a property input, comment of the property is used.

Specified by:
getDescription in interface Input
Returns:
the description of this input or null if there is no description

setDescription

public void setDescription(java.lang.String description)
Description copied from interface: Input
Sets the description of this input.

Specified by:
setDescription in interface Input

getLabel

public java.lang.String getLabel()
Description copied from interface: Input
Returns the label of this input. The label of the input is application-dependent. Typically, if the input represent a class label will be the rdfs:label for that class. If the input is a property input, label of the property is used. If there is no rdfs:label for the class or property then the local name of the URI is used.

Specified by:
getLabel in interface Input
Returns:
the label for this input or null if there is no label

setLabel

public void setLabel(java.lang.String label)
Description copied from interface: Input
Sets the label for this input.

Specified by:
setLabel in interface Input

getValue

public InputValue getValue()
Returns the value associated with this input object.

Specified by:
getValue in interface Input

setValue

public void setValue(InputValue value)
Sets the value for this input object.

Specified by:
setValue in interface Input

isUnrestricted

public boolean isUnrestricted()
Returns true if there are no restrictions on the input. This is the case for owl:Thing and rdfs:Literal.

Specified by:
isUnrestricted in interface Input

toStringLabel

protected java.lang.String toStringLabel()


Copyright (c) 2011, iPlant Collaborative, University of Arizona, Cold Spring Harbor Laboratories, University of Texas at Austin.