You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by an...@apache.org on 2006/07/24 11:18:03 UTC
svn commit: r424974 - in
/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi:
NodeImpl.java PropertyImpl.java
Author: angela
Date: Mon Jul 24 02:18:02 2006
New Revision: 424974
URL: http://svn.apache.org/viewvc?rev=424974&view=rev
Log:
work in progress
- javadoc
- cleanup refactoring effects
Modified:
jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/PropertyImpl.java
Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java?rev=424974&r1=424973&r2=424974&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java Mon Jul 24 02:18:02 2006
@@ -187,7 +187,7 @@
checkIsWritable();
// 1. build qualified path and retrieve parent node
Path nodePath = getQPath(relPath);
- if (nodePath.getNameElement().getIndex() != org.apache.jackrabbit.name.Path.INDEX_UNDEFINED) {
+ if (nodePath.getNameElement().getIndex() != Path.INDEX_UNDEFINED) {
String msg = "Illegal subscript specified: " + relPath;
log.debug(msg);
throw new RepositoryException(msg);
@@ -536,7 +536,7 @@
if (parentId == null) {
// the root node cannot have same-name siblings; always return the
// default index
- return org.apache.jackrabbit.name.Path.INDEX_DEFAULT;
+ return Path.INDEX_DEFAULT;
}
try {
NodeState parent = (NodeState) itemStateMgr.getItemState(parentId);
@@ -891,14 +891,14 @@
// search nearest ancestor that is referenceable
NodeImpl referenceableNode = this;
- while (referenceableNode.getDepth() != org.apache.jackrabbit.name.Path.ROOT_DEPTH && !referenceableNode.isNodeType(QName.MIX_REFERENCEABLE)) {
+ while (referenceableNode.getDepth() != Path.ROOT_DEPTH && !referenceableNode.isNodeType(QName.MIX_REFERENCEABLE)) {
referenceableNode = (NodeImpl) referenceableNode.getParent();
}
// if root is common ancestor, corresponding path is same as ours
// otherwise access referenceable ancestor and calcuate correspond. path.
String correspondingPath;
- if (referenceableNode.getDepth() == org.apache.jackrabbit.name.Path.ROOT_DEPTH) {
+ if (referenceableNode.getDepth() == Path.ROOT_DEPTH) {
if (!srcSession.getItemManager().itemExists(getQPath())) {
throw new ItemNotFoundException("No corresponding path found in workspace " + workspaceName + "(" + safeGetJCRPath() + ")");
} else {
@@ -1358,7 +1358,7 @@
* @param qName
* @param type
* @param def
- * @param ivs
+ * @param qvs
* @return
* @throws PathNotFoundException
* @throws ConstraintViolationException
@@ -1432,8 +1432,7 @@
}
/**
- *
- * @return
+ * @return <code>NodeState</code> of this <code>Node</code>
*/
private NodeState getNodeState() {
return (NodeState) getItemState();
@@ -1522,7 +1521,9 @@
} catch (PathNotFoundException e) {
// item does not exist -> ignore and return null
} catch (MalformedPathException e) {
- e.printStackTrace();
+ String msg = "Invalid relative path: " + relPath;
+ log.debug(msg);
+ throw new RepositoryException(msg, e);
}
return targetId;
}
Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/PropertyImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/PropertyImpl.java?rev=424974&r1=424973&r2=424974&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/PropertyImpl.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/PropertyImpl.java Mon Jul 24 02:18:02 2006
@@ -442,7 +442,7 @@
//---------------------------------------------< private implementation >---
/**
*
- * @return
+ * @return true if the definition indicates that this Property is multivalued.
*/
private boolean isMultiple() {
return definition.isMultiple();
@@ -451,7 +451,7 @@
/**
*
* @param defaultType
- * @return
+ * @return the required type for this property.
*/
private int getRequiredType(int defaultType) {
// check type according to definition of this property
@@ -528,7 +528,7 @@
// DIFF JACKRABBIT: protected void internalSetValue(QValue[] values, int type)
/**
*
- * @param internalValues
+ * @param qValues
* @param valueType
* @throws ConstraintViolationException
* @throws RepositoryException