Return-Path: X-Original-To: apmail-marmotta-commits-archive@minotaur.apache.org Delivered-To: apmail-marmotta-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 99F71F07A for ; Mon, 8 Apr 2013 15:50:03 +0000 (UTC) Received: (qmail 19139 invoked by uid 500); 8 Apr 2013 15:50:03 -0000 Delivered-To: apmail-marmotta-commits-archive@marmotta.apache.org Received: (qmail 19112 invoked by uid 500); 8 Apr 2013 15:50:03 -0000 Mailing-List: contact commits-help@marmotta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@marmotta.apache.org Delivered-To: mailing list commits@marmotta.apache.org Received: (qmail 19105 invoked by uid 99); 8 Apr 2013 15:50:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Apr 2013 15:50:03 +0000 X-ASF-Spam-Status: No, hits=-2002.4 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 08 Apr 2013 15:49:53 +0000 Received: (qmail 18102 invoked by uid 99); 8 Apr 2013 15:49:30 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Apr 2013 15:49:30 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id E8B9750E92; Mon, 8 Apr 2013 15:49:29 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: wikier@apache.org To: commits@marmotta.incubator.apache.org Date: Mon, 08 Apr 2013 15:49:30 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/5] git commit: MARMOTTA-190: removed unnecessary resources X-Virus-Checked: Checked by ClamAV on apache.org MARMOTTA-190: removed unnecessary resources Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/d7f7062e Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/d7f7062e Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/d7f7062e Branch: refs/heads/master Commit: d7f7062e9e00226c48c350736115e09d9991c3e4 Parents: b5872e2 Author: Sergio Fernández Authored: Mon Apr 8 17:27:26 2013 +0200 Committer: Sergio Fernández Committed: Mon Apr 8 17:27:26 2013 +0200 ---------------------------------------------------------------------- .../src/main/webapp/search/test_luke.html | 44 - .../src/main/webapp/skosjs-extension/test.html | 35 - .../src/main/webapp/solr/admin/_info.jsp | 121 --- .../src/main/webapp/solr/admin/action.jsp | 90 -- .../src/main/webapp/solr/admin/analysis.jsp | 505 ----------- .../src/main/webapp/solr/admin/analysis.xsl | 179 ---- .../src/main/webapp/solr/admin/dataimport.jsp | 56 -- .../src/main/webapp/solr/admin/debug.jsp | 109 --- .../main/webapp/solr/admin/distributiondump.jsp | 156 ---- .../src/main/webapp/solr/admin/form.jsp | 140 --- .../src/main/webapp/solr/admin/get-file.jsp | 73 -- .../src/main/webapp/solr/admin/get-properties.jsp | 27 - .../src/main/webapp/solr/admin/header.jsp | 47 - .../src/main/webapp/solr/admin/index.jsp | 162 ---- .../src/main/webapp/solr/admin/meta.xsl | 34 - .../src/main/webapp/solr/admin/ping.jsp | 50 -- .../src/main/webapp/solr/admin/ping.xsl | 71 -- .../src/main/webapp/solr/admin/raw-schema.jsp | 39 - .../src/main/webapp/solr/admin/registry.jsp | 109 --- .../src/main/webapp/solr/admin/registry.xsl | 321 ------- .../main/webapp/solr/admin/replication/header.jsp | 92 -- .../main/webapp/solr/admin/replication/index.jsp | 382 -------- .../src/main/webapp/solr/admin/schema.jsp | 677 --------------- .../src/main/webapp/solr/admin/solr-admin.css | 214 ----- .../src/main/webapp/solr/admin/solr_small.png | Bin 7926 -> 0 bytes .../src/main/webapp/solr/admin/stats.jsp | 94 -- .../src/main/webapp/solr/admin/stats.xsl | 220 ----- .../src/main/webapp/solr/admin/tabular.xsl | 141 --- .../src/main/webapp/solr/admin/threaddump.jsp | 111 --- .../src/main/webapp/solr/admin/threaddump.xsl | 103 --- .../src/main/webapp/solr/index.jsp | 64 -- 31 files changed, 0 insertions(+), 4466 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/d7f7062e/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/search/test_luke.html ---------------------------------------------------------------------- diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/search/test_luke.html b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/search/test_luke.html deleted file mode 100644 index 3e3c6db..0000000 --- a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/search/test_luke.html +++ /dev/null @@ -1,44 +0,0 @@ - -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) - - - - - - - - - - - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/d7f7062e/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/skosjs-extension/test.html ---------------------------------------------------------------------- diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/skosjs-extension/test.html b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/skosjs-extension/test.html deleted file mode 100644 index f6ae80b..0000000 --- a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/skosjs-extension/test.html +++ /dev/null @@ -1,35 +0,0 @@ - -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) - - - - - - - - - - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/d7f7062e/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/_info.jsp ---------------------------------------------------------------------- diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/_info.jsp b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/_info.jsp deleted file mode 100644 index f446b13..0000000 --- a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/_info.jsp +++ /dev/null @@ -1,121 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -<%-- - ~ Copyright (c) 2012 Salzburg Research. - ~ - ~ Licensed 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. - --%> - -<%@ page import="org.apache.lucene.LucenePackage, - org.apache.solr.common.util.XML, - org.apache.solr.core.SolrConfig, - org.apache.solr.core.SolrCore"%> -<%@ page import="org.apache.solr.schema.IndexSchema"%> -<%@ page import="java.io.File"%> -<%@ page import="java.io.StringWriter"%> -<%@ page import="java.net.InetAddress"%> -<%@ page import="java.net.UnknownHostException"%> - -<%! - // only try to figure out the hostname once in a static block so - // we don't have a potentially slow DNS lookup on every admin request - static InetAddress addr = null; - static String hostname = "unknown"; - static { - try { - addr = InetAddress.getLocalHost(); - hostname = addr.getCanonicalHostName(); - } catch (UnknownHostException e) { - //default to unknown - } - } -%> - -<% - // - SolrCore core = (SolrCore) request.getAttribute("org.apache.solr.SolrCore"); - if (core == null) { - response.sendError( 404, "missing core name in path" ); - return; - } - - SolrConfig solrConfig = core.getSolrConfig(); - int port = request.getServerPort(); - IndexSchema schema = core.getSchema(); - - // enabled/disabled is purely from the point of a load-balancer - // and has no effect on local server function. If there is no healthcheck - // configured, don't put any status on the admin pages. - String enabledStatus = null; - String enabledFile = solrConfig.get("admin/healthcheck/text()",null); - boolean isEnabled = false; - if (enabledFile!=null) { - isEnabled = new File(enabledFile).exists(); - } - - String collectionName = schema!=null ? schema.getName():"unknown"; - - String defaultSearch = ""; - { - StringWriter tmp = new StringWriter(); - XML.escapeCharData - (solrConfig.get("admin/defaultQuery/text()", ""), tmp); - defaultSearch = tmp.toString(); - } - - String solrImplVersion = ""; - String solrSpecVersion = ""; - String luceneImplVersion = ""; - String luceneSpecVersion = ""; - - { - Package p; - StringWriter tmp; - - p = SolrCore.class.getPackage(); - - tmp = new StringWriter(); - solrImplVersion = p.getImplementationVersion(); - if (null != solrImplVersion) { - XML.escapeCharData(solrImplVersion, tmp); - solrImplVersion = tmp.toString(); - } - tmp = new StringWriter(); - solrSpecVersion = p.getSpecificationVersion() ; - if (null != solrSpecVersion) { - XML.escapeCharData(solrSpecVersion, tmp); - solrSpecVersion = tmp.toString(); - } - - p = LucenePackage.class.getPackage(); - - tmp = new StringWriter(); - luceneImplVersion = p.getImplementationVersion(); - if (null != luceneImplVersion) { - XML.escapeCharData(luceneImplVersion, tmp); - luceneImplVersion = tmp.toString(); - } - tmp = new StringWriter(); - luceneSpecVersion = p.getSpecificationVersion() ; - if (null != luceneSpecVersion) { - XML.escapeCharData(luceneSpecVersion, tmp); - luceneSpecVersion = tmp.toString(); - } - } - - String cwd=System.getProperty("user.dir"); - String solrHome= solrConfig.getInstanceDir(); - - boolean cachingEnabled = !solrConfig.getHttpCachingConfig().isNever304(); -%> http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/d7f7062e/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/action.jsp ---------------------------------------------------------------------- diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/action.jsp b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/action.jsp deleted file mode 100644 index d6b12b5..0000000 --- a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/action.jsp +++ /dev/null @@ -1,90 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%> - -<%-- - ~ Copyright (c) 2012 Salzburg Research. - ~ - ~ Licensed 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. - --%> -<%@include file="header.jsp" %> -<% - - String action = request.getParameter("action"); - String enableActionStatus = ""; - boolean isValid = false; - - if (action != null) { - // Validate fname - if ("Enable".compareTo(action) == 0) isValid = true; - if ("Disable".compareTo(action) == 0) isValid = true; - } - if (isValid) { - if ("Enable".compareTo(action) == 0) { - try { - File enableFile = new File(enabledFile); - if (enableFile.createNewFile()) { - enableActionStatus += "Enable Succeeded (enable file "; - enableActionStatus += enabledFile; - enableActionStatus += " created)"; - } else { - enableActionStatus += "Already Enabled"; - } - } catch(Exception e) { - enableActionStatus += "Enable Failed: " + e.toString(); - } - } - if ("Disable".compareTo(action) == 0) { - try { - File enableFile = new File(enabledFile); - if (enableFile.delete()) { - enableActionStatus = "Disable Succeeded (enable file "; - enableActionStatus += enabledFile; - enableActionStatus += " removed)"; - } else { - enableActionStatus = "Already Disabled"; - } - } catch(Exception e) { - enableActionStatus += "Disable Failed: " + e.toString(); - } - } - } else { - enableActionStatus = "Illegal Action"; - } - // :TODO: might want to rework this so any logging change happens *after* - SolrCore.log.info(enableActionStatus); -%> -
- - - - - - - - - -
-

