Package kpi.asoiu.model.test

Examples of kpi.asoiu.model.test.TripletEntity


        }

        article.setSubjects(new ArrayList<SubjectsEntity>(subjectsEntityMap.values()));
        List<TripletEntity> tripletEntities = new ArrayList<TripletEntity>();
        for (Triplet triplet : tree.keySet()) {
            TripletEntity tripletEntity = createEntityFromTriplet(triplet, subjectsEntityMap);
            tripletEntities.add(tripletEntity);
            tripletEntities.addAll(treeToList(tripletEntity, tree.get(triplet), subjectsEntityMap));
        }
        for (TripletEntity tripletEntity : tripletEntities) {
            tripletEntity.setId(simpleDAO.addObjects(tripletEntity));
        }
        article.setTriplets(tripletEntities);
        simpleDAO.updateObject(article);
    }
View Full Code Here


        article.setTriplets(tripletEntities);
        simpleDAO.updateObject(article);
    }

    private TripletEntity createEntityFromTriplet(Triplet triplet, Map<String, SubjectsEntity> subjects) {
        TripletEntity tripletEntity = new TripletEntity();
        tripletEntity.setObject(triplet.getObject());
        tripletEntity.setSubject(subjects.get(triplet.getSubject().toLowerCase()));
        tripletEntity.setPredicate(triplet.getPredicate());
        return tripletEntity;
    }
View Full Code Here

        List<TripletEntity> entities = new ArrayList<TripletEntity>();
        if (tripletTree == null || tripletTree.isEmpty()) {
            return entities;
        } else {
            for (Triplet triplet : tripletTree.keySet()) {
                TripletEntity tripletEntity = createEntityFromTriplet(triplet, subjects);
                tripletEntity.setParentTriplet(parentTriplet);
                entities.addAll(treeToList(tripletEntity, tripletTree.get(triplet), subjects));
            }
        }
        return entities;
    }
View Full Code Here

TOP

Related Classes of kpi.asoiu.model.test.TripletEntity

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.