org.gcube.contentmanagement.layerindependent.descriptions
Class BasicPropertyDescription

java.lang.Object
  extended by org.gcube.contentmanagement.layerindependent.descriptions.BasicPropertyDescription

public class BasicPropertyDescription
extends java.lang.Object

Defines constants related to property names, values and types of values as well as an layer-independent representation of such a property. Layer independent is achieved by having no dependencies to any class of other layers. By this, it can easily be used in combination with Storage as well as Content Layer, on server as well as client side, whereas stubs should be used only within one layer and in the boundary between them.


Field Summary
static java.lang.String ANY_FLAVOUR
          Constant to match all flavoures
static java.lang.String ANY_NAME
          Constant to match all names
static java.lang.String ANY_TYPE
          Constant to match all types
static java.lang.String PROPERTY_NAME
          generic property String for error identification
static java.lang.String PROPERTY_NAME_CONTENT_LENGTH
          Constant to define the property that holds information about the size of the content in bytes
static java.lang.String PROPERTY_NAME_CONTENT_MIMETYPE
          Constant to define the property that holds information about the MIME type of the content
static java.lang.String PROPERTY_NAME_CONTENT_URL
          Constant to define the property that holds the content url
static java.lang.String PROPERTY_NAME_CREATED_BY
          Constant to define the property that contains the name of the user who created an object
static java.lang.String PROPERTY_NAME_MODIFIED_BY
          Constant to define the property that contains the name of the user who last modified an object
static java.lang.String PROPERTY_NAME_OBJECT_CREATED
          Constant to define the property that contains the date when an object has been created Content is stored as a String representation in milliseconds, between the creation time and midnight, January 1, 1970 UTC.
static java.lang.String PROPERTY_NAME_OBJECT_FLAVOUR
          Constant to define the property that sub-types objects, e.g.
static java.lang.String PROPERTY_NAME_OBJECT_MODIFIED
          Constant to define the property that contains the date of the last modification of the object, The type of this property is indicated as PROPERTY_TYPE_TIME_IN_MILLISECONDS.
static java.lang.String PROPERTY_NAME_OBJECT_NAME
          Constant to define the property that contains the name of the object
static java.lang.String PROPERTY_NAME_OBJECT_TYPE
          Constant to define the property that contains the type of the object
static java.lang.String PROPERTY_NAME_USER_COLLECTION
          Name of the collection property used to indicate that the collection is a user collection or not.
static java.lang.String PROPERTY_TYPE_BOOLEAN
          the type of a property that represents a boolean value
static java.lang.String PROPERTY_TYPE_DISTINGUISHED_NAME
          the type of the property that holds information about a person in a X.509 distinguished name (or something similar).
static java.lang.String PROPERTY_TYPE_LENGTH_IN_BYTES
          the type of a property that expresses the length of raw content, in particular PROPERTY_NAME_CONTENT_LENGTH.
static java.lang.String PROPERTY_TYPE_MIME_TYPE
          the type of a property that represents a MIME type
static java.lang.String PROPERTY_TYPE_STRING
          the type of a property that represents a String
static java.lang.String PROPERTY_TYPE_TIME_IN_MILLISECONDS
          Content is stored as a String representation in milliseconds, between the modification time and midnight, January 1, 1970 UTC.
static java.lang.String PROPERTY_VALUE_BOOLEAN_FALSE
          Constant to define a valid string to represent 'false'
static java.lang.String PROPERTY_VALUE_BOOLEAN_TRUE
          Constant to define a valid string to represent 'true'
static java.lang.String PROPERTY_VALUE_MIME_TYPE_ASF
          MIME type for Microsoft ASF video content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_BINARY
          most generic MIME type for binary content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_BINRAY
          Deprecated. typo in name, use PROPERTY_VALUE_MIME_TYPE_BINARY instead
static java.lang.String PROPERTY_VALUE_MIME_TYPE_BZ2
          MIME type for BZip2 compressed content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_GENERIC_XML
          MIME type for not further defined XML content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_GIF
          MIME type for GIF image content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_GZ
          MIME type for GZip compressed content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_HTML
          MIME type for HTML content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_JPEG
          MIME type for JPEG image content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_MPEG
          MIME type for MPEG video content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_MSWORD
          MIME type for Microsoft Word format content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_PDF
          MIME type for PDF content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_PICT
          MIME type for PICT image content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_PLAIN_TEXT
          MIME type for plain text content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_PNG
          MIME type for Portable Network Grafic image content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_POSTSCRIPT
          MIME type for PostScript content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_QUICKTIME
          MIME type for QuickTime video content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_RTF
          MIME type for Rich-text format content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_SVG
          MIME type for Scalable Vector Grafic image content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_TAR
          MIME type for TAR archived content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_TAR_GZ
          MIME type for TAR.GZ compressed content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_TIFF
          MIME type for TIFF image content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_UNKNOWN
          value returned by java.net.URLConnection under some circumstances.
