Package edu.mit.simile.fresnel.util

Examples of edu.mit.simile.fresnel.util.RDFList


      if (facetI.hasNext()) {
        Statement facetStmt = (Statement) facetI.next();
        Value facetsNode = facetStmt.getObject();
        if (facetI.hasNext()) throw new UnresolvableException("More than one :facets value available");
        if (facetsNode instanceof Resource && RDFList.isRDFList(source, (Resource) facetsNode)) {
          RDFList facetRDFList = new RDFList(source, (Resource) facetsNode);
          if (facetRDFList.isValid()) {
            for (Iterator listI = facetRDFList.iterator(); listI.hasNext(); ) {
              Resource facetNode = (Resource) listI.next();
              Facet facet = new Facet(facetNode);
              out.addFacet(facet);
            }
          } else {
            throw new ParsingException(facetsNode.toString() + "is not a valid rdf:List");
          }
        }
      }
      facetI.close();

            RepositoryResult<Statement> hidesI = conn.getStatements(focus, Facets.hides, (Value) null, false);
      if (hidesI.hasNext()) {
        Statement facetStmt = hidesI.next();
        Value facetsNode = facetStmt.getObject();
        if (hidesI.hasNext()) throw new UnresolvableException("More than one :hides value available");
        if (facetsNode instanceof Resource && RDFList.isRDFList(source, (Resource) facetsNode)) {
          RDFList facetRDFList = new RDFList(source, (Resource) facetsNode);
          if (facetRDFList.isValid()) {
            for (Iterator listI = facetRDFList.iterator(); listI.hasNext(); ) {
              Resource facetNode = (Resource) listI.next();
              Facet facet = new Facet(facetNode);
              out.addHide(facet);
            }
          } else {
View Full Code Here


        if (typeI.hasNext()) {
          Statement typeStmt = typeI.next();
          Value typesNode = typeStmt.getObject();
          if (typeI.hasNext()) throw new UnresolvableException("More than one :types value available");
          if (typesNode instanceof Resource && RDFList.isRDFList(source, (Resource) typesNode)) {
            RDFList typeRDFList = new RDFList(source, (Resource) typesNode);
            if (typeRDFList.isValid()) {
              for (Iterator listI = typeRDFList.iterator(); listI.hasNext(); ) {
                Resource typeNode = (Resource) listI.next();
                out.addType(typeNode);
              }
            } else {
              throw new ParsingException(typesNode.toString() + "is not a valid rdf:List");
View Full Code Here

            Container con = new Container(in, selected);
            for (Iterator it = con.iterator(); it.hasNext(); ) {
                statements.add(new StatementImpl(selected, mem, (Value) it.next()));
            }
        } else if (RDFList.isRDFList(in, selected)) {
            List list = new RDFList(in, selected).asJavaList();
            for (Iterator it = list.iterator(); it.hasNext(); ) {
                statements.add(new StatementImpl(selected, mem, (Value) it.next()));
            }
        }
        return statements.iterator();
View Full Code Here

            if (showI.hasNext()) {
              Statement showStmt = showI.next();
              Value showsNode = showStmt.getObject();
              if (showI.hasNext()) throw new UnresolvableException("More than one :showProperties value available");
              if (showsNode instanceof Resource && RDFList.isRDFList(in, (Resource) showsNode)) {
                RDFList showsRDFList = new RDFList(in, (Resource) showsNode);
                if (showsRDFList.isValid()) {
                  setShowProperties(PropertySet.showParse(this, in, showsRDFList, conf));
                } else {
                  throw new ParsingException(showsNode.toString() + "is not a valid rdf:List");
                }
              } else {
                addShowProperty(PropertySet.showPropertyParse(this, in, showsNode, conf));
              }
            }
          } finally {
            showI.close();
          }

          // Parse the property hiding selections
            RepositoryResult<Statement> hideI = conn.getStatements(selected, FresnelCore.hideProperties, (Value) null, false);
          try {
            if (hideI.hasNext()) {
              Statement hideStmt = (Statement) hideI.next();
              Value hidesNode = hideStmt.getObject();
              if (hideI.hasNext()) throw new UnresolvableException("More than one :hideProperties value available");
              if (hidesNode instanceof Resource && RDFList.isRDFList(in, (Resource) hidesNode)) {
                RDFList hidesRDFList = new RDFList(in, (Resource) hidesNode);
                if (hidesRDFList.isValid()) {
                  setHideProperties(PropertySet.hideParse(this, in, hidesRDFList, conf));
                } else {
                  throw new ParsingException(hidesNode.toString() + "is not a valid rdf:List");
                }
              } else {
View Full Code Here

      if (groupPrimaries.hasNext()) {
        Statement primaryStmt = groupPrimaries.next();
        if (groupPrimaries.hasNext()) throw new UnresolvableException("Too many fresnel:primaryClass predicates used, only one expected.");
        Value primaryObj = primaryStmt.getObject();
        if (primaryObj instanceof Resource && RDFList.isRDFList(in, (Resource) primaryObj)) {
          List primaries = new RDFList(in, (Resource) primaryObj).asJavaList();
          Iterator primaryDomains = primaries.iterator();
          while (primaryDomains.hasNext()) {
            Value domainNode = (Value) primaryDomains.next();
            ISelector domain = null;
            if (domainNode instanceof Resource) {
View Full Code Here

TOP

Related Classes of edu.mit.simile.fresnel.util.RDFList

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.