Codota Logo
Site.getHandle
Code IndexAdd Codota to your IDE (free)

How to use
getHandle
method
in
org.dspace.content.Site

Best Java code snippets using org.dspace.content.Site.getHandle (Showing top 10 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: DSpace/DSpace

@Override
public String generateIdentifier(Context context, int type, UUID id,
                 String handle, List<String> identifiers) throws SQLException {
  if (type == Constants.SITE) {
    return handleService.getCanonicalForm(siteService.findSite(context).getHandle());
  }
  if (type == Constants.COMMUNITY
    || type == Constants.COLLECTION
    || type == Constants.ITEM) {
    if (StringUtils.isEmpty(handle)) {
      throw new IllegalArgumentException("Handle is null");
    }
    log.debug("Generated identifier "
           + handleService.getCanonicalForm(handle) + " for "
           + Constants.typeText[type] + " " + id.toString() + ".");
    return handleService.getCanonicalForm(handle);
  }
  return null;
}
origin: DSpace/DSpace

public void consumeSite(Context ctx, Event event) throws SQLException {
  if (event.getEventType() == Event.ADD
    || event.getEventType() == Event.REMOVE
    || event.getEventType() == Event.MODIFY
    || event.getEventType() == Event.MODIFY_METADATA) {
    Site site = siteService.findSite(ctx);
    DSOIdentifier id = new DSOIdentifier(Constants.SITE,
                       site.getID(), site.getHandle(), Arrays.asList(site.getHandle()));
    if (!this.toConvert.contains(id)) {
      this.toConvert.add(id);
    }
    return;
  }
  log.warn("Got an unexpected Event for the SITE. Event type is "
         + event.getEventTypeAsString() + ", ignoring.");
}
origin: DSpace/DSpace

@Override
public String generateIdentifier(Context context, int type, UUID id,
                 String handle, List<String> identifiers)
  throws SQLException {
  String urlPrefix = DSpaceServicesFactory.getInstance().getConfigurationService()
                      .getProperty(RDFUtil.CONTEXT_PATH_KEY) + "/resource/";
  if (type == Constants.SITE) {
    return urlPrefix + siteService.findSite(context).getHandle();
  }
  if (type == Constants.COMMUNITY
    || type == Constants.COLLECTION
    || type == Constants.ITEM) {
    if (StringUtils.isEmpty(handle)) {
      throw new IllegalArgumentException("Handle is null");
    }
    return urlPrefix + handle;
  }
  return null;
}
origin: DSpace/DSpace

/**
 * Generate a list of metadata elements for the given DSpace
 * site.
 *
 * @param site The site to derive metadata from
 * @return list of metadata
 */
protected List<MockMetadataValue> site2Metadata(Site site) {
  List<MockMetadataValue> metadata = new ArrayList<>();
  String identifier_uri = handleService.getCanonicalPrefix()
    + site.getHandle();
  String title = site.getName();
  String url = site.getURL();
  if (identifier_uri != null) {
    metadata.add(createDCValue("identifier.uri", null, identifier_uri));
  }
  //FIXME: adding two URIs for now (site handle and URL), in case site isn't using handles
  if (url != null) {
    metadata.add(createDCValue("identifier.uri", null, url));
  }
  if (title != null) {
    metadata.add(createDCValue("title", null, title));
  }
  return metadata;
}
origin: DSpace/DSpace

repo.setId(site.getID().toString());
repo.setName(site.getName());
repo.setHandle(site.getHandle());
List<Community> dspaceCommunities = communityService.findAllTop(context);
processCommunity(context, repo, dspaceCommunities);
origin: DSpace/DSpace

  curator.curate(c, ContentServiceFactory.getInstance().getSiteService().findSite(c).getHandle());
} else {
  curator.curate(c, idName);
origin: DSpace/DSpace

String ownerHdl = null;
if (CollectionUtils.isEmpty(parentCommunities)) {
  ownerHdl = siteService.findSite(context).getHandle();
} else {
  ownerHdl = parentCommunities.get(0).getHandle();
dc.add(makeDC("identifier", "uri", "hdl:" + site.getHandle()));
dc.add(makeDC("identifier", "uri", site.getURL()));
origin: DSpace/DSpace

Site site = (Site) dso;
String identifier_uri = "hdl:" + site.getHandle();
String title = site.getName();
String url = site.getURL();
origin: DSpace/DSpace

Name name = new Name();
name.getContent()
  .add(new PCData(siteService.findSite(context).getHandle()));
agent.getContent().add(name);
metsHdr.getContent().add(agent);
origin: DSpace/DSpace

List<Community> parents = ((Community) dso).getParentCommunities();
if (CollectionUtils.isEmpty(parents)) {
  parentHandle = siteService.findSite(context).getHandle();
} else {
  parentHandle = parents.get(0).getHandle();
org.dspace.contentSitegetHandle

Popular methods of Site

  • getID
  • getName
  • <init>
    Protected constructor, create object using: org.dspace.content.service.SiteService#createSite(Contex
  • clearDetails
  • clearModified
  • getDetails
  • getSiteService
  • getSitename
  • getType
    Get the type of this object, found in Constants
  • getURL
  • isMetadataModified
  • isModified
  • isMetadataModified,
  • isModified

Popular in Java

  • Start an intent from android
  • addToBackStack (FragmentTransaction)
  • getExternalFilesDir (Context)
  • getSharedPreferences (Context)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now