static java.lang.String PROPERTY_VALUE_MIME_TYPE_URILIST
          MIME type for URI and URL lists according to RFC2483 which is basically simply one URI per (CR-LF terminated) line, comment lines start with the # symbol.
static java.lang.String PROPERTY_VALUE_MIME_TYPE_WMF
          MIME type for WMF (image) content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_WMV
          MIME type for Microsoft WMV video content
static java.lang.String PROPERTY_VALUE_MIME_TYPE_ZIP
          MIME type for ZIP compressed content
 
Constructor Summary
BasicPropertyDescription(java.lang.String oid, java.lang.String name, java.lang.String type, java.lang.String value)
          Constructs a property description with all information set initially
 
Method Summary
static java.util.Calendar convertLongStringToCalendar(java.lang.String longvalueAsString)
          Convenience method to convert a string of a long value representing the time in milliseconds into a date format, that can be serialized by Axis automatically.
 java.lang.String getName()
          Returns the name of the property.
 java.lang.String getOid()
          Returns the object ID of the info object to which this property belongs
 java.lang.String getType()
          Returns the type of the value of the property.
 java.lang.String getValue()
          Returns the value of the property.
 void setName(java.lang.String name)
          Sets the name of the property.
 void setOid(java.lang.String oid)
          Sets the object ID of the info object to which this property belongs
 void setType(java.lang.String type)
          Sets the type of the value of the property.
 void setValue(java.lang.String value)
          Sets the value of the property.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANY_TYPE

public static final java.lang.String ANY_TYPE
Constant to match all types

See Also:
Constant Field Values

ANY_NAME

public static final java.lang.String ANY_NAME
Constant to match all names

See Also:
Constant Field Values

ANY_FLAVOUR

public static final java.lang.String ANY_FLAVOUR
Constant to match all flavoures

See Also:
Constant Field Values

PROPERTY_NAME

public static final java.lang.String PROPERTY_NAME
generic property String for error identification

See Also:
Constant Field Values

PROPERTY_NAME_OBJECT_NAME

public static final java.lang.String PROPERTY_NAME_OBJECT_NAME
Constant to define the property that contains the name of the object

See Also:
Constant Field Values

PROPERTY_NAME_OBJECT_TYPE

public static final java.lang.String PROPERTY_NAME_OBJECT_TYPE
Constant to define the property that contains the type of the object

See Also:
Constant Field Values

PROPERTY_NAME_OBJECT_CREATED

public static final java.lang.String PROPERTY_NAME_OBJECT_CREATED
Constant to define the property that contains the date when an object has been created Content is stored as a String representation in milliseconds, between the creation time and midnight, January 1, 1970 UTC. This makes it easy to use with java.util.Date without expensive parsing and localization issues.

See Also:
Constant Field Values

PROPERTY_NAME_OBJECT_MODIFIED

public static final java.lang.String PROPERTY_NAME_OBJECT_MODIFIED
Constant to define the property that contains the date of the last modification of the object, The type of this property is indicated as PROPERTY_TYPE_TIME_IN_MILLISECONDS.

See Also:
PROPERTY_TYPE_TIME_IN_MILLISECONDS, Constant Field Values

PROPERTY_NAME_CREATED_BY

public static final java.lang.String PROPERTY_NAME_CREATED_BY
Constant to define the property that contains the name of the user who created an object

See Also:
PROPERTY_TYPE_DISTINGUISHED_NAME, Constant Field Values

PROPERTY_NAME_MODIFIED_BY

public static final java.lang.String PROPERTY_NAME_MODIFIED_BY
Constant to define the property that contains the name of the user who last modified an object

See Also:
PROPERTY_TYPE_DISTINGUISHED_NAME, Constant Field Values

PROPERTY_NAME_OBJECT_FLAVOUR

public static final java.lang.String PROPERTY_NAME_OBJECT_FLAVOUR
Constant to define the property that sub-types objects, e.g. a object could be of type collection and of flavour virtual.

See Also:
Constant Field Values

PROPERTY_NAME_USER_COLLECTION

