[ https://issues.apache.org/jira/browse/JENA-1559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16507836#comment-16507836 ]
ASF GitHub Bot commented on JENA-1559: -------------------------------------- Github user rvesse commented on a diff in the pull request: https://github.com/apache/jena/pull/431#discussion_r194338271 --- Diff: jena-arq/src/main/java/org/apache/jena/sparql/graph/PrefixMappingBase.java --- @@ -0,0 +1,277 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.graph; + +import java.util.Map; +import java.util.Map.Entry; +import java.util.Optional; +import java.util.StringJoiner; +import java.util.function.BiConsumer; + +import org.apache.jena.ext.xerces.util.XMLChar; +import org.apache.jena.shared.PrefixMapping; +import org.apache.jena.util.SplitIRI; + +/** + * Framework for implementing {@link PrefixMapping}. It is stateless (unlike + * {@code PrefixMappingImpl}) and implements the contract of {@link PrefixMapping}, + * providing the key algorithm and delegating storage to the subclasses. + * <p> + * Reverse mapping, looking up a URI to find a prefix is complex. There may be several + * possibilities. Applications should not reliy on every implementat being consistent, --- End diff -- Typos - `implementat` this line - `espeically` on the following line > Avoid unnecessary prefix loading in GraphPrefixesProjection > ------------------------------------------------------------ > > Key: JENA-1559 > URL: https://issues.apache.org/jira/browse/JENA-1559 > Project: Apache Jena > Issue Type: Task > Affects Versions: Jena 3.7.0 > Reporter: Andy Seaborne > Assignee: Andy Seaborne > Priority: Major > > {{GraphPrefixesProjection}} loads all prefixes from the database (JENA-81). > It was done that way because {{PrefixMappingImpl}} has internal > datastructures that are not passing through lookup misses. > Load as needed and rework the way the prefix implementation to cleanly > separate algorithms from storage. > Leave {{PrefixMappingImpl}} untouched - its name and details are too > well-known. > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)