Action:

-
- <% XML.escapeCharData(action, out); %>
-
-

Result:

-
- <% XML.escapeCharData(enableActionStatus, out); %>
-
-

- Return to Admin Page - - http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/d7f7062e/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/analysis.jsp ---------------------------------------------------------------------- diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/analysis.jsp b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/analysis.jsp deleted file mode 100644 index 214082a..0000000 --- a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/analysis.jsp +++ /dev/null @@ -1,505 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%> -<%-- - ~ Copyright (c) 2012 Salzburg Research. - ~ - ~ Licensed 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. - --%> - -<%@ page - import="org.apache.lucene.analysis.Analyzer,org.apache.lucene.analysis.CharReader,org.apache.lucene.analysis.CharStream,org.apache.lucene.analysis.TokenStream,org.apache.lucene.analysis.tokenattributes.CharTermAttribute,org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute,org.apache.lucene.index.Payload,org.apache.lucene.util.Attribute,org.apache.lucene.util.AttributeReflector,org.apache.lucene.util.AttributeSource,org.apache.solr.analysis.CharFilterFactory,org.apache.solr.analysis.TokenFilterFactory,org.apache.solr.analysis.TokenizerChain,org.apache.solr.analysis.TokenizerFactory,org.apache.solr.schema.FieldType,org.apache.solr.schema.SchemaField,javax.servlet.jsp.JspWriter,java.io.IOException"%> -<%@ page import="java.io.Reader,java.io.StringReader" %> -<%@ page import="java.math.BigInteger"%> -<%@ page import="java.util.*"%> - -<%-- ${symbol_dollar}Id: analysis.jsp 1061035 2011-01-19 22:33:28Z uschindler ${symbol_dollar} --%> -<%-- ${symbol_dollar}Source: /cvs/main/searching/org.apache.solrolarServer/resources/admin/analysis.jsp,v ${symbol_dollar} --%> -<%-- ${symbol_dollar}Name: ${symbol_dollar} --%> - -<%@include file="header.jsp"%> - -<% - // is name a field name or a type name? - String nt = request.getParameter("nt"); - if (nt == null || nt.length() == 0) - nt = "name"; // assume field name - nt = nt.toLowerCase(Locale.ENGLISH).trim(); - String name = request.getParameter("name"); - if (name == null || name.length() == 0) - name = ""; - String val = request.getParameter("val"); - if (val == null || val.length() == 0) - val = ""; - String qval = request.getParameter("qval"); - if (qval == null || qval.length() == 0) - qval = ""; - String verboseS = request.getParameter("verbose"); - boolean verbose = verboseS != null - && verboseS.equalsIgnoreCase("on"); - String qverboseS = request.getParameter("qverbose"); - boolean qverbose = qverboseS != null - && qverboseS.equalsIgnoreCase("on"); - String highlightS = request.getParameter("highlight"); - boolean highlight = highlightS != null - && highlightS.equalsIgnoreCase("on"); -%> - -
- -