public static final java.lang.String PROPERTY_NAME_USER_COLLECTION
Name of the collection property used to indicate that the collection is a user collection or not.

User collections are collections that have been created either directly by users or due to a users request and contain (uploaded) content of the user. Non-user collections have been created to store content that is not provided by and should not be presented to users, but for instance data, that has been generated by services to store their internal state. By default, all collections are user collection unless specified otherwise.

See Also:
Constant Field Values

PROPERTY_NAME_CONTENT_LENGTH

public static final java.lang.String PROPERTY_NAME_CONTENT_LENGTH
Constant to define the property that holds information about the size of the content in bytes

See Also:
Constant Field Values

PROPERTY_NAME_CONTENT_MIMETYPE

public static final java.lang.String PROPERTY_NAME_CONTENT_MIMETYPE
Constant to define the property that holds information about the MIME type of the content

See Also:
Constant Field Values

PROPERTY_NAME_CONTENT_URL

public static final java.lang.String PROPERTY_NAME_CONTENT_URL
Constant to define the property that holds the content url

See Also:
Constant Field Values

PROPERTY_TYPE_STRING

public static final java.lang.String PROPERTY_TYPE_STRING
the type of a property that represents a String

See Also:
Constant Field Values

PROPERTY_TYPE_BOOLEAN

public static final java.lang.String PROPERTY_TYPE_BOOLEAN
the type of a property that represents a boolean value

See Also:
Constant Field Values

PROPERTY_VALUE_BOOLEAN_FALSE

public static final java.lang.String PROPERTY_VALUE_BOOLEAN_FALSE
Constant to define a valid string to represent 'false'


PROPERTY_VALUE_BOOLEAN_TRUE

public static final java.lang.String PROPERTY_VALUE_BOOLEAN_TRUE
Constant to define a valid string to represent 'true'


PROPERTY_TYPE_TIME_IN_MILLISECONDS

public static final java.lang.String PROPERTY_TYPE_TIME_IN_MILLISECONDS
Content is stored as a String representation in milliseconds, between the modification time and midnight, January 1, 1970 UTC. This makes it easy to use with java.util.Date without expensive parsing and localization issues.

See Also:
Constant Field Values

PROPERTY_TYPE_LENGTH_IN_BYTES

public static final java.lang.String PROPERTY_TYPE_LENGTH_IN_BYTES
the type of a property that expresses the length of raw content, in particular PROPERTY_NAME_CONTENT_LENGTH.

See Also:
PROPERTY_NAME_CONTENT_LENGTH, Constant Field Values

PROPERTY_TYPE_DISTINGUISHED_NAME

public static final java.lang.String PROPERTY_TYPE_DISTINGUISHED_NAME
the type of the property that holds information about a person in a X.509 distinguished name (or something similar).

See Also:
Constant Field Values

PROPERTY_TYPE_MIME_TYPE

public static final java.lang.String PROPERTY_TYPE_MIME_TYPE
the type of a property that represents a MIME type

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_BINARY

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_BINARY
most generic MIME type for binary content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_BINRAY

@Deprecated
public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_BINRAY
Deprecated. typo in name, use PROPERTY_VALUE_MIME_TYPE_BINARY instead
most generic MIME type for binary content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_UNKNOWN

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_UNKNOWN
value returned by java.net.URLConnection under some circumstances. Not very useful, hence it should not be used.

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_GENERIC_XML

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_GENERIC_XML
MIME type for not further defined XML content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_HTML

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_HTML
MIME type for HTML content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_PLAIN_TEXT

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_PLAIN_TEXT
MIME type for plain text content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_PDF

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_PDF
MIME type for PDF content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_POSTSCRIPT

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_POSTSCRIPT
MIME type for PostScript content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_RTF

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_RTF
MIME type for Rich-text format content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_MSWORD

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_MSWORD
MIME type for Microsoft Word format content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_JPEG

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_JPEG
MIME type for JPEG image content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_PNG

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_PNG
MIME type for Portable Network Grafic image content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_GIF

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_GIF
MIME type for GIF image content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_TIFF

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_TIFF
MIME type for TIFF image content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_SVG

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_SVG
MIME type for Scalable Vector Grafic image content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_PICT

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_PICT
MIME type for PICT image content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_WMF

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_WMF
MIME type for WMF (image) content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_MPEG

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_MPEG
MIME type for MPEG video content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_QUICKTIME

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_QUICKTIME
MIME type for QuickTime video content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_ASF

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_ASF
MIME type for Microsoft ASF video content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_WMV

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_WMV
MIME type for Microsoft WMV video content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_TAR

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_TAR
MIME type for TAR archived content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_TAR_GZ

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_TAR_GZ
MIME type for TAR.GZ compressed content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_GZ

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_GZ
MIME type for GZip compressed content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_BZ2

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_BZ2
MIME type for BZip2 compressed content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_ZIP

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_ZIP
MIME type for ZIP compressed content

