Package org.openxri.store

Examples of org.openxri.store.Store


    }

    @Override
    protected void onSubmit() {

      final Store openXRIStore = ((OpenXRIAdminApplication) this.getApplication()).getOpenXRIStore();

      // find the authority

      Authority authority;
View Full Code Here


      Constructor oConstructor = oClass.getConstructor(oConstructorArgs);

      Object[] oArgs = new Object[1];
      oArgs[0] = oConfig.getStoreImplArgs();
      Store oImpl = (Store) oConstructor.newInstance(oArgs);

      oImpl.init();
     
      soLog.debug("Successfully constructed Store implementation.");

      return oImpl;
    }
View Full Code Here

    }

    @Override
    protected void onSubmit() {

      final Store openXRIStore = ((OpenXRIAdminApplication) this.getApplication()).getOpenXRIStore();

      // find authorities in store

      try {
View Full Code Here

  public Statistics() {

    this.setTitle(this.getString("title"));
    this.setModel(new CompoundPropertyModel(this));

    Store openXRIStore = ((OpenXRIAdminApplication) this.getApplication()).getOpenXRIStore();

    // get information out of the store

    try {
View Full Code Here

    }

    @Override
    protected void onSubmit() {

      final Store openXRIStore = ((OpenXRIAdminApplication) this.getApplication()).getOpenXRIStore();
      final Resolver resolver = ((OpenXRIAdminApplication) this.getApplication()).getResolver();

      try {

        SubSegment rootSubSegment = openXRIStore.createRootSubSegment(this.namespace, new XRD());

        CanonicalID canonicalID;
        Authority authority;

        try {

          authority = openXRIStore.getSubSegmentAuthority(rootSubSegment);

          XRDS xrds = resolver.resolveAuthority(new XRI(this.namespace), new ResolverFlags(), new ResolverState());
          XRD xrd = (xrds != null) ? xrds.getFinalXRD() : null;
          canonicalID = (xrd != null) ? xrd.getCanonicalID() : null;
        } catch (Exception ex) {

          log.warn("Cannot find corresponding i-number");
          canonicalID = null;
          authority = null;
        }

        if (canonicalID != null && authority != null && ! canonicalID.getValue().equals(this.namespace)) {

          XRD xrd = authority.getXrd();
          xrd.setCanonicalID(new CanonicalID(canonicalID.getValue()));

          ((StoreEditable) openXRIStore).setXrd(authority, xrd);
          openXRIStore.registerSubsegment(null, canonicalID.getValue(), authority);
        }
      } catch (StoreException ex) {

        CreateRootNamespace.log.error(ex);
        CreateRootNamespace.this.error(CreateRootNamespace.this._storefail + ex.getLocalizedMessage());
View Full Code Here

  public ListRootNamespaces() {

    this.setTitle(this.getString("title"));
    this.setModel(new CompoundPropertyModel(this));

    final Store openXRIStore = ((OpenXRIAdminApplication) this.getApplication()).getOpenXRIStore();

    // get information from the store

    this.subSegments = new Vector<SubSegment> ();
View Full Code Here

  public ListSubSegments() {
   
    this.setTitle(this.getString("title"));
    this.setModel(new CompoundPropertyModel(this));

    final Store openXRIStore = ((OpenXRIAdminApplication) this.getApplication()).getOpenXRIStore();

    // get information from the store

    this.subSegments = new Vector<SubSegment> ();
   
View Full Code Here

  private List<Authority> authorities;

  public ListAuthorities() {

    final Store openXRIStore = ((OpenXRIAdminApplication) this.getApplication()).getOpenXRIStore();

    this.setTitle(this.getString("title"));
    this.setModel(new CompoundPropertyModel(this));

    // get information from the store
View Full Code Here

      }

      @Override
      public void onSubmit() {

        final Store openXRIStore = ((OpenXRIAdminApplication) this.getApplication()).getOpenXRIStore();

        // reset the store

        try {
View Full Code Here

    if (! request.getPathInfo().replace("/", "").equals(LOAD_SAMPLE_DATA_PATH)) return(false);

    // load store with sample data

    Store store = (Store) ServerConfigFactory.getSingleton().getComponentRegistry().getComponent(Store.class);

    try {

      if (store instanceof StoreResettable) ((StoreResettable) store).resetStore();

      SubSegment rootSubSegment1 = store.createRootSubSegment("=example", new XRD());
      Authority rootAuthority1 = store.getSubSegmentAuthority(rootSubSegment1);
      SubSegment subSegment1 = store.registerSubsegment(rootAuthority1, "*name1", makeSampleXRD());
      SubSegment subSegment2 = store.registerSubsegment(rootAuthority1, "*name2", makeSampleXRD());

      SubSegment rootSubSegment2 = store.createRootSubSegment("@example", new XRD());
      Authority rootAuthority2 = store.getSubSegmentAuthority(rootSubSegment2);
      SubSegment subSegment3 = store.registerSubsegment(rootAuthority2, "*name3", makeSampleXRD());
      Authority authority3 = store.getSubSegmentAuthority(subSegment3);
      SubSegment subSegment4 = store.registerSubsegment(authority3, "*name4", makeSampleXRD());

    } catch (StoreException ex) {

      ex.printStackTrace();
    }
View Full Code Here

TOP

Related Classes of org.openxri.store.Store

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.