1 /* 2 * reserved comment block 3 * DO NOT REMOVE OR ALTER! 4 */ 5 /* 6 * Copyright 2005 The Apache Software Foundation. 7 * 8 * Licensed under the Apache License, Version 2.0 (the "License"); 9 * you may not use this file except in compliance with the License. 10 * You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, software 15 * distributed under the License is distributed on an "AS IS" BASIS, 16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 * See the License for the specific language governing permissions and 18 * limitations under the License. 19 */ 20 package com.sun.org.apache.xerces.internal.xpointer; 21 22 import com.sun.org.apache.xerces.internal.xni.Augmentations; 23 import com.sun.org.apache.xerces.internal.xni.QName; 24 import com.sun.org.apache.xerces.internal.xni.XMLAttributes; 25 import com.sun.org.apache.xerces.internal.xni.XNIException; 26 27 /** 28 * <p> 29 * Used for scheme specific parsing and evaluation of an XPointer expression. 30 * This interface applies to both ShortHand and SchemeBased XPointer 31 * expressions. 32 * </p> 33 * 34 * @xerces.internal 35 * 36 */ 37 public interface XPointerPart { 38 39 // The start element event 40 public static final int EVENT_ELEMENT_START = 0; 41 42 // The end element event 43 public static final int EVENT_ELEMENT_END = 1; 44 45 // The empty element event 46 public static final int EVENT_ELEMENT_EMPTY = 2; 47 48 /** 49 * Provides scheme specific parsing of a XPointer expression i.e. 50 * the PointerPart or ShortHandPointer. 51 * 52 * @param xpointer A String representing the PointerPart or ShortHandPointer. 53 * @throws XNIException Thrown if the PointerPart string does not conform to 54 * the syntax defined by its scheme. 55 * 56 */ 57 public void parseXPointer(String part) throws XNIException; 58 59 /** 60 * Evaluates an XML resource with respect to an XPointer expressions 61 * by checking if it's element and attributes parameters match the 62 * criteria specified in the xpointer expression. 63 * 64 * @param element - The name of the element. 65 * @param attributes - The element attributes. 66 * @param augs - Additional information that may include infoset augmentations 67 * @param event - An integer indicating 68 * 0 - The start of an element 69 * 1 - The end of an element 70 * 2 - An empty element call 71 * @throws XNIException Thrown to signal an error 72 * | 1 /* 2 * reserved comment block 3 * DO NOT REMOVE OR ALTER! 4 */ 5 /* 6 * Licensed to the Apache Software Foundation (ASF) under one or more 7 * contributor license agreements. See the NOTICE file distributed with 8 * this work for additional information regarding copyright ownership. 9 * The ASF licenses this file to You under the Apache License, Version 2.0 10 * (the "License"); you may not use this file except in compliance with 11 * the License. You may obtain a copy of the License at 12 * 13 * http://www.apache.org/licenses/LICENSE-2.0 14 * 15 * Unless required by applicable law or agreed to in writing, software 16 * distributed under the License is distributed on an "AS IS" BASIS, 17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 * See the License for the specific language governing permissions and 19 * limitations under the License. 20 */ 21 22 package com.sun.org.apache.xerces.internal.xpointer; 23 24 import com.sun.org.apache.xerces.internal.xni.Augmentations; 25 import com.sun.org.apache.xerces.internal.xni.QName; 26 import com.sun.org.apache.xerces.internal.xni.XMLAttributes; 27 import com.sun.org.apache.xerces.internal.xni.XNIException; 28 29 /** 30 * <p> 31 * Used for scheme specific parsing and evaluation of an XPointer expression. 32 * This interface applies to both ShortHand and SchemeBased XPointer 33 * expressions. 34 * </p> 35 * 36 * @xerces.internal 37 * 38 */ 39 public interface XPointerPart { 40 41 // The start element event 42 public static final int EVENT_ELEMENT_START = 0; 43 44 // The end element event 45 public static final int EVENT_ELEMENT_END = 1; 46 47 // The empty element event 48 public static final int EVENT_ELEMENT_EMPTY = 2; 49 50 /** 51 * Provides scheme specific parsing of a XPointer expression i.e. 52 * the PointerPart or ShortHandPointer. 53 * 54 * @param part A String representing the PointerPart or ShortHandPointer. 55 * @throws XNIException Thrown if the PointerPart string does not conform to 56 * the syntax defined by its scheme. 57 * 58 */ 59 public void parseXPointer(String part) throws XNIException; 60 61 /** 62 * Evaluates an XML resource with respect to an XPointer expressions 63 * by checking if it's element and attributes parameters match the 64 * criteria specified in the xpointer expression. 65 * 66 * @param element - The name of the element. 67 * @param attributes - The element attributes. 68 * @param augs - Additional information that may include infoset augmentations 69 * @param event - An integer indicating 70 * 0 - The start of an element 71 * 1 - The end of an element 72 * 2 - An empty element call 73 * @throws XNIException Thrown to signal an error 74 * |