See Also:
Constant Field Values

PROPERTY_VALUE_MIME_TYPE_URILIST

public static final java.lang.String PROPERTY_VALUE_MIME_TYPE_URILIST
MIME type for URI and URL lists according to RFC2483 which is basically simply one URI per (CR-LF terminated) line, comment lines start with the # symbol.

See Also:
Constant Field Values
Constructor Detail

BasicPropertyDescription

public BasicPropertyDescription(java.lang.String oid,
                                java.lang.String name,
                                java.lang.String type,
                                java.lang.String value)
Constructs a property description with all information set initially

Parameters:
oid - the object ID of the object, to which this property belongs
name - the name of the property
type - the type of the value of the property
value - the value of the property
Method Detail

getName

public java.lang.String getName()
Returns the name of the property. Can be one of the defined constants or any user-defined identifier.

Returns:
the name
See Also:
PROPERTY_NAME_CONTENT_LENGTH, PROPERTY_NAME_CONTENT_MIMETYPE, PROPERTY_NAME_OBJECT_CREATED, PROPERTY_NAME_OBJECT_FLAVOUR, PROPERTY_NAME_OBJECT_MODIFIED, PROPERTY_NAME_OBJECT_NAME, PROPERTY_NAME_OBJECT_TYPE, PROPERTY_NAME_USER_COLLECTION

setName

public void setName(java.lang.String name)
Sets the name of the property. Can be one of the defined constants or any user-defined identifier.

Parameters:
name - the name
See Also:
PROPERTY_NAME_CONTENT_LENGTH, PROPERTY_NAME_CONTENT_MIMETYPE, PROPERTY_NAME_OBJECT_CREATED, PROPERTY_NAME_OBJECT_FLAVOUR, PROPERTY_NAME_OBJECT_MODIFIED, PROPERTY_NAME_OBJECT_NAME, PROPERTY_NAME_OBJECT_TYPE, PROPERTY_NAME_USER_COLLECTION

getType

public java.lang.String getType()
Returns the type of the value of the property. Can be one of the defined constants or any user-defined identifier.

Returns:
the type
See Also:
PROPERTY_TYPE_BOOLEAN, PROPERTY_TYPE_LENGTH_IN_BYTES, PROPERTY_TYPE_MIME_TYPE, PROPERTY_TYPE_STRING, PROPERTY_TYPE_TIME_IN_MILLISECONDS

setType

public void setType(java.lang.String type)
Sets the type of the value of the property. Can be one of the defined constants or any user-defined identifier.

Parameters:
type - the type
See Also:
PROPERTY_TYPE_BOOLEAN, PROPERTY_TYPE_LENGTH_IN_BYTES, PROPERTY_TYPE_MIME_TYPE, PROPERTY_TYPE_STRING, PROPERTY_TYPE_TIME_IN_MILLISECONDS

getValue

public java.lang.String getValue()
Returns the value of the property. Can be one of the defined constants, e.g. a mime-type or any user-defined string.

Returns:
the value
See Also:
PROPERTY_VALUE_BOOLEAN_FALSE, PROPERTY_VALUE_BOOLEAN_TRUE

setValue

public void setValue(java.lang.String value)
Sets the value of the property. Can be one of the defined constants, e.g. a mime-type or any user-defined string.

Parameters:
value - the value
See Also:
PROPERTY_VALUE_BOOLEAN_FALSE, PROPERTY_VALUE_BOOLEAN_TRUE

getOid

public java.lang.String getOid()
Returns the object ID of the info object to which this property belongs

Returns:
the object ID to which the property belongs

setOid

public void setOid(java.lang.String oid)
Sets the object ID of the info object to which this property belongs

Parameters:
oid - the object ID to which the property belongs

convertLongStringToCalendar

public static java.util.Calendar convertLongStringToCalendar(java.lang.String longvalueAsString)
Convenience method to convert a string of a long value representing the time in milliseconds into a date format, that can be serialized by Axis automatically.

Parameters:
longvalueAsString - the String representation of the number (long value)
Returns:
a calendar representing the same time or null, if the string does not represent a proper date as time in milliseconds
See Also:
Calendar.setTimeInMillis(long)