Package com.google.enterprise.connector.mock.jcr

Examples of com.google.enterprise.connector.mock.jcr.MockJcrValue


    String propStrVal = null;
    if (name.equals("object_name")) {
      name = "name";
      MockRepositoryProperty pm = mockDocument.getProplist().getProperty(
          name);
      MockJcrValue propVal = new MockJcrValue(pm);
      try {
        propStrVal = propVal.getString();
      } catch (IllegalStateException e) {
        // TODO: Why is this exception ignored?
      }
    } else if (name.equals(SpiConstants.PROPNAME_DOCID)) {
      name = "docid";
      propStrVal = mockDocument.getDocID();
    } else {
      MockRepositoryProperty pm = mockDocument.getProplist().getProperty(
          name);
      MockJcrValue propVal = new MockJcrValue(pm);
      try {
        propStrVal = propVal.getString();
      } catch (IllegalStateException e) {
        // TODO: Why is this exception ignored?
      }
    }
View Full Code Here


  }

  @Override
  public int getInt(String name) throws RepositoryDocumentException {
    MockRepositoryProperty pm = mockDocument.getProplist().getProperty(name);
    MockJcrValue propVal = new MockJcrValue(pm);
    int propIntVal = 0;
    try {
      propIntVal = (int) propVal.getLong();
    } catch (IllegalStateException e) {
      // TODO: Why is this exception ignored?
    }
    return propIntVal;
  }
View Full Code Here

  public IType getType() throws RepositoryDocumentException {
    String propType = "MockType";
    MockRepositoryProperty pm = mockDocument.getProplist()
        .getProperty("r_object_type");
    if (pm != null) {
      MockJcrValue propVal = new MockJcrValue(pm);
      try {
        propType = propVal.getString();
      } catch (IllegalStateException e) {
        // TODO: Why is this exception ignored?
      }
    }
    return new MockDmType(propType, this);
View Full Code Here

  }

  @Override
  public double getDouble(String name) throws RepositoryDocumentException {
    MockRepositoryProperty pm = mockDocument.getProplist().getProperty(name);
    MockJcrValue propVal = new MockJcrValue(pm);
    double propDblVal = 0;
    try {
      propDblVal = propVal.getDouble();
    } catch (IllegalStateException e) {
      // TODO: Why is this exception ignored?
    }
    return propDblVal;
  }
View Full Code Here

  }

  @Override
  public boolean getBoolean(String name) throws RepositoryDocumentException {
    MockRepositoryProperty pm = mockDocument.getProplist().getProperty(name);
    MockJcrValue propVal = new MockJcrValue(pm);
    boolean propBlVal = true;
    try {
      propBlVal = propVal.getBoolean();
    } catch (IllegalStateException e) {
      // TODO: Why is this exception ignored?
    }
    return propBlVal;
  }
View Full Code Here

  }

  @Override
  public int getAttrDataType(String name) throws RepositoryDocumentException {
    MockRepositoryProperty pm = mockDocument.getProplist().getProperty(name);
    MockJcrValue propVal = new MockJcrValue(pm);
    return propVal.getType();
  }
View Full Code Here

  }

  @Override
  public IValue getRepeatingValue(String name, int index)
      throws RepositoryDocumentException {
    return new MockDmValue(new MockJcrValue(new MockRepositoryProperty(
        name, PropertyType.STRING, getString(name))));
  }
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.mock.jcr.MockJcrValue

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.