com.graphaware.relcount.full.internal.dto.relationship.WildcardRelationshipDescription 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.internal.dto.relationship;
import com.graphaware.propertycontainer.dto.common.relationship.HasTypeDirectionAndProperties;
import com.graphaware.propertycontainer.dto.string.relationship.BaseSerializableDirectedRelationship;
import com.graphaware.relcount.full.internal.dto.property.PropertiesDescription;
import com.graphaware.relcount.full.internal.dto.property.WildcardPropertiesDescription;
import java.util.Map;
/**
* A {@link RelationshipDescription} in which a missing property is treated as a wildcard ("any") as opposed
* to "undefined".
*/
public class WildcardRelationshipDescription extends BaseSerializableDirectedRelationship implements RelationshipDescription {
/**
* Construct a description from a string.
*
* @param string string to construct description from. Must be of the form prefix + type#direction#key1#value1#key2#value2
* (assuming # separator).
* @param prefix of the string that should be removed before conversion.
* @param separator of information, ideally a single character, must not be null or empty.
*/
public WildcardRelationshipDescription(String string, String prefix, String separator) {
super(string, prefix, separator);
}
/**
* Construct a description from another one.
*
* @param relationship relationships representation.
*/
public WildcardRelationshipDescription(HasTypeDirectionAndProperties relationship) {
super(relationship);
}
/**
* {@inheritDoc}
*/
@Override
protected PropertiesDescription newProperties(Map properties) {
return new WildcardPropertiesDescription(properties);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy