Examples of NotUniqueException


Examples of com.hp.hpl.jena.sparql.util.NotUniqueException

        try {
            if ( ! sIter.hasNext() )
                throw new PropertyRequiredException(r, p) ;
            sIter.next() ;
            if ( sIter.hasNext() )
                throw new NotUniqueException(r, p) ;
        } finally { sIter.close() ; }
        return true ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.util.NotUniqueException

        StmtIterator sIter = r.listProperties(p) ;
        try {
            if ( ! sIter.hasNext() ) return true ;
            sIter.next() ;
            if ( sIter.hasNext() )
                throw new NotUniqueException(r, p) ;
        } finally { sIter.close() ; }
        return true ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.util.NotUniqueException

    }

    public static String getStringValue(Resource r, Property p)
    {
        if ( ! atmostOneProperty(r, p) )
            throw new NotUniqueException(r, p) ;
        Statement s = r.getProperty(p) ;
        if ( s == null )
            return null ;
        return s.getString() ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.util.NotUniqueException

    }

    public static String getAsStringValue(Resource r, Property p)
    {
        if ( ! atmostOneProperty(r, p) )
            throw new NotUniqueException(r, p) ;
        Statement s = r.getProperty(p) ;
        if ( s == null )
            return null ;
        if ( s.getObject().isResource() )
            return s.getResource().getURI() ;
View Full Code Here

Examples of com.hp.hpl.jena.sparql.util.NotUniqueException

    }

    public static Resource getResourceValue(Resource r, Property p)
    {
        if ( ! atmostOneProperty(r, p) )
            throw new NotUniqueException(r, p) ;
        Statement s = r.getProperty(p) ;
        if ( s == null )
            return null ;
        return s.getResource() ;
    }
View Full Code Here

Examples of model.devscore.NotUniqueException

  private Set<IBasicDEVSModel> models = new TreeSet<>();

  @Override
  public void addModel(IBasicDEVSModel model) {
    if (!models.add(model)) {
      throw new NotUniqueException();
    }
  }
View Full Code Here

Examples of model.devscore.NotUniqueException

  private static final long serialVersionUID = -2902715745667298246L;

  @Override
  public void addModel(IBasicDEVSModel model) {
    if (contains(model)) {
      throw new NotUniqueException("");
    }
    add(model);
    setElementIterator(null);
  }
View Full Code Here

Examples of model.devscore.NotUniqueException

    } else {
      StringBuilder buff = new StringBuilder();
      buff.append("A coupling between these models and ports already exist! (");
      buff.append(coupling.getName());
      buff.append(")");
      throw new NotUniqueException(buff.toString());
    }
  }
View Full Code Here

Examples of model.devscore.NotUniqueException

  @Override
  public void addModel(IBasicDEVSModel model) {

    if (contains(model.getName())) {
      throw new NotUniqueException("Modelname already used " + model.getName());
    }
    getVelements().add(model);
    helements.put(model.getName(), model);

    // ////////////////////////////////////////////////////////////////////////
View Full Code Here

Examples of winterwell.utils.NotUniqueException

      throws NotUniqueException {
    List<Node> titles = WebUtils.xpathQuery(xpathQuery, node);
    if (titles.isEmpty())
      return null;
    if (titles.size() != 1)
      throw new NotUniqueException(Printer.toString(Containers.subList(
          titles, 0, 3)));
    Node node2 = titles.get(0);
    String text = node2.getTextContent();
    // Although W3C say
    // "All line-endings reported as a single LF character.", the
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.