Refactor Argeo API
[gpl/argeo-slc.git] / org.argeo.slc.api / src / org / argeo / slc / CategoryNameVersion.java
diff --git a/org.argeo.slc.api/src/org/argeo/slc/CategoryNameVersion.java b/org.argeo.slc.api/src/org/argeo/slc/CategoryNameVersion.java
deleted file mode 100644 (file)
index b335996..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.argeo.slc;
-
-/**
- * Adds a dimension to {@link NameVersion} by adding an arbitrary category (e.g.
- * Maven groupId, yum repository ID, etc.)
- */
-public interface CategoryNameVersion extends NameVersion {
-       /** The category of the component. */
-       String getCategory();
-
-       static CategoryNameVersion parseCategoryNameVersion(String str) {
-               if (str == null || "".equals(str.trim()))
-                       throw new IllegalArgumentException("At least one character required.");
-               String[] arr = str.trim().split(":");
-               if (arr.length > 3)
-                       throw new IllegalArgumentException(str + " does not respect the [category]:[name]:[version] pattern");
-               DefaultCategoryNameVersion res = new DefaultCategoryNameVersion();
-               res.setCategory(arr[0]);
-               if (arr.length > 1)
-                       res.setName(arr[1]);
-               if (arr.length > 2)
-                       res.setVersion(arr[2]);
-               return res;
-       }
-}