Package org.openrdf.repository

Examples of org.openrdf.repository.RepositoryMetaData


      return false;
    }
    if (expr instanceof ExternalSet) {
      return false;
    }
    RepositoryMetaData md = owner.getRepository().getMetaData();
    int version = metadata.getSesameMajorVersion();
    if (version != 0 && version != md.getSesameMajorVersion()) {
      return false;
    }
    if (version != 0 && metadata.getSesameMinorVersion() != md.getSesameMinorVersion()) {
      return false;
    }
    for (QueryLanguage ql : md.getQueryLanguages()) {
      if (QueryModelSerializer.LANGUAGE.equals(ql)) {
        return true;
      }
    }
    return false;
View Full Code Here


    try {
      BeanInfo info = Introspector.getBeanInfo(RepositoryMetaData.class);
      PropertyDescriptor[] properties = info.getPropertyDescriptors();

      Repository repository = getRepository();
      RepositoryMetaData data = repository.getMetaData();
      URIFactory uf = repository.getURIFactory();
      LiteralFactory lf = repository.getLiteralFactory();

      URI subj = uf.createURI(getRequest().getResourceRef().toString(false, false));

      Model model = new LinkedHashModel();
      for (PropertyDescriptor p : properties) {
        Object o = p.getReadMethod().invoke(data);
        if (o instanceof Object[]) {
          for (Object e : (Object[])o) {
            add(model, subj, uf, p.getName(), lf, e);
          }
        }
        else {
          add(model, subj, uf, p.getName(), lf, o);
        }
      }

      for (Isolation isolation : Isolation.values()) {
        if (data.supportsIsolation(isolation)) {
          add(model, subj, uf, "supportsIsolation", lf, isolation);
        }
      }

      return new ModelRepresentation(model, factory, mediaType);
View Full Code Here

TOP

Related Classes of org.openrdf.repository.RepositoryMetaData

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.