All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.graphaware.relcount.full.counter.BaseFullRelationshipCounter Maven / Gradle / Ivy

/*
 * Copyright (c) 2013 GraphAware
 *
 * This file is part of GraphAware.
 *
 * GraphAware is free software: you can redistribute it and/or modify it under the terms of
 * the GNU General Public License as published by the Free Software Foundation, either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 *  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details. You should have received a copy of
 * the GNU General Public License along with this program.  If not, see
 * .
 */

package com.graphaware.relcount.full.counter;

import com.graphaware.propertycontainer.dto.common.relationship.BaseDirectedRelationship;
import com.graphaware.propertycontainer.dto.string.property.CopyMakingSerializableProperties;
import com.graphaware.propertycontainer.dto.string.property.CopyMakingSerializablePropertiesImpl;
import org.neo4j.graphdb.Direction;
import org.neo4j.graphdb.RelationshipType;

import java.util.Map;

/**
 * Base-class for {@link FullRelationshipCounter} implementations.
 */
public abstract class BaseFullRelationshipCounter extends BaseDirectedRelationship> {

    /**
     * Construct a new relationship counter.
     *
     * @param type      type of the relationships to count.
     * @param direction direction of the relationships to count.
     */
    protected BaseFullRelationshipCounter(RelationshipType type, Direction direction) {
        super(type, direction);
    }

    /**
     * Construct a counter.
     *
     * @param type       type.
     * @param direction  direction.
     * @param properties props.
     */
    protected BaseFullRelationshipCounter(RelationshipType type, Direction direction, CopyMakingSerializableProperties properties) {
        super(type, direction, properties);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected CopyMakingSerializableProperties newProperties(Map properties) {
        return new CopyMakingSerializablePropertiesImpl(properties);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy