Class DurationLiteral

java.lang.Object
org.aksw.iguana.commons.time.DurationLiteral
All Implemented Interfaces:
org.apache.jena.datatypes.RDFDatatype

public class DurationLiteral extends Object implements org.apache.jena.datatypes.RDFDatatype
This class is used to convert a Java Duration object to a typed RDF literal. The literal is typed as xsd:dayTimeDuration.
TODO: This class temporarily fixes an issue with Jena.
  • Constructor Details

    • DurationLiteral

      public DurationLiteral(Duration duration)
  • Method Details

    • getLexicalForm

      public String getLexicalForm()
    • getURI

      public String getURI()
      Specified by:
      getURI in interface org.apache.jena.datatypes.RDFDatatype
    • unparse

      public String unparse(Object value)
      Specified by:
      unparse in interface org.apache.jena.datatypes.RDFDatatype
    • parse

      public Object parse(String lexicalForm) throws org.apache.jena.datatypes.DatatypeFormatException
      Specified by:
      parse in interface org.apache.jena.datatypes.RDFDatatype
      Throws:
      org.apache.jena.datatypes.DatatypeFormatException
    • isValid

      public boolean isValid(String lexicalForm)
      Specified by:
      isValid in interface org.apache.jena.datatypes.RDFDatatype
    • isValidValue

      public boolean isValidValue(Object valueForm)
      Specified by:
      isValidValue in interface org.apache.jena.datatypes.RDFDatatype
    • isValidLiteral

      public boolean isValidLiteral(org.apache.jena.graph.impl.LiteralLabel lit)
      Specified by:
      isValidLiteral in interface org.apache.jena.datatypes.RDFDatatype
    • isEqual

      public boolean isEqual(org.apache.jena.graph.impl.LiteralLabel value1, org.apache.jena.graph.impl.LiteralLabel value2)
      Specified by:
      isEqual in interface org.apache.jena.datatypes.RDFDatatype
    • getHashCode

      public int getHashCode(org.apache.jena.graph.impl.LiteralLabel lit)
      Specified by:
      getHashCode in interface org.apache.jena.datatypes.RDFDatatype
    • getJavaClass

      public Class<?> getJavaClass()
      Specified by:
      getJavaClass in interface org.apache.jena.datatypes.RDFDatatype
    • cannonicalise

      public Object cannonicalise(Object value)
      Specified by:
      cannonicalise in interface org.apache.jena.datatypes.RDFDatatype
    • extendedTypeDefinition

      public Object extendedTypeDefinition()
      Specified by:
      extendedTypeDefinition in interface org.apache.jena.datatypes.RDFDatatype
    • normalizeSubType

      public org.apache.jena.datatypes.RDFDatatype normalizeSubType(Object value, org.apache.jena.datatypes.RDFDatatype dt)
      Specified by:
      normalizeSubType in interface org.apache.jena.datatypes.RDFDatatype