Codota Logo
NameProvider.addMemberName
Code IndexAdd Codota to your IDE (free)

How to use
addMemberName
method
in
org.ldp4j.example.NameProvider

Best Java code snippets using org.ldp4j.example.NameProvider.addMemberName (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: ldp4j/ldp4j

@SuppressWarnings("unchecked")
@Test
public void testMemberNameLifecycle() {
  Name<String> owner = name("test");
  NameProvider sut = NameProvider.create(owner);
  sut.addMemberName(name("m1"));
  sut.addMemberName(name("m2"));
  assertThat(sut.pendingMemberNames(),contains(name("m1"),name("m2")));
  assertThat(sut.nextMemberName(),equalTo(name("m1")));
  assertThat(sut.pendingMemberNames(),contains(name("m2")));
  assertThat(sut.nextMemberName(),equalTo(name("m2")));
  assertThat(sut.pendingMemberNames(),hasSize(0));
  try {
    sut.nextMemberName();
    fail("Should not provide member names if not available");
  } catch (ApplicationRuntimeException e) {
    assertThat(e.getMessage(),equalTo("No more member names available for resource 'test'"));
  }
}
origin: ldp4j/ldp4j

@SuppressWarnings("unchecked")
@Test
public void testCreate$happyPath() throws Exception {
  BookContainerHandler containerHandler = new BookContainerHandler();
  BookHandler resourceHandler=new BookHandler();
  final Name<String> containerName = name("container");
  final NameProvider provider = NameProvider.create(containerName);
  final Name<String> memberName = name("resource");
  provider.addMemberName(memberName);
  containerHandler.addNameProvider(provider.owner(),provider);
  containerHandler.setBookHandler(resourceHandler);
  final DataSet data = DataSets.createDataSet(memberName);
  new Expectations() {{
    snapshot.name();result=containerName;
    memberSnapshot.name();result=memberName;
  }};
  containerHandler.create(snapshot, data, session);
  assertThat(provider.pendingMemberNames(),not((contains(memberName))));
  assertThat(resourceHandler.get(memberSnapshot),sameInstance(data));
}
origin: ldp4j/ldp4j

final NameProvider provider = NameProvider.create(containerName);
final Name<String> memberName = name("resource");
provider.addMemberName(memberName);
containerHandler.addNameProvider(provider.owner(),provider);
containerHandler.setBookHandler(resourceHandler);
origin: ldp4j/ldp4j

nameProvider.addMemberName(id);
org.ldp4j.exampleNameProvideraddMemberName

Javadoc

Add a member name to the list of available member names.

Popular methods of NameProvider

  • create
    Create a new name provider.
  • nextMemberName
    Return the next available member name. The name will be removed from the list of available member na
  • <init>
  • addAttachmentName
    Add a name to the list of available names for a given attachment.
  • addResourceName
    Add a resource name to the list of available resource names.
  • nameSource
  • nextAttachmentName
    Return the next available name for a given attachment. The name will be removed from the list of ava
  • nextResourceName
    Return the next available resource name. The name will be removed from the list of available resourc
  • owner
    Return the name of the owner of the name provider.
  • pendingAttachmentNames
    Return the pending names for the specified attachment.
  • pendingMemberNames
    Return the pending member names.
  • pendingResourceNames
    Return the pending resource names.
  • pendingMemberNames,
  • pendingResourceNames

Popular in Java

  • Finding current android device location
  • setContentView (Activity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • startActivity (Activity)
  • String (java.lang)
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
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