Examples of AggregateEvent


Examples of org.sleuthkit.autopsy.timeline.events.AggregateEvent

    }

    @Override
    protected synchronized void dataItemAdded(Series<DateTime, AggregateEvent> series, int i, Data<DateTime, AggregateEvent> data) {
        final AggregateEvent aggEvent = data.getYValue();
        AggregateEventNode eventNode = nodeMap.get(aggEvent);
        if (eventNode == null) {
            eventNode = new AggregateEventNode(aggEvent, null, this);

            eventNode.setLayoutX(getXAxis().getDisplayPosition(new DateTime(aggEvent.getSpan().getStartMillis())));
            data.setNode(eventNode);
            nodeMap.put(aggEvent, eventNode);
            nodeGroup.getChildren().add(eventNode);
            requiresLayout = true;
        }
View Full Code Here

Examples of org.sleuthkit.autopsy.timeline.events.AggregateEvent

        nodeGroup.setTranslateY(-d * h);
    }

    private void checkNode(AggregateEventNode node, Predicate<AggregateEventNode> p, List<AggregateEventNode> nodes) {
        if (node != null) {
            AggregateEvent event = node.getEvent();
            if (p.test(node)) {
                nodes.add(node);
            }
            for (Node n : node.getSubNodePane().getChildrenUnmodifiable()) {
                checkNode((AggregateEventNode) n, p, nodes);
View Full Code Here

Examples of org.sleuthkit.autopsy.timeline.events.AggregateEvent

        //for each node lay size it and position it in first available slot
        for (Node n : nodes) {
            final AggregateEventNode tlNode = (AggregateEventNode) n;
            tlNode.setDescriptionVisibility(descrVisibility.get());

            AggregateEvent ie = tlNode.getEvent();
            final double rawDisplayPosition = getXAxis().getDisplayPosition(new DateTime(ie.getSpan().getStartMillis()));
            //position of start and end according to range of axis
            double xPos = rawDisplayPosition - xOffset;
            double layoutNodesResultHeight = 0;
            if (tlNode.getSubNodePane().getChildren().isEmpty() == false) {
                FXCollections.sort(tlNode.getSubNodePane().getChildren(), new StartTimeComparator());
                layoutNodesResultHeight = layoutNodes(tlNode.getSubNodePane().getChildren(), 0, rawDisplayPosition);
            }
            double xPos2 = getXAxis().getDisplayPosition(new DateTime(ie.getSpan().getEndMillis())) - xOffset;
            double span = xPos2 - xPos;

            //size timespan border
            tlNode.setSpanWidth(span);
            if (truncateAll.get()) { //if truncate option is selected limit width of description label
View Full Code Here

Examples of org.sleuthkit.autopsy.timeline.events.AggregateEvent

            stopwatch.stop();
            //System.out.println(stopwatch.elapsedMillis() / 1000.0 + " seconds");
            while (rs.next()) {
                EventType type = useSubTypes ? RootEventType.allTypes.get(rs.getInt(SUB_TYPE_COLUMN)) : BaseTypes.values()[rs.getInt(BASE_TYPE_COLUMN)];

                AggregateEvent aggregateEvent = new AggregateEvent(
                        new Interval(rs.getLong("Min(time)") * 1000, rs.getLong("Max(time)") * 1000, TimeLineController.getJodaTimeZone()),
                        type,
                        Arrays.asList(rs.getString("event_ids").split(",")),
                        rs.getString(descriptionColumn), lod);

                //put events in map from type/descrition -> event
                SetMultimap<String, AggregateEvent> descrMap = typeMap.get(type);
                if (descrMap == null) {
                    descrMap = HashMultimap.<String, AggregateEvent>create();
                    typeMap.put(type, descrMap);
                }
                descrMap.put(aggregateEvent.getDescription(), aggregateEvent);
            }

        } catch (SQLException ex) {
            Exceptions.printStackTrace(ex);
        } finally {
            try {
                rs.close();
            } catch (SQLException ex) {
                Exceptions.printStackTrace(ex);
            }
            dbReadUnlock();
        }

        //result list to return
        ArrayList<AggregateEvent> aggEvents = new ArrayList<>();

        //save this for use when comparing gap size
        Period timeUnitLength = rangeInfo.getPeriodSize().getPeriod();

        //For each (type, description) key, merge agg events
        for (SetMultimap<String, AggregateEvent> descrMap : typeMap.values()) {
            for (String descr : descrMap.keySet()) {
                //run through the sorted events, merging together adjacent events
                Iterator<AggregateEvent> iterator = descrMap.get(descr).stream()
                        .sorted((AggregateEvent o1, AggregateEvent o2)
                                -> Long.compare(o1.getSpan().getStartMillis(), o2.getSpan().getStartMillis()))
                        .iterator();
                AggregateEvent current = iterator.next();
                while (iterator.hasNext()) {
                    AggregateEvent next = iterator.next();
                    Interval gap = current.getSpan().gap(next.getSpan());

                    //if they overlap or gap is less one quarter timeUnitLength
                    //TODO: 1/4 factor is arbitrary. review! -jm
                    if (gap == null || gap.toDuration().getMillis() <= timeUnitLength.toDurationFrom(gap.getStart()).getMillis() / 4) {
                        //merge them
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.