platform/org.ossmeter.repository.model/src/org/ossmeter/repository/model/License.java Diff Switch to side-by-side view
platform/org.ossmeter.repository.model/src/org/ossmeter/repository/model/MetricProvider.java Diff Switch to side-by-side view
platform/org.ossmeter.repository.model/src/org/ossmeter/repository/model/Project.java Diff Switch to side-by-side view
platform/org.ossmeter.repository.model/src/org/ossmeter/repository/model/ossmeter.ecore Diff Switch to side-by-side view
platform/org.ossmeter.repository.model/src/org/ossmeter/repository/model/ossmeter.emf Diff Switch to side-by-side view
tests/org.ossmeter.platform.tests/src/org/ossmeter/platform/tests/TestCachesCommunicationChannel.java Diff Switch to side-by-side view
tests/org.ossmeter.platform.tests/src/org/ossmeter/platform/tests/TestOtherTypesOfProjects.java Diff Switch to side-by-side view
tests/org.ossmeter.platform.vcs.svn.tests/src/org/ossmeter/platform/vcs/svn/tests/SvnManagerTests.java Diff Switch to side-by-side view
web/org.ossmeter.platform.client.api/src/org/ossmeter/platform/client/api/MetricsResource.java Diff Switch to side-by-side view
platform-extensions/org.ossmeter.repository.model.sourceforge/src/org/ossmeter/repository/model/sourceforge/MercurialRepository.java to platform-extensions/org.ossmeter.repository.model.eclipse/src/org/ossmeter/repository/model/eclipse/Wiki.java
--- a/platform-extensions/org.ossmeter.repository.model.sourceforge/src/org/ossmeter/repository/model/sourceforge/MercurialRepository.java +++ b/platform-extensions/org.ossmeter.repository.model.eclipse/src/org/ossmeter/repository/model/eclipse/Wiki.java @@ -1,20 +1,24 @@ -package org.ossmeter.repository.model.sourceforge; +package org.ossmeter.repository.model.eclipse; import com.mongodb.*; import java.util.*; import com.googlecode.pongo.runtime.*; +import com.googlecode.pongo.runtime.querying.*; -public class MercurialRepository extends org.ossmeter.repository.model.VcsRepository { +public class Wiki extends org.ossmeter.repository.model.CommunicationChannel { - public MercurialRepository() { + public Wiki() { super(); + super.setSuperTypes("org.ossmeter.repository.model.eclipse.CommunicationChannel"); } + + }
platform-extensions/org.ossmeter.repository.model.sourceforge/src/org/ossmeter/repository/model/sourceforge/SvnRepository.java to platform-extensions/org.ossmeter.repository.model.eclipse/src/org/ossmeter/repository/model/eclipse/Article.java
--- a/platform-extensions/org.ossmeter.repository.model.sourceforge/src/org/ossmeter/repository/model/sourceforge/SvnRepository.java +++ b/platform-extensions/org.ossmeter.repository.model.eclipse/src/org/ossmeter/repository/model/eclipse/Article.java @@ -1,24 +1,29 @@ -package org.ossmeter.repository.model.sourceforge; +package org.ossmeter.repository.model.eclipse; import com.mongodb.*; import java.util.*; import com.googlecode.pongo.runtime.*; +import com.googlecode.pongo.runtime.querying.*; -public class SvnRepository extends org.ossmeter.repository.model.VcsRepository { +public class Article extends Pongo { - public SvnRepository() { + public Article() { super(); + URL.setOwningType("org.ossmeter.repository.model.eclipse.Article"); } - public String getBrowse() { - return parseString(dbObject.get("browse")+"", ""); + public static StringQueryProducer URL = new StringQueryProducer("url"); + + + public String getUrl() { + return parseString(dbObject.get("url")+"", ""); } - public SvnRepository setBrowse(String browse) { - dbObject.put("browse", browse + ""); + public Article setUrl(String url) { + dbObject.put("url", url); notifyChanged(); return this; }
platform/org.ossmeter.repository.model/src/org/ossmeter/repository/model/Bugzilla.java to platform-extensions/org.ossmeter.repository.model.eclipse/src/org/ossmeter/repository/model/eclipse/Release.java
--- a/platform/org.ossmeter.repository.model/src/org/ossmeter/repository/model/Bugzilla.java +++ b/platform-extensions/org.ossmeter.repository.model.eclipse/src/org/ossmeter/repository/model/eclipse/Release.java @@ -1,4 +1,4 @@ -package org.ossmeter.repository.model; +package org.ossmeter.repository.model.eclipse; import com.mongodb.*; import java.util.*; @@ -6,38 +6,40 @@ import com.googlecode.pongo.runtime.querying.*; -public class Bugzilla extends BugTrackingSystem { +public class Release extends Pongo { - public Bugzilla() { + public Release() { super(); - super.setSuperTypes("org.ossmeter.repository.model.BugTrackingSystem"); - URL.setOwningType("org.ossmeter.repository.model.Bugzilla"); - PRODUCT.setOwningType("org.ossmeter.repository.model.Bugzilla"); - COMPONENT.setOwningType("org.ossmeter.repository.model.Bugzilla"); + TYPE.setOwningType("org.ossmeter.repository.model.eclipse.Release"); + DATE.setOwningType("org.ossmeter.repository.model.eclipse.Release"); } - public static StringQueryProducer URL = new StringQueryProducer("url"); - public static StringQueryProducer PRODUCT = new StringQueryProducer("product"); - public static StringQueryProducer COMPONENT = new StringQueryProducer("component"); + public static StringQueryProducer TYPE = new StringQueryProducer("type"); + public static StringQueryProducer DATE = new StringQueryProducer("date"); - public String getProduct() { - return parseString(dbObject.get("product")+"", ""); + public ReleaseType getType() { + ReleaseType type = null; + try { + type = ReleaseType.valueOf(dbObject.get("type")+""); + } + catch (Exception ex) {} + return type; } - public Bugzilla setProduct(String product) { - dbObject.put("product", product); + public Release setType(ReleaseType type) { + dbObject.put("type", type.toString()); notifyChanged(); return this; } - public String getComponent() { - return parseString(dbObject.get("component")+"", ""); + public String getDate() { + return parseString(dbObject.get("date")+"", ""); } - public Bugzilla setComponent(String component) { - dbObject.put("component", component); + public Release setDate(String date) { + dbObject.put("date", date); notifyChanged(); return this; }
platform/org.ossmeter.repository.model/src/org/ossmeter/repository/model/GitRepository.java to platform-extensions/org.ossmeter.repository.model.eclipse/src/org/ossmeter/repository/model/eclipse/EclipseNewsGroup.java
--- a/platform/org.ossmeter.repository.model/src/org/ossmeter/repository/model/GitRepository.java +++ b/platform-extensions/org.ossmeter.repository.model.eclipse/src/org/ossmeter/repository/model/eclipse/EclipseNewsGroup.java @@ -1,4 +1,4 @@ -package org.ossmeter.repository.model; +package org.ossmeter.repository.model.eclipse; import com.mongodb.*; import java.util.*; @@ -6,23 +6,33 @@ import com.googlecode.pongo.runtime.querying.*; -public class GitRepository extends VcsRepository { +public class EclipseNewsGroup extends org.ossmeter.repository.model.cc.nntp.NntpNewsGroup { - public GitRepository() { + public EclipseNewsGroup() { super(); - super.setSuperTypes("org.ossmeter.repository.model.VcsRepository"); - CREATED_AT.setOwningType("org.ossmeter.repository.model.GitRepository"); - UPDATED_AT.setOwningType("org.ossmeter.repository.model.GitRepository"); - URL.setOwningType("org.ossmeter.repository.model.GitRepository"); + super.setSuperTypes("org.ossmeter.repository.model.eclipse.NntpNewsGroup"); + TYPE.setOwningType("org.ossmeter.repository.model.eclipse.EclipseNewsGroup"); } - public static StringQueryProducer CREATED_AT = new StringQueryProducer("created_at"); - public static StringQueryProducer UPDATED_AT = new StringQueryProducer("updated_at"); - public static StringQueryProducer URL = new StringQueryProducer("url"); + public static StringQueryProducer TYPE = new StringQueryProducer("type"); + public NewsGroupType getType() { + NewsGroupType type = null; + try { + type = NewsGroupType.valueOf(dbObject.get("type")+""); + } + catch (Exception ex) {} + return type; + } + + public EclipseNewsGroup setType(NewsGroupType type) { + dbObject.put("type", type.toString()); + notifyChanged(); + return this; + }
platform/org.ossmeter.repository.model/src/org/ossmeter/repository/model/LicenseType.java to platform-extensions/org.ossmeter.repository.model.eclipse/src/org/ossmeter/repository/model/eclipse/ProjectStatus.java
--- a/platform/org.ossmeter.repository.model/src/org/ossmeter/repository/model/LicenseType.java +++ b/platform-extensions/org.ossmeter.repository.model.eclipse/src/org/ossmeter/repository/model/eclipse/ProjectStatus.java @@ -1,16 +1,12 @@ -package org.ossmeter.repository.model; +package org.ossmeter.repository.model.eclipse; -public enum LicenseType { +public enum ProjectStatus { - ApacheTwo, - GPL, - EPL, - GPL2, - GPL3, - LGPL, - MIT, - Mozilla, - BSD, - Other + prepoposal, + proposal, + incubation, + mature, + toplevel, + archived }
platform/org.ossmeter.repository.model/src/org/ossmeter/repository/model/NntpNewsGroup.java to platform-extensions/org.ossmeter.repository.model.cc.nntp/src/org/ossmeter/repository/model/cc/nntp/NntpNewsGroup.java
--- a/platform/org.ossmeter.repository.model/src/org/ossmeter/repository/model/NntpNewsGroup.java +++ b/platform-extensions/org.ossmeter.repository.model.cc.nntp/src/org/ossmeter/repository/model/cc/nntp/NntpNewsGroup.java @@ -1,4 +1,4 @@ -package org.ossmeter.repository.model; +package org.ossmeter.repository.model.cc.nntp; import com.mongodb.*; import java.util.*; @@ -6,23 +6,21 @@ import com.googlecode.pongo.runtime.querying.*; -public class NntpNewsGroup extends CommunicationChannel { +public class NntpNewsGroup extends org.ossmeter.repository.model.CommunicationChannel { public NntpNewsGroup() { super(); - super.setSuperTypes("org.ossmeter.repository.model.CommunicationChannel"); - URL.setOwningType("org.ossmeter.repository.model.NntpNewsGroup"); - AUTHENTICATIONREQUIRED.setOwningType("org.ossmeter.repository.model.NntpNewsGroup"); - USERNAME.setOwningType("org.ossmeter.repository.model.NntpNewsGroup"); - PASSWORD.setOwningType("org.ossmeter.repository.model.NntpNewsGroup"); - INTERVAL.setOwningType("org.ossmeter.repository.model.NntpNewsGroup"); - PORT.setOwningType("org.ossmeter.repository.model.NntpNewsGroup"); - LASTARTICLECHECKED.setOwningType("org.ossmeter.repository.model.NntpNewsGroup"); + super.setSuperTypes("org.ossmeter.repository.model.cc.nntp.CommunicationChannel"); + AUTHENTICATIONREQUIRED.setOwningType("org.ossmeter.repository.model.cc.nntp.NntpNewsGroup"); + USERNAME.setOwningType("org.ossmeter.repository.model.cc.nntp.NntpNewsGroup"); + PASSWORD.setOwningType("org.ossmeter.repository.model.cc.nntp.NntpNewsGroup"); + INTERVAL.setOwningType("org.ossmeter.repository.model.cc.nntp.NntpNewsGroup"); + PORT.setOwningType("org.ossmeter.repository.model.cc.nntp.NntpNewsGroup"); + LASTARTICLECHECKED.setOwningType("org.ossmeter.repository.model.cc.nntp.NntpNewsGroup"); } - public static StringQueryProducer URL = new StringQueryProducer("url"); public static StringQueryProducer AUTHENTICATIONREQUIRED = new StringQueryProducer("authenticationRequired"); public static StringQueryProducer USERNAME = new StringQueryProducer("username"); public static StringQueryProducer PASSWORD = new StringQueryProducer("password");
platform/org.ossmeter.repository.model/src/org/ossmeter/repository/model/SvnRepository.java to platform-extensions/org.ossmeter.repository.model.eclipse/plugin.xml
--- a/platform/org.ossmeter.repository.model/src/org/ossmeter/repository/model/SvnRepository.java +++ b/platform-extensions/org.ossmeter.repository.model.eclipse/plugin.xml @@ -1,30 +1,23 @@ -package org.ossmeter.repository.model; - -import com.mongodb.*; -import java.util.*; -import com.googlecode.pongo.runtime.*; -import com.googlecode.pongo.runtime.querying.*; +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<plugin> + -public class SvnRepository extends VcsRepository { - - - - public SvnRepository() { - super(); - super.setSuperTypes("org.ossmeter.repository.model.VcsRepository"); - CREATED_AT.setOwningType("org.ossmeter.repository.model.SvnRepository"); - UPDATED_AT.setOwningType("org.ossmeter.repository.model.SvnRepository"); - URL.setOwningType("org.ossmeter.repository.model.SvnRepository"); - } - - public static StringQueryProducer CREATED_AT = new StringQueryProducer("created_at"); - public static StringQueryProducer UPDATED_AT = new StringQueryProducer("updated_at"); - public static StringQueryProducer URL = new StringQueryProducer("url"); - - - - - - -}+ + + + + + +<extension point="com.googlecode.pongo.runtime.osgi"> + <class name="org.ossmeter.repository.model.eclipse.EclipseProject"/> + <class name="org.ossmeter.repository.model.eclipse.EclipsePlatform"/> + <class name="org.ossmeter.repository.model.eclipse.Release"/> + <class name="org.ossmeter.repository.model.eclipse.Article"/> + <class name="org.ossmeter.repository.model.eclipse.EclipseNewsGroup"/> + <class name="org.ossmeter.repository.model.eclipse.MailingList"/> + <class name="org.ossmeter.repository.model.eclipse.Wiki"/> + <class name="org.ossmeter.repository.model.eclipse.Documentation"/> + <class name="org.ossmeter.repository.model.eclipse.Review"/> + </extension> +</plugin>
platform/org.ossmeter.repository.model/src/org/ossmeter/repository/model/ossmeter-davide.emf to platform-extensions/org.ossmeter.repository.model.eclipse/src/org/ossmeter/repository/model/eclipse/eclipse.emf
--- a/platform/org.ossmeter.repository.model/src/org/ossmeter/repository/model/ossmeter-davide.emf +++ b/platform-extensions/org.ossmeter.repository.model.eclipse/src/org/ossmeter/repository/model/eclipse/eclipse.emf @@ -1,86 +1,121 @@ -package org.ossmeter.repository.model; - - -@db -class ProjectRepository extends NamedElement{ - val Project[*] projects; - val License[*] licenses; -} - -abstract class NamedElement { - @searchable - attr String name; -} - -abstract class Project extends NamedElement { - attr String description; - attr int year; - attr boolean active; - val VcsRepository[*] vcsRepositories; - val CommunicationChannel[*] communicationChannels; - val BugTrackingSystem[*] bugTrackingSystems; -// val Person[*] persons; - val License[*] licenses; -// val NntpNewsGroup[*] newsgroups; - val LocalStorage storage; -} - -@customize -class LocalStorage { +package org.ossmeter.repository.model.eclipse; + +@stub(javaClass="org.ossmeter.repository.model.Project") +class Project { + +} + +@stub(javaClass="org.ossmeter.repository.model.NamedElement") +class NamedElement { + +} + +@stub(javaClass="org.ossmeter.repository.model.Person") +class Person { + +} + +@stub(javaClass="org.ossmeter.repository.model.CommunicationChannel") +abstract class CommunicationChannel { + +} + +@stub(javaClass="org.ossmeter.repository.model.cc.nntp.NntpNewsGroup") +class NntpNewsGroup { + +} + +class EclipseProject extends Project { + attr String shortName; + attr String paragraphUrl; + attr String descriptionUrl; + attr String downloadsUrl; + attr String homePage; + attr String projectplanUrl; + attr String updatesiteUrl; + attr ProjectStatus status; + ref EclipseProject[1] parent; + ref EclipsePlatform[*] platforms; -} - -//class NntpNewsGroup extends CommunicationChannel{ -// @searchable -// attr String host; -// @searchable -// attr String url; -// attr String usr; -// attr String pass; -//} - -abstract class VcsRepository { - attr String created_at; - attr String updated_at; - attr String url; -} - -class SvnRepository extends VcsRepository { -} - -class GitRepository extends VcsRepository { -} - -abstract class BugTrackingSystem { - attr String url; -} - -abstract class CommunicationChannel { - attr String url; -} - -abstract class Person extends NamedElement { - attr String homePage; - attr String email; -} - - -class License { - attr String name; - attr String url; -} - -//class LicenseType { - // ApacheTwo = 1; - // GPL = 2; - // EPL = 3; - // GPL2 = 4; - // GPL3 = 5; - // LGPL = 6; - // MIT = 7; - // Mozilla = 8; - // BSD = 9; - // Other = 10; -// attr String name; -// attr String url; -//} +//Probably the following references should be dropped and in case considerd by specific metric providers + val Person[*] committers; + val Person[*] leaders; + val Person[*] mentors; + val Review[*] reviews; + val Article[*] articles; + val Release[*] releases; +} + +//E.g., Ganymede, Galileo, Helios, Indigo, Juno, Kepler, Luna, ... +class EclipsePlatform extends NamedElement { + +} + +enum ProjectStatus { + prepoposal = 0; + proposal = 1; + incubation = 2; + mature = 3; + toplevel = 4; + archived = 5; +} + +class Release { + attr ReleaseType type; + attr String date; +} + +class Article { + attr String url; +} + +class EclipseNewsGroup extends NntpNewsGroup { + attr NewsGroupType type; +} + +class MailingList extends CommunicationChannel{ + attr String name; + attr String description; + attr MailingListType type; +} + +class Wiki extends CommunicationChannel{ + +} + +class Documentation extends CommunicationChannel{ + +} + +class Review { + attr ReviewType type; + attr ReviewState state; + attr String endDate; +} + +enum NewsGroupType { + main = 0; +} + +enum MailingListType { + main = 0; +} + +enum ReviewType { + creation = 0; + graduation = 1; + release = 2; + promotion = 3; + continuation = 4; + termination = 5; +} + +enum ReviewState { + successful = 0; +} + +enum ReleaseType { + scheduled = 0; + completed = 1; + tentative = 2; +}