Examples of Relation


Examples of org.jitterbit.integration.data.structure.database.DbTranRelations.Relation

                DatabaseColumn childField = child.findColumn(join.getChildField());
                if (parentField != null && childField != null) {
                    TableRelationship tr = new TableRelationship(parent, child);
                    tr.setRelationshipNature(join.getCardinality());
                    FieldRelationship fr = new FieldRelationship(parentField, childField);
                    copiedJoins.add(new Relation(tr, fr));
                }
            }
        }
        DbTranRelations copy = new DbTranRelations();
        for (Relation r : copiedJoins) {
View Full Code Here

Examples of org.ofbiz.sql.Relation

                            new Joined(false, new TableName("PartyRole", "d"), list(new KeyMap("partyId", "partyId"), new KeyMap("partyId", "partyId")))
                        )
                    )
                ),
                GenericTestCaseBase.<String, Relation>map(
                    "MainAPerson", new Relation("one", "MainA", "Person", list(new KeyMap("partyId", "partyId"))),
                    "MainBPerson", new Relation(null, "MainB", "Person", list(new KeyMap("partyId", "partyId"))),
                    "Person", new Relation("one", null, "Person", list(new KeyMap("partyId", "partyId"))),
                    "PartyGroup", new Relation(null, null, "PartyGroup", list(new KeyMap("partyId", "partyId")))
                ),
                new ConditionList(
                    Joiner.OR,
                    GenericTestCaseBase.<Condition>list(
                        new ConditionList(
View Full Code Here

Examples of org.onesocialweb.model.relation.Relation

      else if (itemsElement.attribute("node").getValue().equals(
          RelationManager.NODE)) {
        final RelationDomReader reader = new PersistentRelationDomReader();
        for (Element itemElement : (List<Element>) itemsElement
            .elements("item")) {
          Relation relation = reader.readElement(new ElementAdapter(
              itemElement.element("relation")));
          try {
            RelationManager.getInstance().handleMessage(
                fromJID.toBareJID(), toJID.toBareJID(),
                relation);
View Full Code Here

Examples of org.ontospread.xmlbind.Relation

        
        return concept;
    }
   
    private void createRelationsFromProperties(Iterator iterator, HashMap relationsMap) {
        Relation relation;
        for(;iterator.hasNext();){
          Statement statement = (Statement) iterator.next();
          if(statement.getObject().canAs(Individual.class)){
            if(relationsMap.containsKey(statement.getPredicate().getURI())){
              relation = (Relation) relationsMap.get(statement.getPredicate().getURI());
View Full Code Here

Examples of org.ontospread.xmlbind.Relation

        }      
       
    }
   
    private void addRelation(Relation relationType, ConceptDescription conceptDescription, HashMap relationsMap){       
        Relation relation;
        if(relationsMap.containsKey(relationType.getUri())){
            relation = (Relation) relationsMap.get(relationType.getUri());
         }else{
             relation = relationType;
             relationsMap.put(relation.getUri(),relation);
         }
         relation.getConceptDescriptions().add(conceptDescription);           
    }
View Full Code Here

Examples of org.ontospread.xmlbind.Relation

    private List createRelationsForInstance(String uri, TypeHierarchy hierarchy, String description, String value, Iterator it, HashMap relationsMap){
        List relations = new LinkedList();
        for(;it.hasNext();){  
            Object o = it.next();          
            OntResource withInstance =  (OntResource) o;
            Relation relation;
            if(relationsMap.containsKey(uri)){
                relation = (Relation) relationsMap.get(uri);
             }else{
                 relation = createRelationFromInstance(uri, hierarchy, description, value);
             }           
View Full Code Here

Examples of org.ontospread.xmlbind.Relation

        }
        return relations;
    }

    private Relation createRelationFromInstance(String uri, TypeHierarchy hierarchy, String description, String value) {
        Relation relation = factory.createRelation();       
        relation.setDescription(description);           
        relation.setHierarchy(hierarchy);
        relation.setOnproperty(uri);
        relation.setUri(uri);
        relation.setValue(value);
        return relation;       
    }
View Full Code Here

Examples of org.ontospread.xmlbind.Relation

        logger.debug("Creating relations with " + hierarchy);
        LinkedList<Relation> relations = new LinkedList<Relation>();
        while (iterator.hasNext()) { // concat . map
            OntClass relatedClass = (OntClass) iterator.next();
            if (!isOwlInternalClass(relatedClass)) {
                Relation relation = factory.createRelation();
                relation.setHierarchy(hierarchy);                 
                /* Setting description in superclass and subclass, relations overwrite this value.*/
                relation.setDescription(OntologyHelper.getPublicName(relatedClass));
                collectRelatedClassDescription(relatedClass, relation);
                relation.setUri(relation.getOnproperty());
                relations.add(relation);
                logger.debug("Added relation with hierarchy " + relation.getHierarchy() + " on property "+ relation.getOnproperty());
            } else {
                logger.debug("Discarding related class " + relatedClass.getURI());
            }
        }
        logger.debug("End relations with " + hierarchy);
View Full Code Here

Examples of org.openstreetmap.josm.data.osm.Relation

        if (relFix.size() < 2)
            return null;

        long idToKeep = 0;
        Relation relationToKeep = relFix.iterator().next();
        // Only one relation will be kept - the one with lowest positive ID, if such exist
        // or one "at random" if no such exists. Rest of the relations will be deleted
        for (Relation w: relFix) {
            if (!w.isNew() && (idToKeep == 0 || w.getId() < idToKeep)) {
                idToKeep = w.getId();
                relationToKeep = w;
            }
        }

        // Find the relation that is member of one or more relations. (If any)
        Relation relationWithRelations = null;
        List<Relation> relRef = null;
        for (Relation w : relFix) {
            List<Relation> rel = OsmPrimitive.getFilteredList(w.getReferrers(), Relation.class);
            if (!rel.isEmpty()) {
                if (relationWithRelations != null)
                    throw new AssertionError("Cannot fix duplicate relations: More than one relation is member of another relation.");
                relationWithRelations = w;
                relRef = rel;
            }
        }

        Collection<Command> commands = new LinkedList<>();

        // Fix relations.
        if (relationWithRelations != null && relationToKeep != relationWithRelations) {
            for (Relation rel : relRef) {
                Relation newRel = new Relation(rel);
                for (int i = 0; i < newRel.getMembers().size(); ++i) {
                    RelationMember m = newRel.getMember(i);
                    if (relationWithRelations.equals(m.getMember())) {
                        newRel.setMember(i, new RelationMember(m.getRole(), relationToKeep));
                    }
                }
                commands.add(new ChangeCommand(rel, newRel));
            }
        }
View Full Code Here

Examples of org.openstreetmap.osmosis.core.domain.v0_6.Relation

   * {@inheritDoc}
   */
  @Override
  public Relation parseRecord(ResultSet resultSet) {
    try {
      return new Relation(
        new CommonEntityData(
          resultSet.getLong("id"),
          resultSet.getInt("version"),
          new Date(resultSet.getTimestamp("tstamp").getTime()),
          buildUser(resultSet),
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.