Examples of Relation


Examples of com.google.devtools.depan.graph.api.Relation

  @Override
  public void marshal(Object source, HierarchicalStreamWriter writer,
      MarshallingContext context) {
    GraphEdge edge = (GraphEdge) source;

    Relation relation = edge.getRelation();
    writer.startNode(RELATION_TAG);

    Class<?> actualType = relation.getClass();
    Class<?> defaultType = mapper.defaultImplementationOf(BasicEdge.class);
    if (!actualType.equals(defaultType)) {
        writer.addAttribute(
            mapper.aliasForAttribute("class"),
            mapper.serializedClass(actualType));
View Full Code Here

Examples of com.impetus.kundera.metadata.model.Relation

                        {
                            NoSqlDBUtils.get(fieldMetadata, value, entity, (Field) attribute.getJavaMember());
                        }
                        else if (attribute.isAssociation() && value != null)
                        {
                            Relation relation = entityMetadata.getRelation(attribute.getName());

                            if (relation != null)
                            {
                                EntityMetadata associationMetadata = KunderaMetadataManager.getEntityMetadata(
                                        kunderaMetadata, relation.getTargetEntity());
                                if (!relation.getType().equals(ForeignKey.MANY_TO_MANY))
                                {
                                    relationMap.put(jpaColumnName, NoSqlDBUtils.get(fieldMetadata, value,
                                            (Field) associationMetadata.getIdAttribute().getJavaMember()));
                                }
                            }
View Full Code Here

Examples of com.lunatech.doclets.jax.jpa.model.Relation

        print("sequence: " + member.getSequence());
      }
      close("td");
      if (isRelation) {
        open("td");
        Relation rel = (Relation) member;
        print(rel.getRelationFrom().name());
        print("..");
        print(rel.getRelationTo().name());
        close("td");
      }
      open("td");
      Doc javaDoc = member.getJavaDoc();
      if (javaDoc != null && javaDoc.firstSentenceTags() != null)
View Full Code Here

Examples of com.sun.mfwk.relations.Relation

                        }
                    }
                    if (isProcessed(source, dest, relationService.getType(r)))
                        continue;
                    Utils.log(Level.FINE, "Creating relations for dest = " + dest + " source = " + source);
                    Relation relation =
                            rf.create(source, dest, relationService.getType(r),
                            relationService.getCreateAnyway(r));
                    // add the newly created relation
                    if (relation != null) {
                        RelationServiceImpl.getRelationService().
View Full Code Here

Examples of com.sun.speech.freetts.Relation

     *
     * @throws ProcessException if an error occurs while
     *         processing of the utterance
     */
    public void processUtterance(Utterance utterance) throws ProcessException {
  Relation segmentRelation = utterance.getRelation(Relation.SEGMENT);
        Relation targetRelation = utterance.getRelation(Relation.TARGET);

        Item segment = segmentRelation.getHead();
        Item target = null;
  if (targetRelation != null) target = targetRelation.getHead();
        float prevEnd = 0f;
        while (segment != null) {
            // String name = segment.getFeatures().getString("name");
            // Accumulated duration of all segments in the utterance,
            // in seconds:
View Full Code Here

Examples of com.tapsterrock.mpx.Relation

        TaskManager tm = m_project.getTaskManager();
        Iterator taskIter = mpx.getAllTasks().iterator();
        Task task;
        RelationList rels;
        Iterator relIter;
        Relation rel;

        GanttTask gTask1;
        int gTaskNumber1;
        GanttTask gTask2;
        int gTaskNumber2;
        TaskDependency gTaskDependency;
        int gConstraintType;
        while (taskIter.hasNext() == true) {
            task = (Task) taskIter.next();
            gTaskNumber1 = mapTaskNumber(task.getID());

            if (gTaskNumber1 == -1) {
                continue;
            }

            rels = (RelationList)task.getPredecessors();

            if (rels != null) {
                relIter = rels.iterator();

                while (relIter.hasNext() == true) {
                    rel = (Relation) relIter.next();

                    gTaskNumber2 = mapTaskNumber(new Integer(rel
                            .getTaskIDValue()));

                    if (gTaskNumber2 != -1) {
                        gTask1 = tm.getTask(gTaskNumber1);
                        gTask2 = tm.getTask(gTaskNumber2);

                        switch (rel.getType().getType()) {
                        case RelationType.FINISH_FINISH_VALUE: {
                            gConstraintType = GanttTaskRelationship.FF;
                            break;
                        }
View Full Code Here

Examples of com.tapsterrock.mpx.Relation

        TaskDependency relationship;
        com.tapsterrock.mpx.Task mpxSuccessorTask;
        com.tapsterrock.mpx.Task mpxPredecessorTask;
        Integer mpxSuccessorTaskID;
        Integer mpxPredecessorTaskID;
        Relation mpxRelation;

        for (int loop = 0; loop < dependencies.length; loop++) {
            relationship = dependencies[loop];
            mpxSuccessorTaskID = (Integer) m_ganttMpxTaskMap.get(new Integer(
                    relationship.getDependant().getTaskID()));
            mpxPredecessorTaskID = (Integer) m_ganttMpxTaskMap.get(new Integer(
                    relationship.getDependee().getTaskID()));

            if (mpxSuccessorTaskID != null && mpxPredecessorTaskID != null) {
                mpxSuccessorTask = m_mpx.getTaskByUniqueID(mpxSuccessorTaskID
                        .intValue());
                mpxPredecessorTask = m_mpx
                        .getTaskByUniqueID(mpxPredecessorTaskID.intValue());

                mpxRelation = mpxSuccessorTask
                        .addPredecessor(mpxPredecessorTask);

                TaskDependencyConstraint constraint = relationship
                        .getConstraint();
                switch (constraint.getID()) {
                case GanttTaskRelationship.SS: {
                    mpxRelation.setType(RelationType.START_START);
                    break;
                }

                case GanttTaskRelationship.SF: {
                    mpxRelation.setType(RelationType.START_FINISH);
                    break;
                }

                case GanttTaskRelationship.FS: {
                    mpxRelation.setType(RelationType.FINISH_START);
                    break;
                }

                case GanttTaskRelationship.FF: {
                    mpxRelation.setType(RelationType.FINISH_FINISH);
                    break;
                }
                }
            }
        }
View Full Code Here

Examples of com.thinkaurelius.titan.graphdb.query.keycondition.Relation

  private String getQueryString(String family, KeyCondition<String> condition) {
    if (condition instanceof KeyAtom) {
      KeyAtom<String> atom = (KeyAtom<String>) condition;
      Object value = atom.getCondition();
      String key = atom.getKey();
      Relation relation = atom.getRelation();
      if (value instanceof Number || value instanceof Interval) {
        Preconditions.checkArgument(relation instanceof Cmp, "Relation not supported on numeric types: " + relation);
        if (relation == Cmp.INTERVAL) {
          Preconditions.checkArgument(value instanceof Interval && ((Interval<?>) value).getStart() instanceof Number);
          Interval<?> i = (Interval<?>) value;
View Full Code Here

Examples of core.Relation

public class StandarizationOperatorTest {

    @Test
    public void testConstructorOfStandarizationOperator() {
        CellAddressFactory caf;
        Relation input;
        StandarizationOperator standOper;
        Formulas expectedResult;
        Formulas resultFormulas;
        Relation resRelation;

        caf = new CellAddressFactory(1);
        input = caf.getSpaceForNewRelation(1);//(a)
        standOper = new StandarizationOperator(caf, input);
        resultFormulas = standOper.getFormulas();
        expectedResult = new Formulas();
        expectedResult.put(new Cell('B',1), "IF(ISNA($A1),0,1)");
        expectedResult.put(new Cell('C',1), "MATCH(ROW(),$B:$B,0)");
        expectedResult.put(new Cell('D',1), "INDEX(A:A,$C1)");
        expectedResult.put(new Cell('B',2), "IF(ISNA($A2),B1,B1+1)");
        expectedResult.put(new Cell('C',2), "MATCH(ROW(),$B:$B,0)");
        expectedResult.put(new Cell('D',2), "INDEX(A:A,$C2)");
//        System.out.println("expected:");
//        System.out.println(expectedResult.toString(caf));
//        System.out.println("real");
//        System.out.println(resultFormulas.toString(caf));
        assertEquals(expectedResult, resultFormulas);
        resRelation = standOper.getResultRelation();
        assertEquals(new Column('D'), resRelation.getFirstCol());
        assertEquals(1, resRelation.getCardinality());

        caf = new CellAddressFactory(1);
        input = caf.getSpaceForNewRelation(2);//(a,b)
        standOper = new StandarizationOperator(caf, input);
        resultFormulas = standOper.getFormulas();
        expectedResult = new Formulas();
        expectedResult.put(new Cell('C',1), "IF(ISNA($A1),0,1)");
        expectedResult.put(new Cell('D',1), "MATCH(ROW(),$C:$C,0)");
        expectedResult.put(new Cell('E',1), "INDEX(A:A,$D1)");
        expectedResult.put(new Cell('F',1), "INDEX(B:B,$D1)");
        expectedResult.put(new Cell('C',2), "IF(ISNA($A2),C1,C1+1)");
        expectedResult.put(new Cell('D',2), "MATCH(ROW(),$C:$C,0)");
        expectedResult.put(new Cell('E',2), "INDEX(A:A,$D2)");
        expectedResult.put(new Cell('F',2), "INDEX(B:B,$D2)");
//        System.out.println("expected:");
//        System.out.println(expectedResult.toString(caf));
//        System.out.println("real");
//        System.out.println(resultFormulas.toString(caf));
        assertEquals(expectedResult, resultFormulas);
        resRelation = standOper.getResultRelation();
        assertEquals(new Column('E'), resRelation.getFirstCol());
        assertEquals(2, resRelation.getCardinality());

        caf = new CellAddressFactory(2);//zaczynamy od B
        input = caf.getSpaceForNewRelation(3);//(b,c,d)
        standOper = new StandarizationOperator(caf, input);
        resultFormulas = standOper.getFormulas();
        expectedResult = new Formulas();
        expectedResult.put(new Cell('E',1), "IF(ISNA($B1),0,1)");
        expectedResult.put(new Cell('F',1), "MATCH(ROW(),$E:$E,0)");
        expectedResult.put(new Cell('G',1), "INDEX(B:B,$F1)");
        expectedResult.put(new Cell('H',1), "INDEX(C:C,$F1)");
        expectedResult.put(new Cell('I',1), "INDEX(D:D,$F1)");
        expectedResult.put(new Cell('E',2), "IF(ISNA($B2),E1,E1+1)");
        expectedResult.put(new Cell('F',2), "MATCH(ROW(),$E:$E,0)");
        expectedResult.put(new Cell('G',2), "INDEX(B:B,$F2)");
        expectedResult.put(new Cell('H',2), "INDEX(C:C,$F2)");
        expectedResult.put(new Cell('I',2), "INDEX(D:D,$F2)");
//        System.out.println("expected:");
//        System.out.println(expectedResult.toString(caf));
//        System.out.println("real");
//        System.out.println(resultFormulas.toString(caf));
        assertEquals(expectedResult, resultFormulas);
        resRelation = standOper.getResultRelation();
        assertEquals(new Column('G'), resRelation.getFirstCol());
        assertEquals(3, resRelation.getCardinality());
    }
View Full Code Here

Examples of core.Relation

*/
public class SortingOperatorTest {
    @Test(expectedExceptions = IllegalArgumentException.class)
    public void testSortingOperatorFailAsc1() {
        CellAddressFactory caf;
        Relation input;

        caf = new CellAddressFactory(1);
        input = caf.getSpaceForNewRelation(1);//(a)
        new SortingAscendingOperator(caf, input, 0);//nie można sortować po kolumnie z nieistniejącym indeksem
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.