language
The language constraint restricst the programming language of used to
write the components that will be returned in a search. For example the
query:
calculator lang:java
returns components called calculator written in java.
Currently the following languages are directly supported:
- Java
- C++
- C#
type
The type constraint restricts the components returned in a search to a
specific type of program unit. Four values are currently supported for this
constraint: class, interface, service and enum. class returns components
that are classes, interface returns components that are interfaces, service
returns components that are web services and enum returns components that
are enumerations. For example, the query:
CurrencyConverter(
convert(currency,currency):double;
) type:class
will search for classes called CurrencyConverter that have two "in"
parameters of type Currency and an "out" parameter or return value of
type double.
kind
The kind constraint restricts the components returned in a search to those
that play a specific logical role or represent a specific kind of
abstraction. Six values are currently supported for this constraint: ejb,
applet, application, midlet, testcase and servlet. ejb returns components
which represent EJBs (Enterprise Java Beans), applet returns components
which are applets, application delivers results that are applications
(i.e. that contain a main method), midlet returns components which
constitute midlets, testcase returns components which represent testcases
written according to a testing framework such as JUnit or NUnit, and
servlet returns components which represent servlets. For example,
the query:
Mortgage kind:applet
will return components named "Mortgage" which are applets.
license
The license constraint restricts a search to components with a specific
license. The name of the license is a free test string. Thus, the query:
license:"general public license"
will return components that are under the GPL license.
lictype
The lictype constraint restricts a search to components whose license
provides certain degrees of freedom in how they can be used. The specific
name of a license is usually not of interest, but the general degree of
freedom that it provides is. For example, a user might wish to avoid
licenses with a strong copyleft (such as the GPL). Using the lictype
constraint searches can be restricted to components whose license fits
into one of five broad groups, with decreasingly stringent requirements
for adherence to the copyleft principle:
| Constraint value |
Property |
| strong |
strong copyleft requirements |
| weak |
week copyleft requirements |
| options |
certain options allowed |
| privileges |
certain privileges allowed |
| without |
no copyleft requirements of any kind |
| no |
no license at all |
The constraint values are ordered in terms of increasing levels of
copyleft requirements. A search for stronger copyleft requirements always
includes results that have weaker copyleft requirements.
Thus, the query
lictype:options
will also return results whose licenses belong in the groups "privileges",
"without" or "no". This constraint cannot be combined with
NOT (i.e. -lictype).
namespace
The namespace constraint restricts a search to components within a
particular namespace. The name of the namespace is a free text string.
For example:
stack namespace:utility
will returns components named Stack in the namespace (or package)
"utility". The constraints namespace and package have the
same meaning.
project
The project constraint restricts a search to components within a
particular project. The name of the project is a free text string.
Thus to constrain a search to the Eclipse project, for example, use the
following constraint:
astparser project:eclipse
This query will return AstParser components contained in the Eclipse IDE.
url
The url constraint restricts a search to components at a particular URL
(usually just one component) or to components that contain a given string in
the URL in case where we discovered them. Thus the actual constraint is a free text
string and the query:
url:parser
will return components that contain the string parser somewhere in their URL.
host
While the url constraint takes the whole URL into account, the host
constraint restricts a search to components hosted on a particular server.
The name of the site is a free test string. Thus, the query
host:dev.java.net
will only return components that are hosted at dev.java.net.
Module Lookup
To go to the merobase details page of a source component, such as a
java class, simply type in the full name of the component,
including all encapsulating packages. Merobase will take you to the
details page for the component, from where you can obtain information
such as metrics and a javadoc description.
Web Service Lookup
To go to the merobase details page for a web service simply type in the
full URI of the web service. Merobase will take you to the web services
details page from where you can obtain various kinds of information about
the service and can execute it.
JAR Lookup
To find the JAR library that contains a particular class (to address a
ClassNotFoundException, for example,) simply enter the "findjar"
constraint followed by the fully qualified name of that class.Merobase will
return a list of JAR files that contains that class. For example,
by entering org.apache.lucene.search.Query after "findjar" you will
obtain all jar files containing this class.
Javadoc Lookup
To find the Javadoc description of a component simply type in the
constraint "javadoc" followed by the full name of the component
including encapsulating packages. For example, by entering
java.util.Stack after "javadoc" will direct merobase to
return the javadoc page for the Stack class in Java’s util package