Codota Logo
ResourceRepository.containerOfId
Code IndexAdd Codota to your IDE (free)

How to use
containerOfId
method
in
org.ldp4j.application.kernel.resource.ResourceRepository

Best Java code snippets using org.ldp4j.application.kernel.resource.ResourceRepository.containerOfId (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: ldp4j/ldp4j

  @Override
  public void execute(ResourceRepository sut) {
    Resource result1 = sut.resourceOfId(resourceId);
    debug("Retrieving resource {%s}: %s",resourceId,result1);
    Container result2 = sut.containerOfId(containerId);
    debug("Retrieving container {%s}: %s",containerId,result2);
    Resource result3 = sut.resourceById(memberId,Resource.class);
    debug("Retrieving member resource {%s}: %s",memberId,result3);
  }
}
origin: ldp4j/ldp4j

Resource createResource(Endpoint endpoint, DataSet dataSet, String desiredPath) throws ApplicationExecutionException {
  ResourceId resourceId=endpoint.resourceId();
  Container resource = this.resourceRepository.containerOfId(resourceId);
  if(resource==null) {
    String errorMessage = applicationFailureMessage(COULD_NOT_FIND_CONTAINER_FOR_ENDPOINT,endpoint);
    LOGGER.error(errorMessage);
    throw new ApplicationExecutionException(errorMessage);
  }
  try {
    WriteSessionConfiguration config=
      DefaultApplicationContextHelper.
        create(this.engine().templateManagementService()).
          createConfiguration(resource,dataSet,desiredPath,lastModified());
    return this.engine().resourceControllerService().createResource(resource,dataSet,config);
  } catch (FeatureExecutionException e) {
    processConstraintValidationFailure(resource, e);
    String errorMessage = applicationFailureMessage(RESOURCE_CREATION_FAILED,endpoint);
    throw createException(errorMessage,e);
  } catch (InvalidIndirectIdentifierException e) {
    // Just rethrow
    throw e;
  } catch (Exception e) {
    String errorMessage = applicationFailureMessage(RESOURCE_CREATION_FAILED,endpoint);
    throw createException(errorMessage,e);
  }
}
origin: ldp4j/ldp4j

  @Override
  public void execute(ResourceRepository sut) {
    Resource result1 = sut.resourceOfId(resourceId);
    debug("Retrieving resource {%s}: %s",resourceId,result1);
    Container result2 = sut.containerOfId(containerId);
    debug("Retrieving container {%s}: %s",containerId,result2);
    Resource result3 = sut.resourceById(memberId,Resource.class);
    debug("Retrieving member resource {%s}: %s",memberId,result3);
    Resource result4 = sut.resourceById(attachmentId,Resource.class);
    debug("Retrieving attached resource {%s}: %s",attachmentId,result4);
    ConstraintReport report = result1.addConstraintReport(null,new Date(),httpRequest());
    debug("Created report {%s}",report.id());
  }
}
origin: ldp4j/ldp4j

  @Override
  public void execute(ResourceRepository sut) {
    Resource result1 = sut.resourceOfId(resourceId);
    debug("Retrieving resource {%s}: %s",resourceId,result1);
    Resource attachment = result1.attach(PersonHandler.ADDRESS_ID,attachmentId);
    sut.add(attachment);
    debug("Created attachment: %s",attachment);
    Container result2 = sut.containerOfId(containerId);
    debug("Retrieving container {%s}: %s",containerId,result2);
    Slug slug1=result2.addSlug("test");
    debug("Created slug: %s",slug1);
    Slug slug2=result2.addSlug("anotherTest");
    debug("Created slug: %s",slug2);
    Resource member = result2.addMember(memberId);
    sut.add(member);
    debug("Created member: %s",member);
  }
}
origin: ldp4j/ldp4j

  @Override
  public void execute(ResourceRepository sut) {
    Resource result1 = sut.resourceOfId(resourceId);
    debug("Retrieving resource {%s}: %s",resourceId,result1);
    Container result2 = sut.containerOfId(containerId);
    debug("Retrieving container {%s}: %s",containerId,result2);
    Resource result3 = sut.resourceById(memberId,Resource.class);
    debug("Retrieving member resource {%s}: %s",memberId,result3);
    sut.remove(result2);
    debug("Deleted resource {%s}",result2.id());
    Resource result4 = sut.resourceById(attachmentId,Resource.class);
    debug("Retrieving attached resource {%s}: %s",attachmentId,result4);
    Attachment attachment = result1.findAttachment(result4.id());
    debug("Retrieving attachment {%s}: %s",result4.id(),attachment);
    result1.detach(attachment);
    debug("Detached resource {%s}",attachment.id());
    sut.remove(result4);
    debug("Deleted resource {%s}",result4.id());
  }
}
org.ldp4j.application.kernel.resourceResourceRepositorycontainerOfId

Popular methods of ResourceRepository

  • add
  • remove
  • resourceById
  • resourceOfId

Popular in Java

  • Finding current android device location
  • getContentResolver (Context)
  • onCreateOptionsMenu (Activity)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
  • BoxLayout (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
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