Package org.apache.clerezza.rdf.core.access

Examples of org.apache.clerezza.rdf.core.access.EntityAlreadyExistsException


        ModelGraph modelGraph;
        datasetLock.readLock().lock();
        try {
            modelGraph = initModels.get(name);
            if(modelGraph != null && create){
                throw new EntityAlreadyExistsException(name);
            } else if(modelGraph == null){
                String modelName = name.getUnicodeString();
                modelGraph = new ModelGraph(datasetLock, name.equals(defaultGraphName) ?
                        getDataset().getNamedModel("urn:x-arq:UnionGraph") :
                            getDataset().getNamedModel(modelName),readWrite);
View Full Code Here


            throw new IllegalArgumentException("The parsed MGrpah name MUST NOT be NULL!");
        }
        datasetLock.writeLock().lock();
        try {
            if(graphNames.contains(name) || mGraphNames.contains(name) || name.equals(defaultGraphName)){
                throw new EntityAlreadyExistsException(name);
            }
            MGraph graph = getModelGraph(name,true,true).getMGraph();
            mGraphNames.add(name);
            try {
                writeMGraphConfig();
View Full Code Here

        }
        ModelGraph mg;
        datasetLock.writeLock().lock();
        try {
            if(graphNames.contains(name) || mGraphNames.contains(name) || name.equals(defaultGraphName)){
                throw new EntityAlreadyExistsException(name);
            }
            mg = getModelGraph(name,false,true);
            graphNames.add(name);
            try {
                writeGraphConfig();
View Full Code Here

            if(readWrite) {
                // Reuse existing model if not yet garbage collected.
                modelGraph = syncModels.get(name);
            }
            if((modelGraph != null || isExistingGraphName(name)) && create){
                throw new EntityAlreadyExistsException(name);
            } else if(modelGraph == null){
                String modelName = name.getUnicodeString();
                modelGraph = new ModelGraph(datasetLock, name.equals(defaultGraphName) ?
                    getDataset().getNamedModel("urn:x-arq:UnionGraph") :
                      getDataset().getNamedModel(modelName),readWrite);
View Full Code Here

            throw new IllegalArgumentException("The parsed MGrpah name MUST NOT be NULL!");
        }
        datasetLock.writeLock().lock();
        try {
            if(isExistingGraphName(name)){
                throw new EntityAlreadyExistsException(name);
            }
            MGraph graph = getModelGraph(name,true,true).getMGraph();
            addToIndex( name, Symbols.MGraph);
            return graph;
        } finally {
View Full Code Here

        }
        ModelGraph mg;
        datasetLock.writeLock().lock();
        try {
            if(isExistingGraphName(name)){
                throw new EntityAlreadyExistsException(name);
            }
            mg = getModelGraph(name,false,true);
            addToIndex( name, Symbols.Graph);
           
            //add the parsed data!
View Full Code Here

    @Override
    public synchronized MGraph createMGraph(UriRef name)
            throws UnsupportedOperationException, EntityAlreadyExistsException {
        File tcDir = getMGraphDir(name);
        if (tcDir.exists()) {
            throw new EntityAlreadyExistsException(name);
        }
        tcDir.mkdirs();
        File otimizationIndicator = new File(tcDir, "fixed.opt");
        try {
            otimizationIndicator.createNewFile();
View Full Code Here

    @Override
    public Graph createGraph(UriRef name, TripleCollection triples)
            throws UnsupportedOperationException, EntityAlreadyExistsException {
        File tcDir = getGraphDir(name);
        if (tcDir.exists()) {
            throw new EntityAlreadyExistsException(name);
        }

        if (triples == null) {
            triples = new SimpleMGraph();
        }
View Full Code Here

  @Override
  public synchronized MGraph createMGraph(UriRef name)
      throws UnsupportedOperationException, EntityAlreadyExistsException {
    File tcDir = getMGraphDir(name);
    if (tcDir.exists()) {
      throw new EntityAlreadyExistsException(name);
    }
    tcDir.mkdirs();
    File otimizationIndicator = new File(tcDir, "fixed.opt");
    try {
      otimizationIndicator.createNewFile();
View Full Code Here

  @Override
  public Graph createGraph(UriRef name, TripleCollection triples)
      throws UnsupportedOperationException, EntityAlreadyExistsException {
    File tcDir = getGraphDir(name);
    if (tcDir.exists()) {
      throw new EntityAlreadyExistsException(name);
    }

    if (triples == null) {
      triples = new SimpleMGraph();
    }
View Full Code Here

TOP

Related Classes of org.apache.clerezza.rdf.core.access.EntityAlreadyExistsException

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.