uk.ac.cam.spectra
Class DateProperty

java.lang.Object
  extended by uk.ac.cam.spectra.LiteralProperty
      extended by uk.ac.cam.spectra.DateProperty
All Implemented Interfaces:
java.io.Serializable, MetadataProperty

public class DateProperty
extends LiteralProperty
implements MetadataProperty

Metadata property with a Date literal value.

Author:
Jim Downing
See Also:
MetadataProperty, Serialized Form

Field Summary
 
Fields inherited from class uk.ac.cam.spectra.LiteralProperty
element, namespace
 
Constructor Summary
DateProperty(java.lang.String ns, java.lang.String el)
           
 
Method Summary
 void add(com.hp.hpl.jena.rdf.model.Resource resource, java.lang.Object value)
           
 java.util.Date decodeDate(com.hp.hpl.jena.rdf.model.Literal l)
           
 java.lang.String getXsiType()
          Base literals don't have an xsi type.
 boolean valid(com.hp.hpl.jena.rdf.model.RDFNode nd, com.hp.hpl.jena.rdf.model.Model m)
           
 
Methods inherited from class uk.ac.cam.spectra.LiteralProperty
asProperty, decode, equals, getElement, getNamespace, hashCode, isLiteral, toURI, toURIString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uk.ac.cam.spectra.MetadataProperty
asProperty, decode, getElement, getNamespace, isLiteral, toURI, toURIString
 

Constructor Detail

DateProperty

public DateProperty(java.lang.String ns,
                    java.lang.String el)
Method Detail

getXsiType

public java.lang.String getXsiType()
Description copied from class: LiteralProperty
Base literals don't have an xsi type.

Specified by:
getXsiType in interface MetadataProperty
Overrides:
getXsiType in class LiteralProperty

valid

public boolean valid(com.hp.hpl.jena.rdf.model.RDFNode nd,
                     com.hp.hpl.jena.rdf.model.Model m)
Specified by:
valid in interface MetadataProperty
Overrides:
valid in class LiteralProperty
Parameters:
nd - the value you wish to set
m - the target RDF model

decodeDate

public java.util.Date decodeDate(com.hp.hpl.jena.rdf.model.Literal l)

add

public void add(com.hp.hpl.jena.rdf.model.Resource resource,
                java.lang.Object value)
Specified by:
add in interface MetadataProperty
Overrides:
add in class LiteralProperty


Copyright © 2006-2007 The SPECTRa Project. All Rights Reserved.