Package org.wymiwyg.commons.util.text

Examples of org.wymiwyg.commons.util.text.W3CDateFormat


    Resource transaction = resultModel
        .createResource(TRANSACTION.Transaction);
    transaction.addProperty(TRANSACTION.mainResponseResource, resource);
    transaction.addProperty(KNOBOT.fromItemPos, model.createTypedLiteral(from));
    transaction.addProperty(KNOBOT.tillItemPos, model.createTypedLiteral(till));
    Literal currentDate =resultModel.createTypedLiteral(new W3CDateFormat()
                .format(new Date()), XSDDatatype.XSDdateTime);
    transaction.addProperty(DC.date, currentDate);
    Literal startDateLiteral = model.createTypedLiteral(dateFormat
        .format(startDate), DefaultValuesHandler
        .getDefaultTimeZone(model).getURI());
View Full Code Here


      if (strength > 0.000001) {
        float newStrength = 1f - ((1f - strength)*0.5f);
       
        currentRelationRes.removeAll(KNOBOT.effectiveDate);
        currentRelationRes.removeAll(KNOBOT.strength);
        Literal effectiveDateLiteral = model.createTypedLiteral(new W3CDateFormat()
                    .format(new Date()), XSDDatatype.XSDdateTime);
        currentRelationRes.addProperty(KNOBOT.effectiveDate, effectiveDateLiteral);
        currentRelationRes.addProperty(KNOBOT.strength, model.createTypedLiteral(newStrength));
      }
    }
View Full Code Here

            .equals(childStrengthOrig)));
    Resource relation = getRelation(relationSource, relationTarget);
        String effectiveDateString = requestBody.getParameter("effectiveDate");
        Literal effectiveDateLiteral;
        if (effectiveDateString == null) {
            effectiveDateLiteral = model.createTypedLiteral(new W3CDateFormat()
                    .format(new Date()), XSDDatatype.XSDdateTime);
        } else {
            effectiveDateLiteral = model.createTypedLiteral(effectiveDateString, XSDDatatype.XSDdateTime);
        }
       
View Full Code Here

      newRelation.addProperty(KNOBOT.minimumChildStrengthReduction, model.createTypedLiteral(Float
          .parseFloat(childStrengthReduction)));
    }
    newRelation.addProperty(KNOBOT.source, relationSource);
    newRelation.addProperty(KNOBOT.target, relationTarget);
    Literal effectiveDateLiteral = model.createTypedLiteral(new W3CDateFormat()
                .format(new Date()), XSDDatatype.XSDdateTime);
    newRelation.addProperty(KNOBOT.effectiveDate, effectiveDateLiteral);
    if (inline) {
        newRelation.addProperty(RDF.type, KNOBOT.InlineRelation);
    }
View Full Code Here

    transaction.addProperty(KNOBOT.itemsPerPage, model.createTypedLiteral(requestParameters
        .getItemsPerPage()));
    transaction.addProperty(KNOBOT.hasMoreItems, resultModel
        .createTypedLiteral(hasMore));
    Literal currentDate = resultModel
        .createTypedLiteral(new W3CDateFormat().format(new Date()),
            XSDDatatype.XSDdateTime);
    transaction.addProperty(DC.date, currentDate);

    if (subject != null) {
      resultModel.add(JenaUtil.getExpandedResource(subject, 3));
View Full Code Here

      try  {
        ((XSDDateTime)property.getLiteral().getValue()).asCalendar();
      } catch (ClassCastException e) {
        Date effectiveDate = new Date(property.getLong());
        relation.removeAll(KNOBOT.effectiveDate);
        Literal l = model.createTypedLiteral(new W3CDateFormat()
                    .format(effectiveDate), XSDDatatype.XSDdateTime);
        relation.addProperty(KNOBOT.effectiveDate, l);
        out.println("fixed "+effectiveDate);
      }
    }
View Full Code Here

        relation.addProperty(KNOBOT.source, topic);
        relation.addProperty(KNOBOT.target, entry);
        relation.addProperty(KNOBOT.strength, model.createTypedLiteral(1f));
        relation.addProperty(KNOBOT.strengthReduction,
        model.createTypedLiteral(DefaultValuesHandler.getDefaultStrengthReduction(model)));
        Literal effectiveDateLiteral = model.createTypedLiteral(new W3CDateFormat()
                .format(new Date()), XSDDatatype.XSDdateTime);
    relation.addProperty(KNOBOT.effectiveDate, effectiveDateLiteral);
        relation.addProperty(RDF.type, KNOBOT.InlineRelation);
        RelationManager.addRelation(relation);
       
View Full Code Here

        // anyway
        agent = model.createResource();
      }
    }

    Literal currentDate =resultModel.createTypedLiteral(new W3CDateFormat()
                .format(new Date()), XSDDatatype.XSDdateTime);
    transaction.addProperty(DC.date, currentDate);

    Resource user = VirtuserHandler.getSubject();
    if (user != null) {
View Full Code Here

                        dateString = target.getProperty(DCTerms.created)
                                .getString();
                    }
                    if (dateString != null) {
                        try {
                            effectiveDate = new W3CDateFormat().parse(
                                    dateString);
                        } catch (ParseException e) {
                            log.info("Invalid date in aggregation for "
                                    + e.toString());
                            e.printStackTrace();
                        }
                    }
                    Literal effectiveDateLiteral = model.createTypedLiteral(new W3CDateFormat()
                        .format(effectiveDate), XSDDatatype.XSDdateTime);
                    newRelation.addProperty(KNOBOT.effectiveDate, effectiveDateLiteral);
                    RelationManager.addRelation(newRelation);
                } else {
                    model.add(JenaUtil.getExpandedResource(importedRelation, 3,
View Full Code Here

    Resource relation = model.createResource(KNOBOT.Relation);
    relation.addProperty(KNOBOT.source, topic);
    relation.addProperty(KNOBOT.target, item);
    relation.addProperty(KNOBOT.strength, model.createTypedLiteral(relevance));
    relation.addProperty(KNOBOT.strengthReduction, model.createTypedLiteral(aging));
    Literal effectiveDateLiteral = model.createTypedLiteral(new W3CDateFormat()
                .format(new Date()), XSDDatatype.XSDdateTime);
    relation.addProperty(KNOBOT.effectiveDate, effectiveDateLiteral);
    relation.addProperty(RDF.type, KNOBOT.InlineRelation);
    RelationManager.addRelation(relation);
    Resource user = getCurrentUser();
View Full Code Here

TOP

Related Classes of org.wymiwyg.commons.util.text.W3CDateFormat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.