Field Analysis

- -
- - - - - - - - - - - - - - - - - - - - -
Field
Field value (Index)
- verbose output >
- highlight matches >
Field value (Query)
- verbose output >
-
-
- - -<% - SchemaField field = null; - - if (name != "") { - if (nt.equals("name")) { - try { - field = schema.getField(name); - } catch (Exception e) { - out.print("Unknown Field: "); - XML.escapeCharData(name, out); - out.println(""); - } - } else { - FieldType t = schema.getFieldTypes().get(name); - if (null == t) { - out.print("Unknown Field Type: "); - XML.escapeCharData(name, out); - out.println(""); - } else { - field = new SchemaField("fakefieldoftype:" + name, t); - } - } - } - - if (field != null) { - HashSet matches = null; - if (qval != "" && highlight) { - Reader reader = new StringReader(qval); - Analyzer analyzer = field.getType().getQueryAnalyzer(); - TokenStream tstream = analyzer.reusableTokenStream( - field.getName(), reader); - CharTermAttribute termAtt = tstream - .addAttribute(CharTermAttribute.class); - tstream.reset(); - matches = new HashSet(); - while (tstream.incrementToken()) { - matches.add(termAtt.toString()); - } - } - - if (val != "") { - out.println("

Index Analyzer

"); - doAnalyzer(out, field, val, false, verbose, matches); - } - if (qval != "") { - out.println("

Query Analyzer

"); - doAnalyzer(out, field, qval, true, qverbose, null); - } - } -%> - - - - - - -<%!private static void doAnalyzer(JspWriter out, SchemaField field, - String val, boolean queryAnalyser, boolean verbose, - Set match) throws Exception { - - FieldType ft = field.getType(); - Analyzer analyzer = queryAnalyser ? ft.getQueryAnalyzer() : ft - .getAnalyzer(); - if (analyzer instanceof TokenizerChain) { - TokenizerChain tchain = (TokenizerChain) analyzer; - CharFilterFactory[] cfiltfacs = tchain.getCharFilterFactories(); - TokenizerFactory tfac = tchain.getTokenizerFactory(); - TokenFilterFactory[] filtfacs = tchain.getTokenFilterFactories(); - - if (cfiltfacs != null) { - String source = val; - for (CharFilterFactory cfiltfac : cfiltfacs) { - CharStream reader = CharReader - .get(new StringReader(source)); - reader = cfiltfac.create(reader); - if (verbose) { - writeHeader(out, cfiltfac.getClass(), - cfiltfac.getArgs()); - source = writeCharStream(out, reader); - } - } - } - - TokenStream tstream = tfac.create(tchain - .charStream(new StringReader(val))); - List tokens = getTokens(tstream); - if (verbose) { - writeHeader(out, tfac.getClass(), tfac.getArgs()); - } - - writeTokens(out, tokens, ft, verbose, match); - - for (TokenFilterFactory filtfac : filtfacs) { - if (verbose) { - writeHeader(out, filtfac.getClass(), filtfac.getArgs()); - } - - final Iterator iter = tokens.iterator(); - tstream = filtfac.create(new TokenStream(tstream - .getAttributeFactory()) { - - public boolean incrementToken() throws IOException { - if (iter.hasNext()) { - AttributeSource token = iter.next(); - Iterator> atts = token - .getAttributeClassesIterator(); - while (atts.hasNext()) - // make sure all att impls in the token exist here - addAttribute(atts.next()); - token.copyTo(this); - return true; - } else { - return false; - } - } - }); - tokens = getTokens(tstream); - - writeTokens(out, tokens, ft, verbose, match); - } - - } else { - TokenStream tstream = analyzer.reusableTokenStream(field.getName(), - new StringReader(val)); - tstream.reset(); - List tokens = getTokens(tstream); - if (verbose) { - writeHeader(out, analyzer.getClass(), Collections.EMPTY_MAP); - } - writeTokens(out, tokens, ft, verbose, match); - } - } - - static List getTokens(TokenStream tstream) - throws IOException { - List tokens = new ArrayList(); - tstream.reset(); - while (tstream.incrementToken()) { - tokens.add(tstream.cloneAttributes()); - } - return tokens; - } - - private static class ReflectItem { - final Class attClass; - final String key; - final Object value; - - ReflectItem(Class attClass, String key, - Object value) { - this.attClass = attClass; - this.key = key; - this.value = value; - } - } - - private static class Tok { - final String term; - final int pos; - final List reflected = new ArrayList(); - - Tok(AttributeSource token, int pos) { - this.term = token.addAttribute(CharTermAttribute.class).toString(); - this.pos = pos; - token.reflectWith(new AttributeReflector() { - public void reflect(Class attClass, - String key, Object value) { - // leave out position and term - if (CharTermAttribute.class.isAssignableFrom(attClass)) - return; - if (PositionIncrementAttribute.class - .isAssignableFrom(attClass)) - return; - reflected.add(new ReflectItem(attClass, key, value)); - } - }); - } - } - - private static interface TokToStr { - public String toStr(Tok o); - } - - private static void printRow(JspWriter out, String header, - String headerTitle, List[] arrLst, TokToStr converter, - boolean multival, boolean verbose, Set match) - throws IOException { - // find the maximum number of terms for any position - int maxSz = 1; - if (multival) { - for (List lst : arrLst) { - maxSz = Math.max(lst.size(), maxSz); - } - } - - for (int idx = 0; idx < maxSz; idx++) { - out.println(""); - if (idx == 0 && verbose) { - if (header != null) { - out.print(""); - XML.escapeCharData(header, out); - out.println(""); - } - } - - for (int posIndex = 0; posIndex < arrLst.length; posIndex++) { - List lst = arrLst[posIndex]; - if (lst.size() <= idx) - continue; - if (match != null && match.contains(lst.get(idx).term)) { - out.print("'); - - XML.escapeCharData(converter.toStr(lst.get(idx)), out); - out.print(""); - } - - out.println(""); - } - - } - - /* this method is totally broken, as no charset involved: new String(byte[]) is crap! - static String isPayloadString( Payload p ) { - String sp = new String(p.getData()); - for( int i=0; i < sp.length(); i++ ) { - if( !Character.isDefined( sp.charAt(i) ) || Character.isISOControl( sp.charAt(i) ) ) - return ""; - } - return "(" + sp + ")"; - } - */ - - static void writeHeader(JspWriter out, Class clazz, Map args) - throws IOException { - out.print("

"); - out.print(clazz.getName()); - XML.escapeCharData(" " + args, out); - out.println("

"); - } - - // readable, raw, pos, type, start/end - static void writeTokens(JspWriter out, List tokens, - final FieldType ft, boolean verbose, Set match) - throws IOException { - - // Use a map to tell what tokens are in what positions - // because some tokenizers/filters may do funky stuff with - // very large increments, or negative increments. - HashMap> map = new HashMap>(); - boolean needRaw = false; - int pos = 0, reflectionCount = -1; - for (AttributeSource t : tokens) { - String text = t.addAttribute(CharTermAttribute.class).toString(); - if (!text.equals(ft.indexedToReadable(text))) { - needRaw = true; - } - - pos += t.addAttribute(PositionIncrementAttribute.class) - .getPositionIncrement(); - List lst = map.get(pos); - if (lst == null) { - lst = new ArrayList(1); - map.put(pos, lst); - } - Tok tok = new Tok(t, pos); - // sanity check - if (reflectionCount < 0) { - reflectionCount = tok.reflected.size(); - } else { - if (reflectionCount != tok.reflected.size()) - throw new RuntimeException( - "Should not happen: Number of reflected entries differs for position=" - + pos); - } - lst.add(tok); - } - - List[] arr = (List[]) map.values().toArray( - new ArrayList[map.size()]); - - // Jetty 6.1.3 miscompiles a generics-enabled version..., without generics: - Arrays.sort(arr, new Comparator() { - public int compare(Object toks, Object toks1) { - return ((List) toks).get(0).pos - - ((List) toks1).get(0).pos; - } - }); - - out.println(""); - - if (verbose) { - printRow(out, "position", "calculated from " - + PositionIncrementAttribute.class.getName(), arr, - new TokToStr() { - public String toStr(Tok t) { - return Integer.toString(t.pos); - } - }, false, verbose, null); - } - - printRow(out, "term text", CharTermAttribute.class.getName(), arr, - new TokToStr() { - public String toStr(Tok t) { - return ft.indexedToReadable(t.term); - } - }, true, verbose, match); - - if (verbose) { - if (needRaw) { - printRow(out, "raw text", CharTermAttribute.class.getName(), - arr, new TokToStr() { - public String toStr(Tok t) { - // page is UTF-8, so anything goes. - return t.term; - } - }, true, verbose, match); - } - - for (int att = 0; att < reflectionCount; att++) { - final ReflectItem item0 = arr[0].get(0).reflected.get(att); - final int i = att; - printRow(out, item0.key, item0.attClass.getName(), arr, - new TokToStr() { - public String toStr(Tok t) { - final ReflectItem item = t.reflected.get(i); - if (item0.attClass != item.attClass - || !item0.key.equals(item.key)) - throw new RuntimeException( - "Should not happen: attribute types suddenly change at position=" - + t.pos); - if (item.value instanceof Payload) { - Payload p = (Payload) item.value; - if (null != p) { - BigInteger bi = new BigInteger(p - .getData()); - String ret = bi.toString(16); - if (ret.length() % 2 != 0) { - // Pad with 0 - ret = "0" + ret; - } - //TODO maybe fix: ret += isPayloadString(p); - return ret; - } - return ""; - } else { - return (item.value != null) ? item.value - .toString() : ""; - } - } - }, true, verbose, null); - } - } - - out.println("
"); - } - - static String writeCharStream(JspWriter out, CharStream input) - throws IOException { - out.println(""); - out.println(""); - - out.print(""); - - final int BUFFER_SIZE = 1024; - char[] buf = new char[BUFFER_SIZE]; - int len = 0; - StringBuilder sb = new StringBuilder(); - do { - len = input.read(buf, 0, BUFFER_SIZE); - if (len > 0) - sb.append(buf, 0, len); - } while (len == BUFFER_SIZE); - out.print(""); - - out.println(""); - out.println("
"); - XML.escapeCharData("text", out); - out.println(""); - XML.escapeCharData(sb.toString(), out); - out.println("
"); - return sb.toString(); - }%> http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/d7f7062e/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/analysis.xsl ---------------------------------------------------------------------- diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/analysis.xsl b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/analysis.xsl deleted file mode 100644 index da30f98..0000000 --- a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/analysis.xsl +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - - - - - - - - Solr Info - - - - Apache Solr - -

Solr Admin ()

-
-

Field Analysis

- - Return to Admin Page -
- - -
- - - - -
- - - - - - - - - - - - - - - - - -
- Field name - - -
- Field value (Index) -
- verbose output -
- highlight matches -
- -
- Field value (Query) -
- verbose output -
- -
- - -
-
-
- - -

Index Analyzer

- -
- -
-
- - -
{ - - =, - - }
-
- - -
- - - - - - - - - - - - - - - - - -
texttypepositionstartend
-
-
- - -

Query Analyzer

- -
- -
-
- - -
{ - - =, - - }
-
- - -
- - - - - - - - - - - - - - - - - -
texttypepositionstartend
-
-
- -
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/d7f7062e/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/dataimport.jsp ---------------------------------------------------------------------- diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/dataimport.jsp b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/dataimport.jsp deleted file mode 100644 index f3a1e7e..0000000 --- a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/dataimport.jsp +++ /dev/null @@ -1,56 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -<%@ page import="org.apache.solr.request.SolrRequestHandler" %> -<%@ page import="java.util.Map" %> -<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%> -<%-- - ~ Copyright (c) 2012 Salzburg Research. - ~ - ~ Licensed 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. - --%> - -<%-- do a verbatim include so we can use the local vars --%> -<%@include file="_info.jsp"%> - -<% - String handler = request.getParameter("handler"); - - if (handler == null) { - Map handlers = core.getRequestHandlers(); -%> - - DataImportHandler Interactive Development - - - -Select handler: -
    -<% - for (String key : handlers.keySet()) { - if (handlers.get(key).getClass().getName().equals("org.apache.solr.handler.dataimport.DataImportHandler")) { %> -
  • <%=key%>
  • -<% - } - } -%> -
- -<% } else { %> - - - - - -<% } %> - http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/d7f7062e/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/debug.jsp ---------------------------------------------------------------------- diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/debug.jsp b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/debug.jsp deleted file mode 100644 index 8ff152f..0000000 --- a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/debug.jsp +++ /dev/null @@ -1,109 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%> -<%-- - ~ Copyright (c) 2012 Salzburg Research. - ~ - ~ Licensed 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. - --%> - -<%-- do a verbatim include so we can use the local vars --%> -<%@include file="_info.jsp"%> - - -DataImportHandler Interactive Development - - - - - - -

DataImportHandler Development Console

-<% - String handler = request.getParameter("handler"); // must be specified -%> -
- - - - - - - - - - - - - - - - - -
Handler: <%=handler%> change handler
- - - - - - - - - -
- - Verbose Commit Clean Start Row No. of Rows 
-
data config xml -
-
-
- - - - - - - - -
-
- - - - -
-
- - - - - - -
- -Return to Admin Page - - http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/d7f7062e/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/distributiondump.jsp ---------------------------------------------------------------------- diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/distributiondump.jsp b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/distributiondump.jsp deleted file mode 100644 index fc37115..0000000 --- a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/distributiondump.jsp +++ /dev/null @@ -1,156 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%> -<%-- - ~ Copyright (c) 2012 Salzburg Research. - ~ - ~ Licensed 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. - --%> - -<%@ page import="java.io.BufferedReader, - java.io.FileReader, - java.io.FilenameFilter"%> - -<%@include file="header.jsp" %> - -<% - File slaveinfo = new File(solrHome + "logs/snappuller.status"); - - StringBuffer buffer = new StringBuffer(); - StringBuffer buffer2 = new StringBuffer(); - String mode = ""; - - if (slaveinfo.canRead()) { - // Slave instance - mode = "Slave"; - File slavevers = new File(solrHome + "logs/snapshot.current"); - BufferedReader inforeader = new BufferedReader(new FileReader(slaveinfo)); - BufferedReader versreader = new BufferedReader(new FileReader(slavevers)); - buffer.append("${symbol_escape}n" + - "${symbol_escape}n" + - "Version:" + - "${symbol_escape}n" + - "${symbol_escape}n") - .append( versreader.readLine()) - .append( "${symbol_escape}n" + - "${symbol_escape}n" + - "${symbol_escape}n" + - "${symbol_escape}n" + - "${symbol_escape}n" + - "Status:" + - "${symbol_escape}n" + - "${symbol_escape}n") - .append( inforeader.readLine()) - .append( "${symbol_escape}n" + - "${symbol_escape}n"); - } else { - // Master instance - mode = "Master"; - File masterdir = new File(solrHome + "logs/clients"); - FilenameFilter sfilter = new FilenameFilter() { - public boolean accept(File dir, String name) { - return name.startsWith("snapshot.status"); - } - }; - FilenameFilter cfilter = new FilenameFilter() { - public boolean accept(File dir, String name) { - return name.startsWith("snapshot.current"); - } - }; - File[] clients = masterdir.listFiles(cfilter); - if (clients == null) { - buffer.append("${symbol_escape}n" + - "${symbol_escape}n" + - "${symbol_escape}n" + - "${symbol_escape}n" + - "No distribution info present" + - "${symbol_escape}n" + - "${symbol_escape}n"); - } else { - buffer.append("

Client Snapshot In Use:

${symbol_escape}n" + - "${symbol_escape}n" + - "${symbol_escape}n" + - "Client" + - "${symbol_escape}n" + - "${symbol_escape}n" + - "Version" + - "${symbol_escape}n" + - "${symbol_escape}n"); - int i = 0; - while (i < clients.length) { - String fileName=clients[i].toString(); - int p=fileName.indexOf("snapshot.current"); - String clientName=fileName.substring(p+17); - BufferedReader reader = new BufferedReader(new FileReader(clients[i])); - buffer.append("${symbol_escape}n" + - "${symbol_escape}n" + - clientName + - "${symbol_escape}n" + - "${symbol_escape}n") - .append( reader.readLine()) - .append( "${symbol_escape}n" + - "${symbol_escape}n" + - "${symbol_escape}n" + - "${symbol_escape}n"); - i++; - } - clients = masterdir.listFiles(sfilter); - if (clients!=null) { - buffer.append("${symbol_escape}n" + - "

Client Snapshot Distribution Status:

${symbol_escape}n" + - "${symbol_escape}n" + - "${symbol_escape}n" + - "${symbol_escape}n" + - "${symbol_escape}n" + - "${symbol_escape}n"); - i = 0; - while (i < clients.length) { - String fileName=clients[i].toString(); - int p=fileName.indexOf("snapshot.status"); - String clientName=fileName.substring(p+16); - BufferedReader reader = new BufferedReader(new FileReader(clients[i])); - buffer.append("${symbol_escape}n" + - "${symbol_escape}n" + - "${symbol_escape}n" + - "${symbol_escape}n" + - "${symbol_escape}n" + - "${symbol_escape}n"); - i++; - } - } - } - } -%> - - -
-

Distribution Info: <%= mode %> Server

-
-(What Is This Page?) -
-
${symbol_escape}n" + - "Client" + - "${symbol_escape}n" + - "Status" + - "
${symbol_escape}n" + - clientName + - "${symbol_escape}n") - .append( reader.readLine()) - .append( "
-<%= buffer %> -
-

- Return to Admin Page - - http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/d7f7062e/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/favicon.ico ---------------------------------------------------------------------- diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/favicon.ico b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/favicon.ico deleted file mode 100644 index e69de29..0000000 http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/d7f7062e/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/form.jsp ---------------------------------------------------------------------- diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/form.jsp b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/form.jsp deleted file mode 100644 index c5fff4a..0000000 --- a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/form.jsp +++ /dev/null @@ -1,140 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%> - -<%-- - ~ Copyright (c) 2012 Salzburg Research. - ~ - ~ Licensed 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. - --%> -<%@include file="header.jsp" %> - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Solr/Lucene Statement - - -
- Filter Query - - -
- Start Row - - -
- Maximum Rows Returned - - -
- Fields to Return - - -
- Query Type - - -
- Output Type - - -
- Debug: enable - - - Note: you may need to "view source" in your browser to see explain() correctly indented. -
- Debug: explain others - - - Apply original query scoring to matches of this query to see how they compare. -
- Enable Highlighting - - -
- Fields to Highlight - - -
- - -
-
-
- -This form demonstrates the most common query options available for the -built in Query Types. Please consult the Solr Wiki for additional -Query Parameters. - - - - http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/d7f7062e/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/get-file.jsp ---------------------------------------------------------------------- diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/get-file.jsp b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/get-file.jsp deleted file mode 100644 index 84f9546..0000000 --- a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/get-file.jsp +++ /dev/null @@ -1,73 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -<%@ page contentType="text/plain; charset=utf-8" pageEncoding="UTF-8" %> - -<%-- - ~ Copyright (c) 2012 Salzburg Research. - ~ - ~ Licensed 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. - --%> -<%@ page import="org.apache.solr.core.SolrCore, - java.io.InputStream, - java.io.InputStreamReader, - java.io.Reader, - java.util.StringTokenizer, - java.util.logging.Logger"%> -<%! - static Logger log = Logger.getLogger(SolrCore.class.getName()); -%> -<% - // NOTE -- this file will be removed in a future release - log.warning("Using deprecated JSP: " + request.getRequestURL().append("?").append(request.getQueryString()) + " -- check the ShowFileRequestHandler" ); - - Object ocore = request.getAttribute("org.apache.solr.SolrCore"); - SolrCore core = ocore instanceof SolrCore? (SolrCore) ocore : SolrCore.getSolrCore(); - String fname = request.getParameter("file"); - String optional = request.getParameter("optional"); - String gettableFiles = core.getSolrConfig().get("admin/gettableFiles",""); - StringTokenizer st = new StringTokenizer(gettableFiles); - InputStream is; - boolean isValid = false; - boolean isOptional = false; - if (fname != null) { - // Validate fname - while(st.hasMoreTokens()) { - if (st.nextToken().compareTo(fname) == 0) isValid = true; - } - } - if (optional!=null && optional.equalsIgnoreCase("y")) { - isOptional=true; - } - if (isValid) { - try { - is= core.getSolrConfig().openResource(fname); - Reader input = new InputStreamReader(is); - char[] buf = new char[4096]; - while (true) { - int len = input.read(buf); - if (len<=0) break; - out.write(buf,0,len); - } - } - catch (RuntimeException re) { - if (!isOptional) { - throw re; - } - } - } else { - out.println(""); - out.println("Permission denied for file "+ fname); - out.println(""); - } -%> http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/d7f7062e/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/get-properties.jsp ---------------------------------------------------------------------- diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/get-properties.jsp b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/get-properties.jsp deleted file mode 100644 index 61a28a8..0000000 --- a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/get-properties.jsp +++ /dev/null @@ -1,27 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -<%@ page contentType="text/plain;charset=UTF-8" language="java" %> - -<%-- - ~ Copyright (c) 2012 Salzburg Research. - ~ - ~ Licensed 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. - --%> -<% - java.util.Enumeration e = System.getProperties().propertyNames(); - while(e.hasMoreElements()) { - String prop = (String)e.nextElement(); - out.println(prop + " = " + System.getProperty(prop)); - } -%> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/d7f7062e/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/header.jsp ---------------------------------------------------------------------- diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/header.jsp b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/header.jsp deleted file mode 100644 index cf3ce78..0000000 --- a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/header.jsp +++ /dev/null @@ -1,47 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%> - -<%-- - ~ Copyright (c) 2012 Salzburg Research. - ~ - ~ Licensed 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. - --%> - - -<% -request.setCharacterEncoding("UTF-8"); -%> -<%@include file="_info.jsp" %> - - - - - - -Solr admin page - - - -Solr -

Solr Admin (<%= collectionName %>) -<%= enabledStatus==null ? "" : (isEnabled ? " - Enabled" : " - Disabled") %>

- -<%= hostname %>:<%= port %>
-cwd=<%= cwd %> SolrHome=<%= solrHome %> -
-<%String cachingStatus = " HTTP caching is "; %> -<%= cachingEnabled ? cachingStatus + " ON": cachingStatus + " OFF" %> http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/d7f7062e/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/index.jsp ---------------------------------------------------------------------- diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/index.jsp b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/index.jsp deleted file mode 100644 index 1a405e7..0000000 --- a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/index.jsp +++ /dev/null @@ -1,162 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%> -<%-- - ~ Copyright (c) 2012 Salzburg Research. - ~ - ~ Licensed 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. - --%> - -<%-- ${symbol_dollar}Id: index.jsp 1064402 2011-01-28 01:12:39Z hossman ${symbol_dollar} --%> -<%-- ${symbol_dollar}Source: /cvs/main/searching/SolrServer/resources/admin/index.jsp,v ${symbol_dollar} --%> -<%-- ${symbol_dollar}Name: ${symbol_dollar} --%> - -<%@ page import="org.apache.solr.handler.ReplicationHandler" %> -<%@ page import="java.util.Collection" %> -<%@ page import="java.util.Date" %> - -<%-- jsp:include page="header.jsp"/ --%> -<%-- do a verbatim include so we can use the local vars --%> -<%@include file="header.jsp" %> -<%boolean replicationhandler = !core.getRequestHandlers(ReplicationHandler.class).isEmpty();%> -
- - - - - - - -<%-- List the cores (that arent this one) so we can switch --%> -<% org.apache.solr.core.CoreContainer cores = (org.apache.solr.core.CoreContainer)request.getAttribute("org.apache.solr.CoreContainer"); - if (cores!=null) { - Collection names = cores.getCoreNames(); - if (names.size() > 1) {%><% -}}%> - - - - - - - -<% - // a quick hack to get rid of get-file.jsp -- note this still spits out invalid HTML - out.write( org.apache.solr.handler.admin.ShowFileRequestHandler.getFileContents( "admin-extra.html" ) ); -%> - -
-

Solr

-
- <% if (null != core.getSchemaResource()) { %> - [Schema] - <% } - if (null != core.getConfigResource()) { %> - [Config] - <% } %> - [Analysis] - [Schema Browser] <%if(replicationhandler){%>[Replication]<%}%> -
- [Statistics] - [Info] - [Distribution] - [Ping] - [Logging] -
Cores:
<% - String url = request.getContextPath(); - for (String name : names) { - String lname = name.length()==0 ? cores.getDefaultCoreName() : name; // use the real core name rather than the default - if(name.equals(core.getName())) { - %>[<%=lname%>]<% - } else { - %>[<%=lname%>]<% - } - }%>
- App server:
-
- [Java Properties] - [Thread Dump] - <% - if (enabledFile!=null) - if (isEnabled) { - %> - [Disable] - <% - } else { - %> - [Enable] - <% - } - %> -

- - - - - - - - - - - - -
-

Make a Query

-
-[Full Interface] -
- Query String: - -
- - - - - -
-
-

- - - - - - - - - - - - - - -
-

Assistance

-
- [Documentation] - [Issue Tracker] - [Send Email] -
- [Solr Query Syntax] -
- - Current Time: <%= new Date() %> -
- - Server Start At: <%= new Date(core.getStartTime()) %> -
- - http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/d7f7062e/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/meta.xsl ---------------------------------------------------------------------- diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/meta.xsl b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/meta.xsl deleted file mode 100644 index 21e3c0e..0000000 --- a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/meta.xsl +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - : - cwd= SolrHome= - - - http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/d7f7062e/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/ping.jsp ---------------------------------------------------------------------- diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/ping.jsp b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/ping.jsp deleted file mode 100644 index 5c57d89..0000000 --- a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/ping.jsp +++ /dev/null @@ -1,50 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -<%@ page contentType="text/xml; charset=utf-8" pageEncoding="UTF-8" language="java" %> - -<%-- - ~ Copyright (c) 2012 Salzburg Research. - ~ - ~ Licensed 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. - --%> -<%@ page import="org.apache.solr.request.SolrQueryRequest, - org.apache.solr.request.SolrQueryResponse"%> - -<%@include file="_info.jsp" %> - - - - <%=core.getName()%> - -<% - SolrQueryRequest req = core.getPingQueryRequest(); - SolrQueryResponse resp = new SolrQueryResponse(); - try { - core.execute(req,resp); - if (resp.getException() == null) { -// No need for explicit status in the body, when the standard HTTP -// response codes already transmit success/failure message - out.println("200"); - } - else if (resp.getException() != null) { - throw resp.getException(); - } - } catch (Throwable t) { - // throw t; - } finally { - req.close(); - } -%> - - http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/d7f7062e/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/ping.xsl ---------------------------------------------------------------------- diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/ping.xsl b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/ping.xsl deleted file mode 100644 index e584a9a..0000000 --- a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/ping.xsl +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - Solr Admin: Ping - - - - Apache Solr - - -

Solr Admin ()

- - - - - - - - - - - - - -
-

Ping

-
- -
-
- http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/d7f7062e/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/raw-schema.jsp ---------------------------------------------------------------------- diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/raw-schema.jsp b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/raw-schema.jsp deleted file mode 100644 index b4a65c0..0000000 --- a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/raw-schema.jsp +++ /dev/null @@ -1,39 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -<%-- - ~ Copyright (c) 2012 Salzburg Research. - ~ - ~ Licensed 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. - --%> - -<%@ page import="java.io.InputStreamReader, - java.io.Reader"%> -<%@ page import="java.util.logging.Logger"%> -<%@ page contentType="text/plain;charset=UTF-8" language="java" %> -<%@include file="_info.jsp" %> -<%! - static Logger log = Logger.getLogger(SolrCore.class.getName()); -%> -<% - // NOTE -- this file will be removed in a future release - log.warning("Using deprecated JSP: " + request.getRequestURL().append("?").append(request.getQueryString()) + " -- check the ShowFileRequestHandler" ); - - Reader input = new InputStreamReader(schema.getInputStream()); - char[] buf = new char[4096]; - while (true) { - int len = input.read(buf); - if (len<=0) break; - out.write(buf,0,len); - } -%> http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/d7f7062e/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/registry.jsp ---------------------------------------------------------------------- diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/registry.jsp b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/registry.jsp deleted file mode 100644 index 216182c..0000000 --- a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/solr/admin/registry.jsp +++ /dev/null @@ -1,109 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -<%@ page contentType="text/xml; charset=utf-8" pageEncoding="UTF-8" language="java" %> - -<%-- - ~ Copyright (c) 2012 Salzburg Research. - ~ - ~ Licensed 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. - --%> -<%@ page import="org.apache.solr.core.SolrInfoMBean, - java.net.URL, - java.util.Date, - java.util.Map"%> - - -<%@include file="_info.jsp" %> - - - <%= core.getName()%> - <%= collectionName %> - <%= hostname %> - <%= new Date().toString() %> - <%= new Date(core.getStartTime()) %> - <%= solrSpecVersion %> - <%= solrImplVersion %> - <%= luceneSpecVersion %> - <%= luceneImplVersion %> - -<% -for (SolrInfoMBean.Category cat : SolrInfoMBean.Category.values()) { -%> - <<%= cat.toString() %>> -<% - Map reg = core.getInfoRegistry(); - synchronized(reg) { - for (Map.Entry entry : reg.entrySet()) { - String key = entry.getKey(); - SolrInfoMBean m = entry.getValue(); - - if (m.getCategory() != cat) continue; - - String na = "None Provided"; - String name = (m.getName()!=null ? m.getName() : na); - String vers = (m.getVersion()!=null ? m.getVersion() : na); - String desc = (m.getDescription()!=null ? m.getDescription() : na); - String srcId = (m.getSourceId()!=null ? m.getSourceId() : na); - String src = (m.getSource()!=null ? m.getSource() : na); - // print -%> - - - <%= key %> - - - <%= name %> - - - <%= vers %> - - - <%= desc %> - - - <%= srcId %> - - - <%= src %> - - -<% - URL[] urls = m.getDocs(); - if ((urls != null) && (urls.length != 0)) { -%> - -<% - for (URL u : urls) { -%> - - <%= u.toString() %> - -<% - } -%> - -<% - } -%> - -<% - } - } -%> - > -<% -} -%> - -