Enum MappingCardinality

    • Method Detail

      • values

        public static MappingCardinality[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MappingCardinality c : MappingCardinality.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MappingCardinality valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getInverse

        public MappingCardinality getInverse()
        Gets the inverse of this cardinality (i.e., "1:n" -> "n:1").
        Returns:
        The inverse cardinality (may be identical, e.g. for "1:1").
      • fromString

        public static MappingCardinality fromString​(String v)
        Parses a string into a mapping cardinality enum value.
        Parameters:
        v - The string to parse.
        Returns:
        The corresponding enumeration value, of null if the provided string does not match any mapping cardinality.
      • inferCardinality

        @Deprecated
        public static void inferCardinality​(List<Mapping> mappings)
        Deprecated.
        Infers the cardinality for all mappings in the given list. This overrides any cardinality information that may already be stored in each mapping.
        Parameters:
        mappings - The mappings for which to infer cardinality.
      • getSubject

        @Deprecated
        public static String getSubject​(Mapping mapping)
        Deprecated.
        Gets a string representing the subject that can be used for cardinality computation. The returned value takes into account the subject_id (or the subject_label if the subject is a literal) and the subject_type.
        Parameters:
        mapping - The mapping from which to derive a subject string.
        Returns:
        A string that can be used to compare subjects across mappings.
      • getObject

        @Deprecated
        public static String getObject​(Mapping mapping)
        Deprecated.
        Gets a string representing the object that can be used for cardinality computation. The returned value takes into account the object_id (or the object_label if the object is a literal) and the object_type.
        Parameters:
        mapping - The mapping from which to derive an object string.
        Returns:
        A String that can be used to compare objects across mappings.